Ensure restart of dhcpd on config changes
This commit is contained in:
parent
87502c4dd0
commit
701f8b1185
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
# Simple script to update the dhcp-static files from git
|
# Simple script to update the dhcp-static files from git
|
||||||
|
|
||||||
# CONFIGURE THIS TO YOUR GIT DIRECTORY
|
# CONFIGURE THIS TO YOUR GIT DIRECTORY
|
||||||
|
@ -11,4 +11,15 @@ cd $GIT_REPO
|
||||||
|
|
||||||
su -c "git pull" $USER
|
su -c "git pull" $USER
|
||||||
|
|
||||||
|
if ! cmp $GIT_REPO/static.conf /etc/dhcp/static.conf >/dev/null 2>&1 ;
|
||||||
|
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 restart
|
||||||
|
fi
|
||||||
|
|
||||||
|
ps -C "dhcpd" 2>&1>/dev/null
|
||||||
|
if [[ $? -ne 0 ]]
|
||||||
|
then
|
||||||
|
/usr/sbin/service isc-dhcp-server restart
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue