summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2008-02-02 08:31:52 +0100
committerReinhard Tartler <siretart@tauware.de>2008-02-02 08:31:52 +0100
commit2787035d98661881477d696403ca2a78b49322d5 (patch)
tree0a018e13726a0232332ac23565e1a7df32cdcc06 /contrib
parent2733267954e91e394fbb512ea3abb4c497c0752f (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')
-rw-r--r--contrib/cygwin/README.txt30
-rwxr-xr-xcontrib/cygwin/install-cygwin-service.pl.in112
-rwxr-xr-xcontrib/cygwin/remove-cygwin-service.sh14
-rw-r--r--contrib/debian/README.txt9
-rwxr-xr-xcontrib/debian/bbackupd46
-rw-r--r--contrib/debian/bbackupd.in46
-rwxr-xr-xcontrib/debian/bbstored46
-rw-r--r--contrib/debian/bbstored.in46
-rwxr-xr-x[-rw-r--r--]contrib/redhat/bbackupd8
-rw-r--r--contrib/redhat/bbackupd.in83
-rwxr-xr-x[-rw-r--r--]contrib/redhat/bbstored8
-rw-r--r--contrib/redhat/bbstored.in83
-rw-r--r--contrib/rpm/boxbackup.spec8
-rw-r--r--contrib/solaris/bbackupd-manifest.xml.in59
-rwxr-xr-xcontrib/solaris/bbackupd-smf-method.in24
-rw-r--r--contrib/solaris/bbstored-manifest.xml.in60
-rwxr-xr-xcontrib/solaris/bbstored-smf-method.in23
-rwxr-xr-x[-rw-r--r--]contrib/suse/bbackupd8
-rw-r--r--contrib/suse/bbackupd.in103
-rwxr-xr-x[-rw-r--r--]contrib/suse/bbstored33
-rw-r--r--contrib/suse/bbstored.in104
21 files changed, 765 insertions, 188 deletions
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 <path-to-bbackupd-config-file>] [-e
-<path-to-bbackupd-executable-file>]
-
-
- 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 (<CONFIG>)
-{
-
- 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 <svc_name> Install a service. svc_name is the name under which the
-# service will appear in the Windows Service Manager
-# -p <path_to_exe> Path to the executable.
-# -a <options> Command line options to the executable.
-# -f <description> 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 <svc_name> 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
+<jstark@ieee.org>
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
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 $?
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 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<service_bundle type='manifest' name='FLUFFYbox:bbackupd'>
+<service
+ name='network/bbackupd'
+ type='service'
+ version='1'>
+
+<create_default_instance enabled='true' />
+
+<single_instance />
+
+<dependency
+ name='fs-local'
+ grouping='require_all'
+ restart_on='none'
+ type='service'>
+ <service_fmri value='svc:/system/filesystem/local' />
+</dependency>
+
+<dependency
+ name='network-service'
+ grouping='require_all'
+ restart_on='none'
+ type='service'>
+ <service_fmri value='svc:/network/service' />
+</dependency>
+
+<dependency
+ name='name-services'
+ grouping='require_all'
+ restart_on='refresh'
+ type='service'>
+ <service_fmri value='svc:/milestone/name-services' />
+</dependency>
+
+
+<exec_method
+ type='method'
+ name='start'
+ exec='@prefix@/bbackupd-smf-method start'
+ timeout_seconds='60'/>
+
+<exec_method
+ type='method'
+ name='stop'
+ exec=':kill'
+ timeout_seconds='60' />
+
+<exec_method
+ type='method'
+ name='refresh'
+ exec='@prefix@/bbackupd-smf-method restart'
+ timeout_seconds='60' />
+
+<stability value='Evolving' />
+
+</service>
+</service_bundle>
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 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<service_bundle type='manifest' name='FLUFFYbox:bbstored'>
+<service
+ name='network/bbstored'
+ type='service'
+ version='1'>
+
+<create_default_instance enabled='true' />
+
+<single_instance />
+
+<dependency
+ name='fs-local'
+ grouping='require_all'
+ restart_on='none'
+ type='service'>
+ <service_fmri value='svc:/system/filesystem/local' />
+</dependency>
+
+<dependency
+ name='network-service'
+ grouping='require_all'
+ restart_on='none'
+ type='service'>
+ <service_fmri value='svc:/network/service' />
+</dependency>
+
+<dependency
+ name='name-services'
+ grouping='require_all'
+ restart_on='refresh'
+ type='service'>
+ <service_fmri value='svc:/milestone/name-services' />
+</dependency>
+
+
+<exec_method
+ type='method'
+ name='start'
+ exec='@prefix@/bbstored-smf-method start'
+ timeout_seconds='60'/>
+
+<exec_method
+ type='method'
+ name='stop'
+ exec=':kill'
+ timeout_seconds='60' />
+
+<exec_method
+ type='method'
+ name='refresh'
+ exec='@prefix@/bbstored-smf-method restart'
+ timeout_seconds='60' />
+
+<stability value='Evolving' />
+
+</service>
+</service_bundle>
+
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
index 4dd94154..30605185 100644..100755
--- 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
+# <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/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
index 1824dda7..d0d8b068 100644..100755
--- 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
+# <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