exim blacklist: use simpler matches
[mirror/dsa-puppet.git] / modules / ntp / files / ntp-restart-if-required
index f8ea5cc..bb15f84 100755 (executable)
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
+
 [ -e /usr/lib/nagios/plugins/dsa-check-timedatectl ] || exit
 
 /usr/lib/nagios/plugins/dsa-check-timedatectl -s >/dev/null 2>/dev/null
@@ -7,7 +9,7 @@ rc=$?
 
 case "$rc" in
   1|2)
-    pid=$(pgrep -u ntp ntp)
+    pid=$(pgrep -u ntp ntpd)
     if [ -z "$pid" ]; then
       service ntp restart
       exit