From 2d8499aec085db578ddf5b422f21ff356ee66391 Mon Sep 17 00:00:00 2001 From: Dinko Korunic Date: Sun, 14 Oct 2007 20:41:57 +0000 Subject: [PATCH] r12: - check = in monit syntax too --- update-monit.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update-monit.d b/update-monit.d index 05472e9..e5235e6 100755 --- a/update-monit.d +++ b/update-monit.d @@ -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 -- 1.7.10.4