From 1f565a6d6e843bdd96a5e2c3a8480dc801faa88c Mon Sep 17 00:00:00 2001 From: Leo Krueger Date: Mon, 20 Jan 2014 00:04:20 +0100 Subject: [PATCH] only restart dnsmasq on file change --- updateDnsmasq.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/updateDnsmasq.sh b/updateDnsmasq.sh index 25ff966..46e0f3c 100755 --- a/updateDnsmasq.sh +++ b/updateDnsmasq.sh @@ -11,10 +11,11 @@ cd $GIT_REPO 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 cp $GIT_REPO/rules /etc/dnsmasq.d/rules cp $GIT_REPO/general /etc/dnsmasq.d/general /usr/sbin/service dnsmasq restart fi +