Last active
August 29, 2015 14:20
-
-
Save annalinneajohansson/6c8eafa28991dbd7dafc to your computer and use it in GitHub Desktop.
Bash script to autostart dropbox daemon if it exists with a delay set in seconds. Usage $ dropbox <time in seconds>.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ## How long to delay the start of Dropbox | |
| DELAY=$1 | |
| ## If no delay is set default to 10 seconds | |
| : ${DELAY:=10} | |
| ## If dropbox exists then start it | |
| if type "dropbox" > /dev/null; then | |
| echo "Starting Dropbox in ${DELAY} seconds..." | |
| sleep $DELAY | |
| dropbox start -i | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment