SHARE
TWEET

Untitled

a guest Aug 12th, 2017 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/sbin/runscript
  2. # Copyright 1999-2004 Gentoo Foundation
  3. # Distributed under the terms of the GNU General Public License, v2 or later
  4. # $Header: /var/cvsroot/gentoo-x86/sys-fs/dropbox/files/dropbox.init-1.0,v 1.4 2007/04/04 13:35:25 cardoe Exp $
  5.  
  6. DROPBOX_USERS="will"
  7. NICENESS=5
  8.  
  9. depend() {
  10.     need localmount net
  11.     after bootmisc
  12. }
  13.  
  14. start() {
  15.     ebegin "Starting dropbox..."
  16.     for dbuser in $DROPBOX_USERS; do
  17.         start-stop-daemon -S -b -m --pidfile /var/run/dropbox-$dbuser.pid -o -N $NICENESS -c $dbuser -v -e HOME="/home/$dbuser" -x /home/$dbuser/.dropbox-dist/dropboxd
  18.     done
  19.     eend $?
  20. }
  21.  
  22. stop() {
  23.     ebegin "Stopping dropbox..."
  24.     for dbuser in $DROPBOX_USERS; do
  25.         start-stop-daemon --stop --pidfile /var/run/dropbox-$dbuser.pid
  26.     done
  27.     eend $?
  28. }
  29.  
  30. status() {
  31.     for dbuser in $DROPBOX_USERS; do
  32.         if [ -e /var/run/dropbox-$dbuser.pid ] ; then
  33.             echo "dropboxd for USER $dbuser: running."
  34.         else
  35.             echo "dropboxd for USER $dbuser: not running."
  36.         fi
  37.     done
  38.     eend $?
  39. }
RAW Paste Data
Top