X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=update-monit.d;fp=update-monit.d;h=e5235e6cdd8318bfcdc6f14f2275d7d61c55a247;hb=2d8499aec085db578ddf5b422f21ff356ee66391;hp=05472e9342d5e7add1f195932678e3679e695f0a;hpb=3e78f0a9ab1bc06ccb8406d01bf8b3defd403916;p=monit-cn.git 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