mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-23 09:22:59 +02:00
Kill the dhcp server if it cannot shutdown in normal way
This commit is contained in:
@@ -31,6 +31,14 @@ case "$1" in
|
||||
stop)
|
||||
boot_mesg "Stopping DHCP Server..."
|
||||
killproc -p /var/run/dhcpd.pid /usr/sbin/dhcpd
|
||||
if [ "$(ps -A | grep " dhcpd")" != "" ] ; then
|
||||
# if fail use the hard way ...
|
||||
boot_mesg "Killing DHCP Server..."
|
||||
killall -w -s KILL /usr/sbin/dhcpd > /dev/null 2>&1
|
||||
rm -f /var/run/dhcpd.pid > /dev/null 2>&1
|
||||
echo_ok;
|
||||
exit 0
|
||||
fi
|
||||
;;
|
||||
|
||||
reload)
|
||||
|
||||
Reference in New Issue
Block a user