From 2787035d98661881477d696403ca2a78b49322d5 Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Sat, 2 Feb 2008 08:31:52 +0100 Subject: 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 --- contrib/cygwin/README.txt | 30 -------- contrib/cygwin/install-cygwin-service.pl.in | 112 ---------------------------- contrib/cygwin/remove-cygwin-service.sh | 14 ---- contrib/debian/README.txt | 9 +++ contrib/debian/bbackupd | 46 ++++++++++++ contrib/debian/bbackupd.in | 46 ++++++++++++ contrib/debian/bbstored | 46 ++++++++++++ contrib/debian/bbstored.in | 46 ++++++++++++ contrib/redhat/bbackupd | 8 +- contrib/redhat/bbackupd.in | 83 +++++++++++++++++++++ contrib/redhat/bbstored | 8 +- contrib/redhat/bbstored.in | 83 +++++++++++++++++++++ contrib/rpm/boxbackup.spec | 8 +- contrib/solaris/bbackupd-manifest.xml.in | 59 +++++++++++++++ contrib/solaris/bbackupd-smf-method.in | 24 ++++++ contrib/solaris/bbstored-manifest.xml.in | 60 +++++++++++++++ contrib/solaris/bbstored-smf-method.in | 23 ++++++ contrib/suse/bbackupd | 8 +- contrib/suse/bbackupd.in | 103 +++++++++++++++++++++++++ contrib/suse/bbstored | 33 ++++---- contrib/suse/bbstored.in | 104 ++++++++++++++++++++++++++ 21 files changed, 765 insertions(+), 188 deletions(-) delete mode 100644 contrib/cygwin/README.txt delete mode 100755 contrib/cygwin/install-cygwin-service.pl.in delete mode 100755 contrib/cygwin/remove-cygwin-service.sh create mode 100644 contrib/debian/README.txt create mode 100755 contrib/debian/bbackupd create mode 100644 contrib/debian/bbackupd.in create mode 100755 contrib/debian/bbstored create mode 100644 contrib/debian/bbstored.in mode change 100644 => 100755 contrib/redhat/bbackupd create mode 100644 contrib/redhat/bbackupd.in mode change 100644 => 100755 contrib/redhat/bbstored create mode 100644 contrib/redhat/bbstored.in create mode 100644 contrib/solaris/bbackupd-manifest.xml.in create mode 100755 contrib/solaris/bbackupd-smf-method.in create mode 100644 contrib/solaris/bbstored-manifest.xml.in create mode 100755 contrib/solaris/bbstored-smf-method.in mode change 100644 => 100755 contrib/suse/bbackupd create mode 100644 contrib/suse/bbackupd.in mode change 100644 => 100755 contrib/suse/bbstored create mode 100644 contrib/suse/bbstored.in (limited to 'contrib') diff --git a/contrib/cygwin/README.txt b/contrib/cygwin/README.txt deleted file mode 100644 index 83f32fd9..00000000 --- a/contrib/cygwin/README.txt +++ /dev/null @@ -1,30 +0,0 @@ - Making boxbackup run as a Windows Service - -For most installations (with the default locations for config files, -etc.) running the install-cygwin-service.pl script will complete the -installation painlessly, and you will have a running bbackupd after -completing the installation, and whenever you reboot. - -Simply run the script: - -perl install-cygwin-service.pl - -The service can be monitored in the Windows Service Manager. It is named -boxbackup. - -For non-standard configurations, there are command-line options to point -the script to the bbackupd.conf config file, and the bbackupd.exe -executable: - -perl install-cygwin-service.pl [-c ] [-e -] - - - Removing the Service - -If you decide not to run backups on a machine anymore, simply remove the -service by running: - -sh remove-cygwin-service.sh - - diff --git a/contrib/cygwin/install-cygwin-service.pl.in b/contrib/cygwin/install-cygwin-service.pl.in deleted file mode 100755 index a580e99c..00000000 --- a/contrib/cygwin/install-cygwin-service.pl.in +++ /dev/null @@ -1,112 +0,0 @@ -#!@PERL@ -w - - -# Contributed to the boxbackup project by Per Reedtz Thomsen. pthomsen@reedtz.com - -# This script reads the config file for boxbackup, and changes the mode -# of the directory named by 'DataDirectory' and any files there. Also, -# the files pointed to by the 'CommandSocket' and 'PidFile' configuration -# parameters will be chmod'ed to be read-write by all. -# The Windows services are created and started using the 'cygrunsrv' utility. - -# Date Who Comments -# 20041005 pthomsen@reedtz.com Created -# 20041020 pthomsen@reedtz.com Switched to using Getopt::Std for cmd-line things. - -use strict; - -use Getopt::Std; -getopt('ce'); -our ($opt_c, $opt_e); -# Figure out the config file to use. Default is /etc/box/bbackupd.conf -my $confFile = (defined($opt_c) ? $opt_c : "/etc/box/bbackupd.conf"); -# Figure out the bbaackupd executable to use. Default is /usr/local/bin/bbackupd.exe -my $exeFile = (defined($opt_e) ? $opt_e : "/usr/local/bin/bbackupd.exe"); - -die "File $confFile does not exist. Please provide the full path to the bbackupd configuration file.\n" if !(-f $confFile); -die "Can't read $confFile. Permission denied. Please chmod the file so I can read it.\n" if !(-r $confFile); -die "File $exeFile does not exist. Please provide the full path to the bbackupd.exe file.\n" if !(-f $exeFile); -die "File $exeFile is not executable. Please provide the full path to the correct bbackupd.exe file.\n" if !(-x $exeFile); - -# print "Config: $confFile\n"; - -my $dataDir; -my $cmdSocket; -my $pidFile; - -open (CONFIG, "<$confFile") or die "Can't open $confFile: $!\n"; - -# Read the confgiguration file, and pull the DataDirectory, CommandSocket, and PidFile parameters. -while () -{ - - if (/^\s*DataDirectory\s*=\s*([^\n\s]+)\s*\n/) - { - $dataDir = $1; - next; - } - - if (/^\s*CommandSocket\s*=\s*([^\n\s]+)\s*\n/) - { - $cmdSocket = $1; - next; - } - if (/^\s*PidFile\s*=\s*([^\n\s]+)\s*\n/) - { - $pidFile = $1; - next; - } -} - -# check that we got all the parameters from the file. If not, die. -if ((!defined($dataDir)) || (!defined($cmdSocket)) || (!defined($pidFile))) -{ - die "Could not read config parameters from $confFile. Values retrieved:\n\tDataDirectory = $dataDir\n\tCommandSocket = $cmdSocket\n\tPidFile = $pidFile\n"; -} - - -print "Parameters retrieved from $confFile. Values:\n\tDataDirectory = $dataDir\n\tCommandSocket = $cmdSocket\n\tPidFile = $pidFile\n"; -print "chmod..."; -# change the mode of the files/dirs retrieved. -chmod(0777, $dataDir) or die "Can't chmod $dataDir: $!\n"; -chmod(0666, "$dataDir/*") or die "Can't chmod $dataDir/*: $!\n"; -chmod(0666, $pidFile) or die "Can't chmod $pidFile: $!\n"; -chmod(0755, $cmdSocket) or die "Can't chmod $cmdSocket: $!\n"; -print " Done.\n"; - -# Now install the service using cygrunsrv. -# Details: -# -I Install a service. svc_name is the name under which the -# service will appear in the Windows Service Manager -# -p Path to the executable. -# -a Command line options to the executable. -# -f Description of the service. -# -o Attempt clean exit of service during system shutdown - -print "Installing boxbackup service..."; -my $sysCmd = "cygrunsrv.exe -I boxbackup -p " . $exeFile; -$sysCmd .= " -a \"" . $confFile . " SINGLEPROCESS\""; -$sysCmd .= " -o -f \"Online Backup System by Ben Summers\""; -print "$sysCmd\n"; -my $output = qx($sysCmd); -die "cygrunsrv failed to install service. Error Message: $output\n" if($output ne ""); -print " Done.\n"; - - -# Start the service -# Details: -# -S Start a service. svc_name is the name of the (installed) -# service to start. - -print "Starting boxbackup service..."; -$sysCmd = "cygrunsrv.exe -S boxbackup"; -print "$sysCmd\n"; -$output = qx($sysCmd); -die "cygrunsrv failed to start service. Error Message: $output\n" if($output ne ""); -print " Done.\n"; - -print "\n\nService Installation complete. To test, reboot your machine, and make sure that\n"; -print "the boxbackup service is running. A good way to make sure, is to check that the account number\n"; -print "from this machine is connecting to the bbstored server. Check the bbstored logs for more info.\n\n"; - - diff --git a/contrib/cygwin/remove-cygwin-service.sh b/contrib/cygwin/remove-cygwin-service.sh deleted file mode 100755 index e766333d..00000000 --- a/contrib/cygwin/remove-cygwin-service.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -# Contributed to the boxbackup project by Per Reedtz Thomsen. pthomsen@reedtz.com - -# This script removes the 'boxbackup' service from the Windows service manager -# using the cygrunsrv utility. - -# Date Who Comments -# 20041005 pthomsen@reedtz.com Created - -cygrunsrv -R boxbackup - -echo "Service \"boxbackup\" removed." - diff --git a/contrib/debian/README.txt b/contrib/debian/README.txt new file mode 100644 index 00000000..ebe5fdf7 --- /dev/null +++ b/contrib/debian/README.txt @@ -0,0 +1,9 @@ +These start scripts are for Debian GNU/Linux. If installed manually they should +be placed in /etc/init.d. To create the symbolic links for the appropriate run +levels execute the following commands: + +update-rc.d bbackupd defaults 90 +update-rc.d bbstored defaults 80 + +James Stark + diff --git a/contrib/debian/bbackupd b/contrib/debian/bbackupd new file mode 100755 index 00000000..f114c5d2 --- /dev/null +++ b/contrib/debian/bbackupd @@ -0,0 +1,46 @@ +#! /bin/sh + +# Start and stop the Box Backup client daemon. + +BBACKUPD=/usr/local/bin/bbackupd +CONFIG=/etc/box/bbackupd.conf +PIDFILE=/var/run/bbackupd.pid + +test -x $BBACKUPD || exit 0 +test -f $CONFIG || exit 0 + +case $1 in + start) + echo -n "Starting Box Backup Client daemon: bbackupd" + start-stop-daemon --start --quiet --exec $BBACKUPD > /dev/null + echo "." + ;; + + stop) + echo -n "Stopping Box Backup Client daemon: bbackupd" + start-stop-daemon --stop --quiet \ + --pidfile $PIDFILE --exec $BBACKUPD + echo "." + ;; + + reload|force-reload) + echo -n "Reloading Box Backup Client configuration" + start-stop-daemon --stop --signal 1 --quiet --oknodo \ + --pidfile $PIDFILE --exec $BBACKUPD + echo "." + ;; + + restart) + echo -n "Restarting Box Backup Client daemon: bbackupd" + start-stop-daemon --stop --quiet --pidfile $PIDFILE \ + --exec $BBACKUPD + start-stop-daemon --start --quiet \ + --exec $BBACKUPD > /dev/null + echo "." + ;; + *) + echo "Usage: /etc/init.d/bbackupd {start|stop|reload|force-reload|restart}" + exit 1 +esac + +exit 0 diff --git a/contrib/debian/bbackupd.in b/contrib/debian/bbackupd.in new file mode 100644 index 00000000..78d4f4ee --- /dev/null +++ b/contrib/debian/bbackupd.in @@ -0,0 +1,46 @@ +#! /bin/sh + +# Start and stop the Box Backup client daemon. + +BBACKUPD=@bindir_expanded@/bbackupd +CONFIG=@sysconfdir_expanded@/box/bbackupd.conf +PIDFILE=@localstatedir_expanded@/bbackupd.pid + +test -x $BBACKUPD || exit 0 +test -f $CONFIG || exit 0 + +case $1 in + start) + echo -n "Starting Box Backup Client daemon: bbackupd" + start-stop-daemon --start --quiet --exec $BBACKUPD > /dev/null + echo "." + ;; + + stop) + echo -n "Stopping Box Backup Client daemon: bbackupd" + start-stop-daemon --stop --quiet \ + --pidfile $PIDFILE --exec $BBACKUPD + echo "." + ;; + + reload|force-reload) + echo -n "Reloading Box Backup Client configuration" + start-stop-daemon --stop --signal 1 --quiet --oknodo \ + --pidfile $PIDFILE --exec $BBACKUPD + echo "." + ;; + + restart) + echo -n "Restarting Box Backup Client daemon: bbackupd" + start-stop-daemon --stop --quiet --pidfile $PIDFILE \ + --exec $BBACKUPD + start-stop-daemon --start --quiet \ + --exec $BBACKUPD > /dev/null + echo "." + ;; + *) + echo "Usage: /etc/init.d/bbackupd {start|stop|reload|force-reload|restart}" + exit 1 +esac + +exit 0 diff --git a/contrib/debian/bbstored b/contrib/debian/bbstored new file mode 100755 index 00000000..d5ba2ac5 --- /dev/null +++ b/contrib/debian/bbstored @@ -0,0 +1,46 @@ +#! /bin/sh + +# Start and stop the Box Backup server daemon. + +BBSTORED=/usr/local/bin/bbstored +CONFIG=/etc/box/bbstored.conf +PIDFILE=/var/run/bbstored.pid + +test -x $BBACKUPD || exit 0 +test -f $CONFIG || exit 0 + +case $1 in + start) + echo -n "Starting Box Backup Server daemon: bbstored" + start-stop-daemon --start --quiet --exec $BBSTORED > /dev/null + echo "." + ;; + + stop) + echo -n "Stopping Box Backup Server daemon: bbstored" + start-stop-daemon --stop --quiet \ + --pidfile $PIDFILE --exec $BBSTORED + echo "." + ;; + + reload|force-reload) + echo -n "Reloading Box Backup Server configuration" + start-stop-daemon --stop --signal 1 --quiet --oknodo \ + --pidfile $PIDFILE --exec $BBSTORED + echo "." + ;; + + restart) + echo -n "Restarting Box Backup Server daemon: bbstored" + start-stop-daemon --stop --quiet --pidfile $PIDFILE \ + --exec $BBSTORED + start-stop-daemon --start --quiet \ + --exec $BBSTORED > /dev/null + echo "." + ;; + + *) + echo "Usage: /etc/init.d/bbstored {start|stop|reload|force-reload|restart}" +esac + +exit 0 diff --git a/contrib/debian/bbstored.in b/contrib/debian/bbstored.in new file mode 100644 index 00000000..da6a50a0 --- /dev/null +++ b/contrib/debian/bbstored.in @@ -0,0 +1,46 @@ +#! /bin/sh + +# Start and stop the Box Backup server daemon. + +BBSTORED=@bindir_expanded@/bbstored +CONFIG=@sysconfdir_expanded@/box/bbstored.conf +PIDFILE=@localstatedir_expanded@/bbstored.pid + +test -x $BBACKUPD || exit 0 +test -f $CONFIG || exit 0 + +case $1 in + start) + echo -n "Starting Box Backup Server daemon: bbstored" + start-stop-daemon --start --quiet --exec $BBSTORED > /dev/null + echo "." + ;; + + stop) + echo -n "Stopping Box Backup Server daemon: bbstored" + start-stop-daemon --stop --quiet \ + --pidfile $PIDFILE --exec $BBSTORED + echo "." + ;; + + reload|force-reload) + echo -n "Reloading Box Backup Server configuration" + start-stop-daemon --stop --signal 1 --quiet --oknodo \ + --pidfile $PIDFILE --exec $BBSTORED + echo "." + ;; + + restart) + echo -n "Restarting Box Backup Server daemon: bbstored" + start-stop-daemon --stop --quiet --pidfile $PIDFILE \ + --exec $BBSTORED + start-stop-daemon --start --quiet \ + --exec $BBSTORED > /dev/null + echo "." + ;; + + *) + echo "Usage: /etc/init.d/bbstored {start|stop|reload|force-reload|restart}" +esac + +exit 0 diff --git a/contrib/redhat/bbackupd b/contrib/redhat/bbackupd old mode 100644 new mode 100755 index 63c61ff7..71deab1b --- 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 old mode 100644 new mode 100755 index eadca1d1..09e2b490 --- 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 $? diff --git a/contrib/rpm/boxbackup.spec b/contrib/rpm/boxbackup.spec index 389bdfc9..c3cdbe39 100644 --- a/contrib/rpm/boxbackup.spec +++ b/contrib/rpm/boxbackup.spec @@ -28,7 +28,7 @@ Summary: An automatic on-line backup system for UNIX. Name: boxbackup -Version: 0.11rc1 +Version: 0.11rc2 Release: 1 License: BSD Group: Applications/Archiving @@ -116,8 +116,7 @@ install -m 644 %{distribution_dir}THANKS.txt \ # Client touch $RPM_BUILD_ROOT%{_sysconfdir}/box/bbackupd.conf -install -m 755 %{distribution_dir}contrib/%{dist}/bbackupd \ - $RPM_BUILD_ROOT%{init_dir} +install -m 755 contrib/%{dist}/bbackupd $RPM_BUILD_ROOT%{init_dir} %if %{is_suse} ln -s ../../%{init_dir}/bbackupd $RPM_BUILD_ROOT%{_sbindir}/rcbbackupd %endif @@ -130,8 +129,7 @@ install %{client_dir}/bbackupd-config $RPM_BUILD_ROOT%{_sbindir} # Server touch $RPM_BUILD_ROOT%{_sysconfdir}/box/bbstored.conf touch $RPM_BUILD_ROOT%{_sysconfdir}/box/raidfile.conf -install -m 755 %{distribution_dir}contrib/%{dist}/bbstored \ - $RPM_BUILD_ROOT%{init_dir} +install -m 755 contrib/%{dist}/bbstored $RPM_BUILD_ROOT%{init_dir} %if %{is_suse} ln -s ../../%{init_dir}/bbstored $RPM_BUILD_ROOT%{_sbindir}/rcbbstored %endif diff --git a/contrib/solaris/bbackupd-manifest.xml.in b/contrib/solaris/bbackupd-manifest.xml.in new file mode 100644 index 00000000..ab30a78e --- /dev/null +++ b/contrib/solaris/bbackupd-manifest.xml.in @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contrib/solaris/bbackupd-smf-method.in b/contrib/solaris/bbackupd-smf-method.in new file mode 100755 index 00000000..2c839961 --- /dev/null +++ b/contrib/solaris/bbackupd-smf-method.in @@ -0,0 +1,24 @@ + +PIDFILE=@localstatedir_expanded@/bbackupd.pid + +case $1 in + + # SMF arguments (start and restart [really "refresh"]) +'start') + @bindir_expanded@/bbackupd + ;; + +'restart') + if [ -f "$PIDFILE" ]; then + /usr/bin/kill -HUP `/usr/bin/cat $PIDFILE` + fi + ;; + +*) + echo "Usage: $0 { start | restart }" + exit 1 + ;; +esac + +exit $? + diff --git a/contrib/solaris/bbstored-manifest.xml.in b/contrib/solaris/bbstored-manifest.xml.in new file mode 100644 index 00000000..f7133677 --- /dev/null +++ b/contrib/solaris/bbstored-manifest.xml.in @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contrib/solaris/bbstored-smf-method.in b/contrib/solaris/bbstored-smf-method.in new file mode 100755 index 00000000..0ea25e40 --- /dev/null +++ b/contrib/solaris/bbstored-smf-method.in @@ -0,0 +1,23 @@ +PIDFILE=@localstatedir_expanded@/bbstored.pid + +case $1 in + + # SMF arguments (start and restart [really "refresh"]) +'start') + @bindir_expanded@/bbstored + ;; + +'restart') + if [ -f "$PIDFILE" ]; then + /usr/bin/kill -HUP `/usr/bin/cat $PIDFILE` + fi + ;; + +*) + echo "Usage: $0 { start | restart }" + exit 1 + ;; +esac + +exit $? + diff --git a/contrib/suse/bbackupd b/contrib/suse/bbackupd old mode 100644 new mode 100755 index 4dd94154..30605185 --- a/contrib/suse/bbackupd +++ b/contrib/suse/bbackupd @@ -7,7 +7,7 @@ # 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 +# http://www.boxbackup.org/license.html ###################################################################### # # /etc/init.d/bbackupd @@ -28,7 +28,7 @@ ### END INIT INFO # Check for missing binaries (stale symlinks should not happen) -BBACKUPD_BIN=/usr/sbin/bbackupd +BBACKUPD_BIN=/usr/local/bin/bbackupd if [ ! -x $BBACKUPD_BIN ] ; then echo "$BBACKUPD_BIN not installed" exit 5 @@ -90,7 +90,9 @@ case "$1" in ;; probe) - test /etc/box/bbackupd.conf -nt /var/run/bbackupd.pid && echo reload + test /etc/box/bbackupd.conf \ + -nt /var/run/bbackupd.pid \ + && echo reload ;; *) diff --git a/contrib/suse/bbackupd.in b/contrib/suse/bbackupd.in new file mode 100644 index 00000000..d3a5659e --- /dev/null +++ b/contrib/suse/bbackupd.in @@ -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.boxbackup.org/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=@bindir_expanded@/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 @sysconfdir_expanded@/box/bbackupd.conf \ + -nt @localstatedir_expanded@/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 old mode 100644 new mode 100755 index 1824dda7..d0d8b068 --- a/contrib/suse/bbstored +++ b/contrib/suse/bbstored @@ -7,15 +7,15 @@ # 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 +# http://www.boxbackup.org/license.html ###################################################################### # -# /etc/init.d/bbackupd +# /etc/init.d/bbstored # and its symbolic link -# /(usr/)sbin/rcbbackupd +# /(usr/)sbin/rcbbstored # ### BEGIN INIT INFO -# Provides: bbackupd +# Provides: bbstored # Required-Start: $named $network $local_fs $syslog # X-UnitedLinux-Should-Start: $time ypbind sendmail # Required-Stop: $named $network $localfs $syslog @@ -23,15 +23,15 @@ # 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. +# Description: Server daemon for the BoxBackup software, +# to which bbackupd clients connect. ### 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" +BBSTORED_BIN=/usr/local/bin/bbstored +if [ ! -x $BBSTORED_BIN ] ; then + echo "$BBSTORED_BIN not installed" exit 5 fi @@ -43,13 +43,13 @@ rc_reset case "$1" in start) echo -n "Starting bbstored " - startproc $BBACKUPD_BIN + startproc $BBSTORED_BIN rc_status -v ;; stop) - echo -n "Shutting down bstored " - killproc -TERM $BBACKUPD_BIN + echo -n "Shutting down bbstored " + killproc -TERM $BBSTORED_BIN rc_status -v ;; @@ -74,24 +74,25 @@ case "$1" in force-reload) echo -n "Reload service bbstored " - killproc -HUP $BBACKUPD_BIN + killproc -HUP $BBSTORED_BIN rc_status -v ;; reload) echo -n "Reload service bbstored " - killproc -HUP $BBACKUPD_BIN + killproc -HUP $BBSTORED_BIN rc_status -v ;; status) echo -n "Checking for service bbstored " - checkproc $BBACKUPD_BIN + checkproc $BBSTORED_BIN rc_status -v ;; probe) - test /etc/box/bbstored.conf -nt /var/run/bbstored.pid && echo reload + test /etc/box/bbstored.conf \ + -nt /var/run/bbstored.pid && echo reload ;; *) 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 +# +# +###################################################################### +# 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 -- cgit v1.2.3