dropboxd

Oct. 30th, 2013 07:04 am
[personal profile] robinbobin
/etc/init.d/dropboxd



# Dropbox_jc21com startup script
### BEGIN INIT INFO
# Provides: dropbox_jc21com
# Required-Start: $local_fs $network
# Required-Stop:
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: Starts dropbox daemon for jc21com user
# Description: Starts dropbox daemon
### END INIT INFO
RUN_AS_USER=root
DROPBOX_HOME=/root/.dropbox-dist
start() {
  unset DISPLAY
  echo "Starting dropbox: "
  if [ "x$USER" != "x$RUN_AS_USER" ]; then
    su - $RUN_AS_USER -c "$DROPBOX_HOME/dropboxd & >> $DROPBOX_HOME/log.log 2>&1"
  else
    $DROPBOX_HOME/dropboxd & >> $DROPBOX_HOME/log.log 2>&1
  fi
  echo "Done."
}
stop() {
  echo "Shutting down dropbox: "
  if [ "x$USER" != "x$RUN_AS_USER" ]; then
    su - $RUN_AS_USER -c "killall -u $RUN_AS_USER dropbox"
  else
    killall -u $RUN_AS_USER dropbox
  fi
  echo "Done."
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart}"
esac
exit 0

http://confluence.jc21.com/display/LINUX/Using+Dropbox+on+Linux+headless+server

Profile

robinbobin

December 2016

S M T W T F S
     1 2 3
45 6 7 8 910
1112 13 14 15 16 17
18192021 22 23 24
25262728293031

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 23rd, 2025 09:47 pm
Powered by Dreamwidth Studios