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/suse/bbstored.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/suse/bbstored.in')
-rw-r--r-- | contrib/suse/bbstored.in | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/contrib/suse/bbstored.in b/contrib/suse/bbstored.in new file mode 100644 index 00000000..e8c74278 --- /dev/null +++ b/contrib/suse/bbstored.in @@ -0,0 +1,104 @@ +#!/bin/sh +# +# Copyright (c)2004, Nothing But Net Limited +# <chris.smith@nothingbutnet.co.nz> +# +###################################################################### +# RELEASED AND PROVIDED TO YOU UNDER THE SAME LICENCE AS THE BOXBACKUP +# SUITE OF PROGRAMS. LICENCE MAY BE VIEWED HERE: +# +# http://www.boxbackup.org/license.html +###################################################################### +# +# /etc/init.d/bbstored +# and its symbolic link +# /(usr/)sbin/rcbbstored +# +### BEGIN INIT INFO +# Provides: bbstored +# Required-Start: $named $network $local_fs $syslog +# X-UnitedLinux-Should-Start: $time ypbind sendmail +# Required-Stop: $named $network $localfs $syslog +# X-UnitedLinux-Should-Stop: $time ypbind sendmail +# Default-Start: 3 5 +# Default-Stop: 0 1 2 6 +# Short-Description: BoxBackup server side daemon +# Description: Server daemon for the BoxBackup software, +# to which bbackupd clients connect. +### END INIT INFO +# + +# Check for missing binaries (stale symlinks should not happen) +BBSTORED_BIN=@bindir_expanded@/bbstored +if [ ! -x $BBSTORED_BIN ] ; then + echo "$BBSTORED_BIN not installed" + exit 5 +fi + +. /etc/rc.status + +# Reset status of this service +rc_reset + +case "$1" in + start) + echo -n "Starting bbstored " + startproc $BBSTORED_BIN + rc_status -v + ;; + + stop) + echo -n "Shutting down bbstored " + killproc -TERM $BBSTORED_BIN + rc_status -v + ;; + + try-restart|condrestart) + if test "$1" = "condrestart"; then + echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}" + fi + $0 status + if test $? = 0; then + $0 restart + else + rc_reset # Not running is not a failure. + fi + rc_status + ;; + + restart) + $0 stop + $0 start + rc_status + ;; + + force-reload) + echo -n "Reload service bbstored " + killproc -HUP $BBSTORED_BIN + rc_status -v + ;; + + reload) + echo -n "Reload service bbstored " + killproc -HUP $BBSTORED_BIN + rc_status -v + ;; + + status) + echo -n "Checking for service bbstored " + checkproc $BBSTORED_BIN + rc_status -v + ;; + + probe) + test @sysconfdir_expanded@/box/bbstored.conf \ + -nt @localstatedir_expanded@/bbstored.pid && echo reload + ;; + + *) + echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" + exit 1 + ;; + +esac +rc_exit |