diff options
Diffstat (limited to 'contrib/redhat')
-rwxr-xr-x[-rw-r--r--] | contrib/redhat/bbackupd | 8 | ||||
-rw-r--r-- | contrib/redhat/bbackupd.in | 83 | ||||
-rwxr-xr-x[-rw-r--r--] | contrib/redhat/bbstored | 8 | ||||
-rw-r--r-- | contrib/redhat/bbstored.in | 83 |
4 files changed, 174 insertions, 8 deletions
diff --git a/contrib/redhat/bbackupd b/contrib/redhat/bbackupd index 63c61ff7..71deab1b 100644..100755 --- a/contrib/redhat/bbackupd +++ b/contrib/redhat/bbackupd @@ -1,10 +1,10 @@ #! /bin/bash # -# bbackupd Start/Stop the box backup daemon. +# bbackupd Start/Stop the box backup client daemon. # # chkconfig: 345 93 07 -# description: bbackup is the client side deamon for Box Backup, a completely \ -# automatic on-line backup system +# description: bbackupd is the client side deamon for Box Backup, \ +# a completely automatic on-line backup system. # processname: bbackupd # config: /etc/box # pidfile: /var/run/bbackupd.pid @@ -49,7 +49,7 @@ restart() { } reload() { - echo -n $"Reloading $prog daemon configuration: " + echo -n $"Reloading $prog configuration: " killproc $prog -HUP retval=$? echo 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 $? diff --git a/contrib/redhat/bbstored b/contrib/redhat/bbstored index eadca1d1..09e2b490 100644..100755 --- a/contrib/redhat/bbstored +++ b/contrib/redhat/bbstored @@ -1,10 +1,10 @@ #! /bin/bash # -# bbstored Start/Stop the box backup daemon. +# bbstored Start/Stop the box backup server daemon. # # chkconfig: 345 93 07 -# description: bbstore is the server side deamon for Box Backup, a completely \ -# automatic on-line backup system +# description: bbstored is the server side daemon for Box Backup, \ +# a completely automatic on-line backup system. # processname: bbstored # config: /etc/box # pidfile: /var/run/bbstored.pid @@ -49,7 +49,7 @@ restart() { } reload() { - echo -n $"Reloading $prog daemon configuration: " + echo -n $"Reloading $prog configuration: " killproc $prog -HUP retval=$? echo diff --git a/contrib/redhat/bbstored.in b/contrib/redhat/bbstored.in new file mode 100644 index 00000000..c7675df5 --- /dev/null +++ b/contrib/redhat/bbstored.in @@ -0,0 +1,83 @@ +#! /bin/bash +# +# bbstored Start/Stop the box backup server daemon. +# +# chkconfig: 345 93 07 +# description: bbstored is the server side daemon for Box Backup, \ +# a completely automatic on-line backup system. +# processname: bbstored +# config: @sysconfdir_expanded@/box +# pidfile: @localstatedir_expanded@/bbstored.pid + +# Source function library. +. /etc/init.d/functions + +RETVAL=0 + +# See how we were called. + +prog="bbstored" + +# 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 $? |