wok-current annotate boxbackup-client/stuff/bbackupd @ rev 16050

xorg-server-light: typo
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Mar 10 12:50:19 2014 +0000 (2014-03-10)
parents bf612580d156
children 7f188676b59c
rev   line source
domcox@1357 1 #!/bin/sh
domcox@1357 2 # /etc/init.d/bbackupd: Start, stop and restart bbackupd deamon on SliTaz, at boot
domcox@1357 3 # time or with the command line.
domcox@1357 4 #
domcox@1357 5 # To start daemon at boot time, just put the right name in the $RUN_DAEMONS
domcox@1357 6 # variable of /etc/rcS.conf and configure options with /etc/daemons.conf.
domcox@1357 7 #
domcox@1357 8 . /etc/init.d/rc.functions
domcox@1357 9 . /etc/daemons.conf
domcox@1357 10
domcox@1357 11 NAME=BBackupd
domcox@1357 12 DESC="BoxBackup deamon"
domcox@1357 13 DAEMON=/usr/bin/bbackupd
domcox@1357 14 OPTIONS=$BBSTORED_OPTIONS
domcox@1357 15 PIDFILE=/var/run/bbackupd.pid
domcox@1357 16
domcox@1357 17 case "$1" in
domcox@1357 18 start)
pascal@11691 19 if active_pidfile $PIDFILE bbackupd ; then
domcox@1357 20 echo "$NAME already running."
domcox@1357 21 exit 1
domcox@1357 22 fi
domcox@1357 23 echo -n "Starting $DESC: $NAME... "
domcox@1357 24 $DAEMON $OPTIONS > /dev/null
domcox@1357 25 status
domcox@1357 26 ;;
domcox@1357 27 stop)
pascal@11691 28 if ! active_pidfile $PIDFILE bbackupd ; then
domcox@1357 29 echo "$NAME is not running."
domcox@1357 30 exit 1
domcox@1357 31 fi
domcox@1357 32 echo -n "Stopping $DESC: $NAME... "
domcox@1357 33 kill `cat $PIDFILE`
domcox@2341 34 rm -f $PIDFILE
domcox@1357 35 status
domcox@1357 36 ;;
domcox@1357 37 restart)
pascal@11691 38 if ! active_pidfile $PIDFILE bbackupd ; then
domcox@1357 39 echo "$NAME is not running."
domcox@1357 40 exit 1
domcox@1357 41 fi
domcox@1357 42 echo -n "Restarting $DESC: $NAME... "
domcox@1357 43 kill `cat $PIDFILE`
domcox@2341 44 rm -f $PIDFILE
domcox@1357 45 sleep 2
domcox@1357 46 $DAEMON $OPTIONS > /dev/null
domcox@1357 47 status
domcox@1357 48 ;;
domcox@1357 49 *)
domcox@1357 50 echo ""
domcox@1357 51 echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]"
domcox@1357 52 echo ""
domcox@1357 53 exit 1
domcox@1357 54 ;;
domcox@1357 55 esac
domcox@1357 56
domcox@1357 57 exit 0