izmjene u update-monit.d
[monit-cn.git] / update-monit.d
index dee92dc..7de29c1 100755 (executable)
@@ -7,7 +7,7 @@
 # Free Software Foundation; either version 2 of the License, or (at your
 # option) any later version.
 
-MONIT_DIR=/etc/monit.d
+MONIT_DIR=/etc/monit/conf.d
 TEMPLATES_DIR=/usr/share/monit-cn
 
 
@@ -105,7 +105,7 @@ check_template() {
         return 0
     fi
 
-    if ! grep -q "^#.*monit-cn template file" "$filename"; then
+    if ! grep -q "^#.*monit-cn template" "$filename"; then
         RET=0
         return 0
     fi
@@ -172,7 +172,8 @@ done
 
 if [ $changed -eq 1 ]; then
     echo "CN: Stopping/restarting monit service"
-    pkill -9 -f /usr/sbin/monit || true
+    #pkill -9 -f /usr/bin/monit || true
+    service monit restart
 else
     echo "CN: No new services detected, sorry"
 fi