From: Dinko Korunic Date: Sun, 14 Oct 2007 20:41:57 +0000 (+0000) Subject: r12: - check = in monit syntax too X-Git-Tag: v4.10.1-3~25 X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=commitdiff_plain;h=2d8499aec085db578ddf5b422f21ff356ee66391;p=monit-cn.git r12: - check = in monit syntax too --- 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