Created
April 14, 2014 09:08
Revisions
-
chrisk created this gist
Apr 14, 2014 .There are no files selected for viewing
This file contains 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,12 @@ --- /etc/init.d/dropbox +++ /etc/init.d/dropbox-fixed @@ -26,7 +34,8 @@ status() { for dbuser in $DROPBOX_USERS; do - dbpid=`pgrep -u $dbuser dropbox` + HOMEDIR=`getent passwd $dbuser | cut -d: -f6` + dbpid=`ps -u $dbuser -o pid,cmd | grep "$HOMEDIR"/"$DAEMON"\$ | awk '{ print \$1 }'` if [ -z $dbpid ] ; then echo "dropboxd for USER $dbuser: not running." else