diff options
author | Chris Wilson <chris+github@qwirx.com> | 2008-01-29 00:35:11 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2008-01-29 00:35:11 +0000 |
commit | c647ffa0841a545d0a49e584213366c7fc064672 (patch) | |
tree | d87eaa776ee924415197921e46eb9ef691843b3c /contrib/debian/bbackupd.in | |
parent | becb1a27341d013ea4b5b5eca740319a30180877 (diff) |
Update contributed scripts to use autoconf substitution for the
paths to binaries, configuration files and local state files.
Diffstat (limited to 'contrib/debian/bbackupd.in')
-rw-r--r-- | contrib/debian/bbackupd.in | 46 |
1 files changed, 46 insertions, 0 deletions
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 |