[Pkg-nagios-changes] [pkg-nagios] r34 - nagios2/trunk/debian

Sean Finney seanius at costa.debian.org
Mon Jan 2 10:46:55 UTC 2006


Author: seanius
Date: 2006-01-02 10:46:53 +0000 (Mon, 02 Jan 2006)
New Revision: 34

Added:
   nagios2/trunk/debian/nagios2-common.prerm
Modified:
   nagios2/trunk/debian/TODO
   nagios2/trunk/debian/cfg-cgi.cfg.diff
   nagios2/trunk/debian/cfg-nagios.cfg.diff
   nagios2/trunk/debian/nagios2-common.dirs
   nagios2/trunk/debian/nagios2-common.postinst
   nagios2/trunk/debian/rules
Log:
- updates for defaults in some of the configs diffs.
- permissions on /var/cache/nagios2
- forgot to add the prerm script


Modified: nagios2/trunk/debian/TODO
===================================================================
--- nagios2/trunk/debian/TODO	2006-01-01 01:06:38 UTC (rev 33)
+++ nagios2/trunk/debian/TODO	2006-01-02 10:46:53 UTC (rev 34)
@@ -6,3 +6,5 @@
   quite right it seems.
 - would be nice to manage apache2.conf via ucf, and make 
   nagios 1.x url support in the file a debconf option.
+- good working default config, at least monitoring the freebies (disk,
+  swap, etc) on localhost.

Modified: nagios2/trunk/debian/cfg-cgi.cfg.diff
===================================================================
--- nagios2/trunk/debian/cfg-cgi.cfg.diff	2006-01-01 01:06:38 UTC (rev 33)
+++ nagios2/trunk/debian/cfg-cgi.cfg.diff	2006-01-02 10:46:53 UTC (rev 34)
@@ -1,5 +1,5 @@
---- sample-config/cgi.cfg	2005-12-21 19:52:44.274923000 +0000
-+++ debian-configs/cgi.cfg	2005-12-21 19:53:49.811018750 +0000
+--- sample-config/cgi.cfg	2006-01-02 11:14:10.000000000 +0100
++++ debian-configs/cgi.cfg	2006-01-02 11:15:54.000000000 +0100
 @@ -1,8 +1,6 @@
  #################################################################
  #
@@ -15,7 +15,54 @@
  # use different command line arguments/syntaxes.
  
 -#nagios_check_command=/usr/lib/nagios/plugins/check_nagios /var/lib/nagios2/status.dat 5 '/usr/sbin/nagios'
-+nagios_check_command=/usr/lib/nagios/plugins/check_nagios /var/lib/nagios2/status.dat 5 '/usr/sbin/nagios2'
++nagios_check_command=/usr/lib/nagios/plugins/check_nagios /var/cache/nagios2/status.dat 5 '/usr/sbin/nagios2'
  
  
  
+@@ -113,7 +111,7 @@
+ # not use authorization.  You may use an asterisk (*) to
+ # authorize any user who has authenticated to the web server.
+ 
+-#authorized_for_system_information=nagiosadmin,theboss,jdoe
++authorized_for_system_information=nagiosadmin
+ 
+ 
+ 
+@@ -125,7 +123,7 @@
+ # an asterisk (*) to authorize any user who has authenticated
+ # to the web server.
+ 
+-#authorized_for_configuration_information=nagiosadmin,jdoe
++authorized_for_configuration_information=nagiosadmin
+ 
+ 
+ 
+@@ -138,7 +136,7 @@
+ # You may use an asterisk (*) to authorize any user who has
+ # authenticated to the web server.
+ 
+-#authorized_for_system_commands=nagiosadmin
++authorized_for_system_commands=nagiosadmin
+ 
+ 
+ 
+@@ -151,6 +149,8 @@
+ # to authorize any user who has authenticated to the web server.
+ 
+ 
++authorized_for_all_services=nagiosadmin
++authorized_for_all_hosts=nagiosadmin
+ #authorized_for_all_services=nagiosadmin,guest
+ #authorized_for_all_hosts=nagiosadmin,guest
+ 
+@@ -165,8 +165,8 @@
+ # authorization).  You may use an asterisk (*) to authorize any
+ # user who has authenticated to the web server.
+ 
+-#authorized_for_all_service_commands=nagiosadmin
+-#authorized_for_all_host_commands=nagiosadmin
++authorized_for_all_service_commands=nagiosadmin
++authorized_for_all_host_commands=nagiosadmin
+ 
+ 
+ 

Modified: nagios2/trunk/debian/cfg-nagios.cfg.diff
===================================================================
--- nagios2/trunk/debian/cfg-nagios.cfg.diff	2006-01-01 01:06:38 UTC (rev 33)
+++ nagios2/trunk/debian/cfg-nagios.cfg.diff	2006-01-02 10:46:53 UTC (rev 34)
@@ -14,6 +14,15 @@
  #
  ##############################################################################
  
