[Pkg-nagios-changes] [SCM] Debian packaging for Nagios3 branch, master, updated. 3.2.3-1-5-gb2fed62

Alexander Wirt formorer at debian.org
Sun Jan 2 09:01:06 UTC 2011


The following commit has been merged in the master branch:
commit ccff9d1e3b42d386f2eebee82bdf097f6a0b4cb4
Author: Alexander Wirt <formorer at debian.org>
Date:   Sun Jan 2 09:35:54 2011 +0100

    Add option in default file to disable nagios3 at boottime (Closes: #602490)

diff --git a/debian/nagios3-common.nagios3.default b/debian/nagios3-common.nagios3.default
index d30d524..5ea3b82 100644
--- a/debian/nagios3-common.nagios3.default
+++ b/debian/nagios3-common.nagios3.default
@@ -1,5 +1,9 @@
 # /etc/default/nagios3
 
+# Enable Nagios3 at boottime? ("no" disables nagios3)
+# compatibility note: if this variable is _not_ found Nagios3 will start
+ENABLED="yes"
+
 # location of the nagios configuration file
 NAGIOSCFG="/etc/nagios3/nagios.cfg"
 
diff --git a/debian/nagios3-common.nagios3.init b/debian/nagios3-common.nagios3.init
index c09361f..2e3c432 100644
--- a/debian/nagios3-common.nagios3.init
+++ b/debian/nagios3-common.nagios3.init
@@ -124,6 +124,12 @@ THEPIDFILE=$(get_config "lock_file")
 [ -n "$THEPIDFILE" ] || THEPIDFILE='/var/run/nagios3/nagios.pid'
 
 start () {
+
+  if [ "$ENABLED" = "no"  ]; then
+	  log_warning_msg "Not starting Nagios3 - set ENABLED to yes in /etc/defrault/nagios3"
+	  exit 0
+  fi
+
   DIRECTORY=$(dirname $THEPIDFILE)
   [ ! -d $DIRECTORY ] && mkdir -p $DIRECTORY
   chown nagios:nagios $DIRECTORY

-- 
Debian packaging for Nagios3



More information about the Pkg-nagios-changes mailing list