[Pkg-nagios-changes] [SCM] Debian packaging for Nagios3 branch, master, updated. 3.2.3-1-11-g5dce773
Alexander Wirt
formorer at debian.org
Sat Feb 12 10:01:49 UTC 2011
The following commit has been merged in the master branch:
commit 5121a2d2a6d6aa8612e48b2c50614f2ac0063576
Author: Alexander Wirt <formorer at debian.org>
Date: Sat Feb 12 10:34:30 2011 +0100
Support uninclude
diff --git a/debian/nagios3-cgi.postinst b/debian/nagios3-cgi.postinst
index 2ef19cd..6a333aa 100644
--- a/debian/nagios3-cgi.postinst
+++ b/debian/nagios3-cgi.postinst
@@ -51,6 +51,17 @@ case "$1" in
db_get nagios3/nagios1-in-apacheconf
nagiosone="$RET"
+ unwanted_servers=""
+
+ #check which servers to uninclude
+ for s in $wc_httpd_supported
+ do
+ if ! echo $servers | grep -q $s
+ then
+ unwanted_servers="$s $unwanted_servers"
+ fi
+ done
+
# register apache2.conf via ucf:
if [ "$nagiosone" = "true" ]; then
ucf --debconf-ok /usr/share/doc/nagios3-common/examples/apache2.nagios1.conf $apacheconf
@@ -58,6 +69,7 @@ case "$1" in
ucf --debconf-ok /usr/share/doc/nagios3-common/examples/apache2.conf $apacheconf
fi
+
# configure the web servers, if it is desired
if [ "$servers" ]; then
if wc_httpd_apache_include $apacheconf nagios3 $servers; then
@@ -69,6 +81,16 @@ case "$1" in
fi
fi
+ if [ "$unwanted_servers" ]; then
+ if wc_httpd_apache_uninclude $apacheconf nagios3 $unwanted_servers; then
+ # reload the selected servers if they are running
+ running_servers="$(wc_httpd_running $unwanted_servers)"
+ if [ "$running_servers" ]; then
+ wc_httpd_invoke "reload" $running_servers
+ fi
+ fi
+ fi
+
# we reset the password every run, so if it exists we're running
# after being specifically given a password and can unconditionally set it.
--
Debian packaging for Nagios3
More information about the Pkg-nagios-changes
mailing list