rc.dns-autoslave
changeset 9 6f5ef6fb479d
parent 8 098af5defd01
child 11 d1dd256c037a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rc.dns-autoslave	Mon Nov 28 06:57:17 2005 +0000
@@ -0,0 +1,33 @@
+#! /bin/bash
+
+DAEMON=/usr/local/sbin/master_watcher
+PIDFILE=/var/run/master_watcher.pid
+
+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";
+		;;
+		
+	stop)	
+		echo -n "Stopping $DAEMON..."
+		start-stop-daemon --stop --pid $PIDFILE
+		echo " OK";
+		;;
+		
+	restart) echo -n "Restarting $DAEMON..."
+		$0 stop
+		$0 start
+		;;
+
+	*)
+		echo "Usage: /etc/init.d/$DAEMON {start|stop|restart}" >&2
+		exit 1			
+		;;
+esac
+
+exit 0