summaryrefslogtreecommitdiff
path: root/contrib/redhat
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2008-01-20 16:44:44 +0000
committerChris Wilson <chris+github@qwirx.com>2008-01-20 16:44:44 +0000
commit8a7f1a2a7ccb1a739d90f2de3fa333d24bcc73bb (patch)
treeb071e5b031857f89c1722d29ab1a31a85e74c81a /contrib/redhat
parent5d5f7669b05b7bee05c5c0a8ddddd301483c0c19 (diff)
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.
Diffstat (limited to 'contrib/redhat')
-rw-r--r--contrib/redhat/README.txt7
-rw-r--r--contrib/redhat/bbackupd83
-rw-r--r--contrib/redhat/bbstored83
3 files changed, 173 insertions, 0 deletions
diff --git a/contrib/redhat/README.txt b/contrib/redhat/README.txt
new file mode 100644
index 00000000..cfc8d968
--- /dev/null
+++ b/contrib/redhat/README.txt
@@ -0,0 +1,7 @@
+These start scripts are for Fedora Core or RedHat Enterprise Linux. If
+installed manually they should be placed in /etc/rc.d/init.d.
+
+They may also work for Mandrake.
+
+Martin Ebourne
+martin@zepler.org
diff --git a/contrib/redhat/bbackupd b/contrib/redhat/bbackupd
new file mode 100644
index 00000000..63c61ff7
--- /dev/null
+++ b/contrib/redhat/bbackupd
@@ -0,0 +1,83 @@
+#! /bin/bash
+#
+# bbackupd Start/Stop the box backup daemon.
+#
+# chkconfig: 345 93 07
+# description: bbackup 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
+
+# Source function library.
+. /etc/init.d/functions
+
+RETVAL=0
+
+# See how we were called.
+
+prog="bbackupd"
+
+# Check that configuration exists.
+[ -f /etc/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 daemon 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
new file mode 100644
index 00000000..eadca1d1
--- /dev/null
+++ b/contrib/redhat/bbstored
@@ -0,0 +1,83 @@
+#! /bin/bash
+#
+# bbstored Start/Stop the box backup daemon.
+#
+# chkconfig: 345 93 07
+# description: bbstore is the server side deamon for Box Backup, a completely \
+# automatic on-line backup system
+# processname: bbstored
+# config: /etc/box
+# pidfile: /var/run/bbstored.pid
+
+# Source function library.
+. /etc/init.d/functions
+
+RETVAL=0
+
+# See how we were called.
+
+prog="bbstored"
+
+# Check that configuration exists.
+[ -f /etc/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 daemon 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 $?