summaryrefslogtreecommitdiff
path: root/dhcp/dhcpd
blob: 0c7898ae4912e1c3a705e37ead5e78cd7e7716b1 (plain)
    1 #!/bin/sh
    2 #
    3 # /etc/rc.d/dhcpd: start/stop dhcp daemon
    4 #
    5 
    6 SSD=/sbin/start-stop-daemon
    7 PROG=/usr/sbin/dhcpd
    8 PID=/var/run/dhcpd.pid
    9 OPTS="-q"
   10 
   11 case $1 in
   12 start)
   13         $SSD --start --pidfile $PID --exec $PROG -- $OPTS
   14         ;;
   15 stop)
   16         $SSD --stop --remove-pidfile --retry 10 --pidfile $PID
   17         ;;
   18 restart)
   19         $0 stop
   20         $0 start
   21         ;;
   22 reload)
   23         $SSD --stop --signal HUP --pidfile $PID
   24         ;;
   25 status)
   26         $SSD --status --pidfile $PID
   27         case $? in
   28         0) echo "$PROG is running" ;;
   29         1) echo "$PROG is not running but the pid file $PID exists" ;;
   30         3) echo "$PROG is not running" ;;
   31         4) echo "Unable to determine the program status" ;;
   32         esac
   33         ;;
   34 *)
   35         echo "usage: $0 [start|stop|restart|reload|status]"
   36         ;;
   37 esac
   38 
   39 # End of file

Generated by cgit