diff --git a/updateStatics.sh b/updateStatics.sh index c25dec7..41c4eee 100755 --- a/updateStatics.sh +++ b/updateStatics.sh @@ -15,11 +15,9 @@ if ! cmp $GIT_REPO/static.conf /etc/dhcp/static.conf >/dev/null 2>&1 ; then 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 + /usr/sbin/service isc-dhcp-server status 2>&1> /dev/null + if [[ $? -eq 0 ]] + then + /usr/sbin/service isc-dhcp-server restart + fi fi