[Pkg-nagios-changes] [pkg-nagios] r1749 - nagios3/trunk/debian

Alexander Wirt formorer at alioth.debian.org
Sat Sep 5 13:59:38 UTC 2009


Author: formorer
Date: 2009-09-05 13:59:38 +0000 (Sat, 05 Sep 2009)
New Revision: 1749

Modified:
   nagios3/trunk/debian/nagios3-common.postinst
   nagios3/trunk/debian/nagios3-common.postrm
Log:
Adapat post* files for the cgi move

Modified: nagios3/trunk/debian/nagios3-common.postinst
===================================================================
--- nagios3/trunk/debian/nagios3-common.postinst	2009-09-05 13:59:36 UTC (rev 1748)
+++ nagios3/trunk/debian/nagios3-common.postinst	2009-09-05 13:59:38 UTC (rev 1749)
@@ -8,18 +8,12 @@
 usn="/usr/share/nagios3"
 
 . /usr/share/debconf/confmodule
-. $usn/debian/httpd.webapps-common
 
 if [ -n "$NAG3DEBUG" ]; then
   echo "now debugging $0 $@"
   set -x
 fi
 
-# location of the default apache configuration for nagios.
-apacheconf=$en/apache2.conf
-# location of the default htpasswd authentication file.
-htpw=$en/htpasswd.users
-
 setperm() {
     local user="$1"
     local group="$2"
@@ -41,22 +35,6 @@
               --disabled-login --force-badname nagios > /dev/null
     fi
 
-	# get the list of selected servers
-	db_get nagios3/httpd
-	servers=$(echo $RET | sed -e 's/,/ /g')
-	db_get nagios3/adminpassword
-	admpass="$RET"
-	# get whether they want support for 1.x urls:
-	db_get nagios3/nagios1-in-apacheconf
-	nagiosone="$RET"
-
-	# register apache2.conf via ucf:
-	if [ "$nagiosone" = "true" ]; then
-		ucf --debconf-ok /usr/share/doc/nagios3-common/examples/apache2.nagios1.conf $apacheconf
-	else
-		ucf --debconf-ok /usr/share/doc/nagios3-common/examples/apache2.conf $apacheconf
-	fi
-
 	# and do some voodoo to detect default gw and make a host of it
 	tmpgw=$(mktemp)
 	set -- $(route -n 2>/dev/null| grep '^0.0.0.0' | head -n1)
@@ -72,26 +50,6 @@
 	# this is where the debconf-ized external command support would go
 	#ucf $usn/debian/extcommands.cfg $enc/extcommands-nagios3.cfg
 
-	# configure the web servers, if it is desired
-	if [ "$servers" ]; then
-		if wc_httpd_apache_include $apacheconf nagios3 $servers; then
-			# reload the selected servers if they are running 
-			running_servers="$(wc_httpd_running $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.
-	# XXX there's no way of setting the pw w/out giving it on the cmdline? wtf?
-	if [ -n "$admpass" ]; then
-		touch "$htpw"
-		htpasswd -b "$htpw" nagiosadmin "$admpass"
-	fi
-
 	# explicitly set permissions on some files that are dependent
 	# on the uid/gid of the nagios user, which is dynamically created.
         setperm root nagios 0640 $en/resource.cfg
@@ -104,10 +62,6 @@
         setperm nagios www-data 02750 /var/cache/nagios3
         setperm nagios www-data 0700 /var/lib/nagios3/rw
 
-	# everything went well, so now let's reset the password
-	db_set nagios3/adminpassword ""
-	db_set nagios3/adminpassword-repeat ""
-	# ... done with debconf here
 	db_stop
     ;;
   abort-upgrade|abort-remove|abort-deconfigure)

Modified: nagios3/trunk/debian/nagios3-common.postrm
===================================================================
--- nagios3/trunk/debian/nagios3-common.postrm	2009-09-05 13:59:36 UTC (rev 1748)
+++ nagios3/trunk/debian/nagios3-common.postrm	2009-09-05 13:59:38 UTC (rev 1749)
@@ -17,12 +17,9 @@
 	done
         rm -rf /var/run/nagios3 /var/log/nagios3 /var/lib/nagios3 \
 	       /var/cache/nagios3
-	rm -f /etc/nagios3/htpasswd.users
-	rm -f /etc/nagios3/apache2.conf
 	rm -f /etc/nagios3/conf.d/host-gateway_nagios3.cfg
 	#rm -f /etc/nagios3/conf.d/extcommands_nagios3.cfg
 	if which ucf >/dev/null 2>&1; then
-		ucf --purge /etc/nagios3/apache2.conf
 		ucf --purge /etc/nagios3/conf.d/host-gateway_nagios3.cfg
 		#ucf --purge /etc/nagios3/conf.d/extcommands_nagios3.cfg
 	fi




More information about the Pkg-nagios-changes mailing list