rc.dns-autoslave
changeset 32 b3cd686b8cf6
parent 31 e127de596921
equal deleted inserted replaced
31:e127de596921 32:b3cd686b8cf6
     1 #! /bin/sh 
       
     2 
       
     3 ### BEGIN INIT INFO
       
     4 # Provides:          dns-autoslave
       
     5 # Required-Start:    $local_fs $remote_fs $syslog $named $network $time
       
     6 # Required-Stop:     $local_fs $remote_fs $syslog $named $network
       
     7 # Should-Start:
       
     8 # Should-Stop:
       
     9 # Default-Start:     2 3 4 5
       
    10 # Default-Stop:      0 1 6
       
    11 # Short-Description: Start/Stop the dns-autoslave daemon
       
    12 ### END INIT INFO
       
    13 
       
    14 DAEMON=/usr/local/sbin/dns-autoslave
       
    15 PIDFILE=/var/run/`basename $DAEMON`.pid
       
    16 
       
    17 case $1 in
       
    18 	
       
    19 	start)	
       
    20 		start-stop-daemon -v --start --pidfile $PIDFILE --startas $DAEMON
       
    21 		;;
       
    22 		
       
    23 	stop)	
       
    24 		start-stop-daemon -v --stop --retry 30 --pidfile $PIDFILE
       
    25 		;;
       
    26 		
       
    27 	restart) echo "Restarting $NAME..."
       
    28 		$0 stop
       
    29 		$0 start
       
    30 		;;
       
    31 
       
    32 	*)
       
    33 		echo "Usage: $0 {start|stop|restart}" >&2
       
    34 		exit 1			
       
    35 		;;
       
    36 esac
       
    37 
       
    38 exit 0