Only restart dhcp server if it was running before
so we do not interfere with check-gateway script that stops dhcp server if no vpn uplink is present
This commit is contained in:
parent
05d54834cb
commit
f02f770ec2
|
@ -15,11 +15,9 @@ if ! cmp $GIT_REPO/static.conf /etc/dhcp/static.conf >/dev/null 2>&1 ;
|
||||||
then
|
then
|
||||||
cp $GIT_REPO/static.conf /etc/dhcp/static.conf
|
cp $GIT_REPO/static.conf /etc/dhcp/static.conf
|
||||||
|
|
||||||
|
/usr/sbin/service isc-dhcp-server status 2>&1> /dev/null
|
||||||
|
if [[ $? -eq 0 ]]
|
||||||
|
then
|
||||||
/usr/sbin/service isc-dhcp-server restart
|
/usr/sbin/service isc-dhcp-server restart
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ps -C "dhcpd" 2>&1>/dev/null
|
|
||||||
if [[ $? -ne 0 ]]
|
|
||||||
then
|
|
||||||
/usr/sbin/service isc-dhcp-server restart
|
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue