rc.dns-autoslave
changeset 9 6f5ef6fb479d
parent 8 098af5defd01
child 11 d1dd256c037a
equal deleted inserted replaced
8:098af5defd01 9:6f5ef6fb479d
       
     1 #! /bin/bash
       
     2 
       
     3 DAEMON=/usr/local/sbin/master_watcher
       
     4 PIDFILE=/var/run/master_watcher.pid
       
     5 
       
     6 test -x $MASTER_WATCHER || exit 0
       
     7 
       
     8 case $1 in
       
     9 	
       
    10 	start)	
       
    11 		echo -n "Starting $DAEMON..."
       
    12 		start-stop-daemon --start --pid $PIDFILE --exec $DAEMON -- -f
       
    13 		echo " OK";
       
    14 		;;
       
    15 		
       
    16 	stop)	
       
    17 		echo -n "Stopping $DAEMON..."
       
    18 		start-stop-daemon --stop --pid $PIDFILE
       
    19 		echo " OK";
       
    20 		;;
       
    21 		
       
    22 	restart) echo -n "Restarting $DAEMON..."
       
    23 		$0 stop
       
    24 		$0 start
       
    25 		;;
       
    26 
       
    27 	*)
       
    28 		echo "Usage: /etc/init.d/$DAEMON {start|stop|restart}" >&2
       
    29 		exit 1			
       
    30 		;;
       
    31 esac
       
    32 
       
    33 exit 0