]>
Commit | Line | Data |
---|---|---|
bdeb1016 | 1 | #!/bin/sh |
2 | # DHCP Server | |
3 | # | |
4 | # chkconfig: 345 80 20 | |
5 | # description: DHCP Server | |
6 | ||
7 | # Source function library. | |
8 | . /etc/rc.d/init.d/functions | |
9 | ||
10 | # Nice level for running sshd | |
11 | [ -f /etc/dhcpd.conf ] || exit 0 | |
12 | ||
13 | # See how we were called. | |
14 | case "$1" in | |
15 | start) | |
16 | show Starting DHCP Server | |
17 | daemon dhcpd | |
18 | touch /var/lock/subsys/dhcpd | |
19 | ;; | |
20 | stop) | |
21 | show Stopping DHCP Server | |
22 | killproc dhcpd | |
23 | rm -f /var/run/dhcpd.pid | |
24 | rm -f /var/lock/subsys/dhcpd | |
25 | ;; | |
26 | restart) | |
27 | $0 stop | |
28 | $0 start | |
29 | ;; | |
30 | status) | |
31 | status dhcpd | |
32 | ;; | |
33 | *) | |
34 | echo "Usage: $0 {start|stop|restart|status}" | |
35 | exit 1 | |
36 | esac | |
37 | ||
38 | exit 0 | |
39 |