diff options
author | Reinhard Tartler <siretart@tauware.de> | 2008-02-02 08:31:52 +0100 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2008-02-02 08:31:52 +0100 |
commit | 2787035d98661881477d696403ca2a78b49322d5 (patch) | |
tree | 0a018e13726a0232332ac23565e1a7df32cdcc06 /contrib/redhat/bbackupd.in | |
parent | 2733267954e91e394fbb512ea3abb4c497c0752f (diff) |
import version 0.11rc2
This commit has been made by 'bzr import'. I used the upstream tarball
of Version 0.11rc2 for creating it. It has the md5sum:
68052f963a944c717a50bd65a54375ff
Diffstat (limited to 'contrib/redhat/bbackupd.in')
-rw-r--r-- | contrib/redhat/bbackupd.in | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/contrib/redhat/bbackupd.in b/contrib/redhat/bbackupd.in new file mode 100644 index 00000000..e8ecdc68 --- /dev/null +++ b/contrib/redhat/bbackupd.in @@ -0,0 +1,83 @@ +#! /bin/bash +# +# bbackupd Start/Stop the box backup client daemon. +# +# chkconfig: 345 93 07 +# description: bbackupd is the client side deamon for Box Backup, \ +# a completely automatic on-line backup system. +# processname: bbackupd +# config: @sysconfdir_expanded@/box +# pidfile: @localstatedir_expanded@/bbackupd.pid + +# Source function library. +. /etc/init.d/functions + +RETVAL=0 + +# See how we were called. + +prog="bbackupd" + +# Check that configuration exists. +[ -f @sysconfdir_expanded@/box/$prog.conf ] || exit 0 + +start() { + echo -n $"Starting $prog: " + daemon $prog + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog + return $RETVAL +} + +stop() { + echo -n $"Stopping $prog: " + killproc $prog + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog + return $RETVAL +} + +rhstatus() { + status $prog +} + +restart() { + stop + start +} + +reload() { + echo -n $"Reloading $prog configuration: " + killproc $prog -HUP + retval=$? + echo + return $RETVAL +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + reload) + reload + ;; + status) + rhstatus + ;; + condrestart) + [ -f /var/lock/subsys/$prog ] && restart || : + ;; + *) + echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}" + exit 1 +esac + +exit $? |