--- a/rc.dns-autoslave Mon Nov 28 13:11:11 2005 +0000
+++ b/rc.dns-autoslave Wed Nov 30 06:55:20 2005 +0000
@@ -1,31 +1,29 @@
-#! /bin/bash
+#! /bin/sh
+# $Id$
+# $URL$
-DAEMON=/usr/local/sbin/master_watcher
-PIDFILE=/var/run/master_watcher.pid
+DAEMON=/usr/local/sbin/dns-autoslave
+NAME=`basename $DAEMON`
test -x $MASTER_WATCHER || exit 0
case $1 in
start)
- echo -n "Starting $DAEMON..."
- start-stop-daemon --start --pid $PIDFILE --exec $DAEMON -- -f
- echo " OK";
+ start-stop-daemon -v --start --name $NAME --startas $DAEMON
;;
stop)
- echo -n "Stopping $DAEMON..."
- start-stop-daemon --stop --pid $PIDFILE
- echo " OK";
+ start-stop-daemon -v --stop --retry 30 --name $NAME
;;
- restart) echo -n "Restarting $DAEMON..."
+ restart) echo "Restarting $NAME..."
$0 stop
$0 start
;;
*)
- echo "Usage: /etc/init.d/$DAEMON {start|stop|restart}" >&2
+ echo "Usage: $0 {start|stop|restart}" >&2
exit 1
;;
esac