Created
September 23, 2010 00:19
-
-
Save migrs/592840 to your computer and use it in GitHub Desktop.
Revisions
-
migrs renamed this gist
Dec 17, 2011 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
migrs revised this gist
Sep 23, 2010 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -7,8 +7,8 @@ # Should-Stop: $named $time # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start and stop the dropbox daemon for debian/ubuntu # Description: Dropbox daemon for linux ### END INIT INFO DROPBOX_USERS="user1 user2" -
migrs revised this gist
Sep 23, 2010 . 1 changed file with 13 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,16 @@ # /etc/init.d/dropbox ### BEGIN INIT INFO # Provides: dropbox # Required-Start: $network $syslog $remote_fs # Required-Stop: $network $syslog $remote_fs # Should-Start: $named $time # Should-Stop: $named $time # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start and stop the dropbox daemon # Description: Dropbox daemon for debian/ubuntu ### END INIT INFO DROPBOX_USERS="user1 user2" start() { echo "Starting dropbox..." -
migrs revised this gist
Sep 23, 2010 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -16,7 +16,7 @@ stop() { status() { for dbuser in $DROPBOX_USERS; do dbpid=`pgrep -u $dbuser dropbox` if [ -z $dbpid ] ; then echo "dropboxd for USER $dbuser: not running." else -
migrs created this gist
Sep 23, 2010 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,53 @@ # dropbox service DROPBOX_USERS="user1 user2" start() { echo "Starting dropbox..." for dbuser in $DROPBOX_USERS; do start-stop-daemon -b -o -c $dbuser -S -x /home/$dbuser/.dropbox-dist/dropboxd done } stop() { echo "Stopping dropbox..." for dbuser in $DROPBOX_USERS; do start-stop-daemon -o -c $dbuser -K -x /home/$dbuser/.dropbox-dist/dropboxd done } status() { for dbuser in $DROPBOX_USERS; do dbpid=`pgrep -u $dbuser dropboxd` if [ -z $dbpid ] ; then echo "dropboxd for USER $dbuser: not running." else echo "dropboxd for USER $dbuser: running." fi done } case "$1" in start) start ;; stop) stop ;; restart|reload|force-reload) stop start ;; status) status ;; *) echo "Usage: /etc/init.d/dropbox {start|stop|reload|force-reload|restart|status}" exit 1 esac exit 0