+@@ -16,7 +10,7 @@
+ # for historical purposes.  This should be the first option specified
+ # in the config file!!!
+
+-log_file=/var/lib/nagios2/nagios.log
++log_file=/var/log/nagios2/nagios.log
+
+
+
 @@ -40,11 +34,13 @@
  cfg_file=/etc/nagios2/misccommands.cfg
  
@@ -54,7 +63,7 @@
  # time its contents are processed.
  
 -command_file=/var/lib/nagios2/rw/nagios.cmd
-+command_file=/var/cache/nagios2/rw/nagios.cmd
++command_file=/var/lib/nagios2/nagios.cmd
  
  
  

Modified: nagios2/trunk/debian/nagios2-common.dirs
===================================================================
--- nagios2/trunk/debian/nagios2-common.dirs	2006-01-01 01:06:38 UTC (rev 33)
+++ nagios2/trunk/debian/nagios2-common.dirs	2006-01-02 10:46:53 UTC (rev 34)
@@ -3,6 +3,6 @@
 usr/lib/nagios/plugins/eventhandlers
 var/lib/nagios2/rw
 var/log/nagios2
+var/run/nagios2
 var/cache/nagios2
-var/run/nagios2
 usr/share/nagios2/debian

Modified: nagios2/trunk/debian/nagios2-common.postinst
===================================================================
--- nagios2/trunk/debian/nagios2-common.postinst	2006-01-01 01:06:38 UTC (rev 33)
+++ nagios2/trunk/debian/nagios2-common.postinst	2006-01-02 10:46:53 UTC (rev 34)
@@ -41,7 +41,7 @@
 	# XXX find a better way...
 	htpw="/etc/nagios2/htpasswd.users"
 	if [ "$admpass" ] && [ ! -f "$htpw" ]; then
-		htpasswd -c "htpw" "$admuser" "$admpass"
+		htpasswd -bc "$htpw" "$admuser" "$admpass"
 	fi
 
 	chown root:nagios /etc/nagios2/resource.cfg
@@ -50,7 +50,7 @@
     install -d -onagios -gnagios -m750 /var/run/nagios2
     install -d -onagios -gnagios -m750 /var/lib/nagios2
     install -d -onagios -gnagios -m750 /var/lib/nagios2/rw2
-    install -d -onagios -gnagios -m750 /var/cache/nagios2
+    install -d -onagios -gwww-data -m2750 /var/cache/nagios2
     ;;
   abort-upgrade|abort-remove|abort-deconfigure)
     ;;

Added: nagios2/trunk/debian/nagios2-common.prerm
===================================================================
--- nagios2/trunk/debian/nagios2-common.prerm	2006-01-01 01:06:38 UTC (rev 33)
+++ nagios2/trunk/debian/nagios2-common.prerm	2006-01-02 10:46:53 UTC (rev 34)
@@ -0,0 +1,23 @@
+#!/bin/sh -e
+
+. /usr/share/nagios2/debian/httpd.webapps-common
+
+apacheconf="/etc/nagios2/apache2.conf"
+
+case "$1" in
+  remove)
+	# find the configured servers
+	configured_servers=`wc_httpd_apache_configured $apacheconf nagios2`
+	if [ "$configured_servers" ]; then
+		# deconfigure them
+		wc_httpd_apache_uninclude $apacheconf nagios2 $configured_servers
+		# reload the configured servers if they are running 
+		running_servers="`wc_httpd_running $configured_servers`"
+		if [ "$running_servers" ]; then
+			wc_httpd_invoke "reload" $running_servers
+		fi
+	fi
+    ;;
+esac
+
+#DEBHELPER#

Modified: nagios2/trunk/debian/rules
===================================================================
--- nagios2/trunk/debian/rules	2006-01-01 01:06:38 UTC (rev 33)
+++ nagios2/trunk/debian/rules	2006-01-02 10:46:53 UTC (rev 34)
@@ -128,6 +128,9 @@
 	rm -rf $b/nagios2/usr/share/nagios2
 	# remove empty directory
 	rmdir --ignore-fail-on-non-empty -p $b/nagios2/var/lib/nagios2/archives
+	# set up /var/cache/nagios2 for access by www-data
+	chgrp www-data $b/nagios2-common/var/cache/nagios2
+	chmod g+s $b/nagios2-common/var/cache/nagios2
 	dh_link -a
 	touch install-stamp
 
@@ -139,7 +142,7 @@
 	dh_install           -a
 	dh_strip             -a
 	dh_compress          -a
-	dh_fixperms          -a
+	dh_fixperms          -a -X/var/cache/nagios2
 	dh_installdeb        -a
 	dh_shlibdeps         -a
 	dh_gencontrol        -a




More information about the Pkg-nagios-changes mailing list