From 8a7f1a2a7ccb1a739d90f2de3fa333d24bcc73bb Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 20 Jan 2008 16:44:44 +0000 Subject: Move distribution/boxbackup/contrib to the root directory of the project, where people expect to find it, and we can write our configure scripts to customise the files therein. Add solaris SMF framework control files, by Ben Summers. --- contrib/suse/README.txt | 5 +++ contrib/suse/bbackupd | 101 +++++++++++++++++++++++++++++++++++++++++++++++ contrib/suse/bbstored | 103 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 209 insertions(+) create mode 100644 contrib/suse/README.txt create mode 100644 contrib/suse/bbackupd create mode 100644 contrib/suse/bbstored (limited to 'contrib/suse') diff --git a/contrib/suse/README.txt b/contrib/suse/README.txt new file mode 100644 index 00000000..0f260b7a --- /dev/null +++ b/contrib/suse/README.txt @@ -0,0 +1,5 @@ +These start scripts are for SUSE Linux. If installed manually they should be +placed in /etc/init.d. + +Copyright (c)2004, Nothing But Net Limited + diff --git a/contrib/suse/bbackupd b/contrib/suse/bbackupd new file mode 100644 index 00000000..4dd94154 --- /dev/null +++ b/contrib/suse/bbackupd @@ -0,0 +1,101 @@ +#!/bin/sh +# +# Copyright (c)2004, Nothing But Net Limited +# +# +###################################################################### +# RELEASED AND PROVIDED TO YOU UNDER THE SAME LICENCE AS THE BOXBACKUP +# SUITE OF PROGRAMS. LICENCE MAY BE VIEWED HERE: +# +# http://www.fluffy.co.uk/boxbackup/license.html +###################################################################### +# +# /etc/init.d/bbackupd +# and its symbolic link +# /(usr/)sbin/rcbbackupd +# +### BEGIN INIT INFO +# Provides: bbackupd +# 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 client side daemon +# Description: Client daemon for the BoxBackup software +# that allows you to communicate with a bbstored server. +### END INIT INFO + +# Check for missing binaries (stale symlinks should not happen) +BBACKUPD_BIN=/usr/sbin/bbackupd +if [ ! -x $BBACKUPD_BIN ] ; then + echo "$BBACKUPD_BIN not installed" + exit 5 +fi + +. /etc/rc.status + +# Reset status of this service +rc_reset + +case "$1" in + start) + echo -n "Starting bbackupd " + startproc $BBACKUPD_BIN + rc_status -v + ;; + + stop) + echo -n "Shutting down bbackupd " + killproc -TERM $BBACKUPD_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 bbackupd " + killproc -HUP $BBACKUPD_BIN + rc_status -v + ;; + + reload) + echo -n "Reload service bbackupd " + killproc -HUP $BBACKUPD_BIN + rc_status -v + ;; + + status) + echo -n "Checking for service bbackupd " + checkproc $BBACKUPD_BIN + rc_status -v + ;; + + probe) + test /etc/box/bbackupd.conf -nt /var/run/bbackupd.pid && echo reload + ;; + + *) + echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" + exit 1 + +esac +rc_exit diff --git a/contrib/suse/bbstored b/contrib/suse/bbstored new file mode 100644 index 00000000..1824dda7 --- /dev/null +++ b/contrib/suse/bbstored @@ -0,0 +1,103 @@ +#!/bin/sh +# +# Copyright (c)2004, Nothing But Net Limited +# +# +###################################################################### +# RELEASED AND PROVIDED TO YOU UNDER THE SAME LICENCE AS THE BOXBACKUP +# SUITE OF PROGRAMS. LICENCE MAY BE VIEWED HERE: +# +# http://www.fluffy.co.uk/boxbackup/license.html +###################################################################### +# +# /etc/init.d/bbackupd +# and its symbolic link +# /(usr/)sbin/rcbbackupd +# +### BEGIN INIT INFO +# Provides: bbackupd +# 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: Client daemon for the BoxBackup software +# that allows you to communicate with a bbstored server. +### END INIT INFO +# + +# Check for missing binaries (stale symlinks should not happen) +BBACKUPD_BIN=/usr/sbin/bbstored +if [ ! -x $BBACKUPD_BIN ] ; then + echo "$BBACKUPD_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 $BBACKUPD_BIN + rc_status -v + ;; + + stop) + echo -n "Shutting down bstored " + killproc -TERM $BBACKUPD_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 $BBACKUPD_BIN + rc_status -v + ;; + + reload) + echo -n "Reload service bbstored " + killproc -HUP $BBACKUPD_BIN + rc_status -v + ;; + + status) + echo -n "Checking for service bbstored " + checkproc $BBACKUPD_BIN + rc_status -v + ;; + + probe) + test /etc/box/bbstored.conf -nt /var/run/bbstored.pid && echo reload + ;; + + *) + echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" + exit 1 + ;; + +esac +rc_exit -- cgit v1.2.3