only restart dnsmasq on file change

This commit is contained in:
Leo Krueger 2014-01-20 00:04:20 +01:00
parent 195d6b5ce9
commit 1f565a6d6e

View file

@ -11,10 +11,11 @@ cd $GIT_REPO
su -c "git pull" $USER su -c "git pull" $USER
if [ ! cmp $GIT_REPO/rules /etc/dnsmasq.d/rules >/dev/null 2>&1 ] || [ ! cmp $GIT_REPO/general /etc/dnsmasq.d/general >/dev/null 2>&1 ]; if ! cmp $GIT_REPO/rules /etc/dnsmasq.d/rules >/dev/null 2>&1 || ! cmp $GIT_REPO/general /etc/dnsmasq.d/general >/dev/null 2>&1 ;
then then
cp $GIT_REPO/rules /etc/dnsmasq.d/rules cp $GIT_REPO/rules /etc/dnsmasq.d/rules
cp $GIT_REPO/general /etc/dnsmasq.d/general cp $GIT_REPO/general /etc/dnsmasq.d/general
/usr/sbin/service dnsmasq restart /usr/sbin/service dnsmasq restart
fi fi