-
-
Save thisismitch/6293d3f7f5fa37ca6eab to your computer and use it in GitHub Desktop.
Revisions
-
thisismitch revised this gist
Feb 25, 2016 . 1 changed file with 3 additions and 3 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 @@ -6,9 +6,9 @@ After=network.target syslog.target Environment=LC_ALL=en_US.UTF-8 Environment=LANG=en_US.UTF-8 EnvironmentFile=-/etc/sysconfig/dropbox ExecStart=/etc/init.d/dropbox start ExecReload=/etc/init.d/dropbox restart ExecStop=/etc/init.d/dropbox stop Type=forking [Install] -
thisismitch revised this gist
Feb 25, 2016 . 3 changed files with 20 additions and 4 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 @@ -22,7 +22,7 @@ start() { fi for dbuser in $DROPBOX_USERS; do dbuser_home=`cat /etc/passwd | grep "^$dbuser:" | cut -d":" -f6` daemon --user $dbuser /bin/sh -c "/opt/dropbox/dropboxd&" done RETVAL=$? echo @@ -32,7 +32,7 @@ start() { status() { for dbuser in $DROPBOX_USERS; do dbpid=`pgrep -u $dbuser dropboxd | grep -v grep` if [ -z $dbpid ] ; then echo "dropboxd for USER $dbuser: not running." else @@ -44,7 +44,7 @@ stop() { echo -n $"Stopping $prog" for dbuser in $DROPBOX_USERS; do dbuser_home=`cat /etc/passwd | grep "^$dbuser:" | cut -d":" -f6` killproc /opt/dropbox/dropboxd done RETVAL=$? echo @@ -69,4 +69,4 @@ case "$1" in *) echo $"Usage: $prog {start|status|stop|restart}" RETVAL=3 esac 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,15 @@ [Unit] Description=Dropbox is a filesyncing sevice provided by dropbox.com. This service starts up the dropbox daemon. After=network.target syslog.target [Service] Environment=LC_ALL=en_US.UTF-8 Environment=LANG=en_US.UTF-8 EnvironmentFile=-/etc/sysconfig/dropbox ExecStart=/bin/dropbox start ExecReload=/bin/dropbox restart ExecStop=/bin/dropbox stop Type=forking [Install] WantedBy=multi-user.target 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 @@ DROPBOX_USERS="sammy" -
kbrnsr revised this gist
Feb 2, 2016 . No changes.There are no files selected for viewing
-
kbrnsr created this gist
Feb 2, 2016 .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,72 @@ #!/bin/sh # To configure, add line with DROPBOX_USERS="user1 user2" to /etc/sysconfig/dropbox # Probably should use a dropbox group in /etc/groups instead. # Source function library. . /etc/rc.d/init.d/functions prog=dropboxd lockfile=${LOCKFILE-/var/lock/subsys/$prog} RETVAL=0 start() { echo -n $"Starting $prog" if [ -z $DROPBOX_USERS ] ; then echo -n ": unconfigured: $config" echo_failure echo rm -f ${lockfile} ${pidfile} RETURN=6 return $RETVAL fi for dbuser in $DROPBOX_USERS; do dbuser_home=`cat /etc/passwd | grep "^$dbuser:" | cut -d":" -f6` daemon --user $dbuser /bin/sh -c "$dbuser_home/.dropbox-dist/dropboxd&" done RETVAL=$? echo [ $RETVAL = 0 ] && touch ${lockfile} return $RETVAL } status() { for dbuser in $DROPBOX_USERS; do dbpid=`pgrep -u $dbuser dropbox | grep -v grep` if [ -z $dbpid ] ; then echo "dropboxd for USER $dbuser: not running." else echo "dropboxd for USER $dbuser: running (pid $dbpid)" fi done } stop() { echo -n $"Stopping $prog" for dbuser in $DROPBOX_USERS; do dbuser_home=`cat /etc/passwd | grep "^$dbuser:" | cut -d":" -f6` killproc $dbuser_home/.dropbox-dist/dropbox done RETVAL=$? echo [ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile} } # See how we were called. case "$1" in start) start ;; status) status ;; stop) stop ;; restart) stop start ;; *) echo $"Usage: $prog {start|status|stop|restart}" RETVAL=3 esac