r12: - check = in monit syntax too
authorDinko Korunic <Dinko.Korunic@CARNet.hr>
Sun, 14 Oct 2007 20:41:57 +0000 (20:41 +0000)
committerDinko Korunic <Dinko.Korunic@CARNet.hr>
Sun, 14 Oct 2007 20:41:57 +0000 (20:41 +0000)
update-monit.d

index 05472e9..e5235e6 100755 (executable)
@@ -34,7 +34,7 @@ check_service() {
     scriptinit='BEGIN { RS = "[ \t\n]+" }
                { line[NR] = $0 "" }
          END { for (j in line)
-                if (((line[j] == "start") || (line[j] == "stop")) && (line[j + 1] == "program"))
+                if (((line[j] == "start") || (line[j] == "stop")) && (line[j + 1] == "program") && (line[j + 2] == "="))
                     print line[j + 3] }'
     initscripts=$(awk "$scriptinit" < "$filename" | sed -e 's/"//g')
     check_initscript $initscripts