From 77b0c81178599d6b5ea78d2e9c235165c11c21c2 Mon Sep 17 00:00:00 2001 From: Lisa Marie Maginnis Date: Wed, 28 May 2014 16:33:28 -0400 Subject: [PATCH] Fixed logic issues around multiple host/vhost pairs --- nagios-website-add.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nagios-website-add.sh b/nagios-website-add.sh index 6367fa3..749a651 100755 --- a/nagios-website-add.sh +++ b/nagios-website-add.sh @@ -50,6 +50,7 @@ function write-config-header() { function write-config-footer() { echo "# END $host:$website" + echo } function write-config-body() { @@ -63,7 +64,7 @@ function write-config-body() { } function delete-monitors() { - sed '/^# AUTOGENERATED CONFIG FOR HOST: '$host':'$website'$/,/^# END '$host'$/d' -i $config_file_web + sed '/^# AUTOGENERATED CONFIG FOR HOST: '$host':'$website'$/,/^# END '$host':'$website'$/d' -i $config_file_web } # Process our args -- 2.25.1