[Pkg-nagios-changes] [icinga] 15/36: Create /var/run/icinga in idoutils init script too.

Bas Couwenberg sebastic at debian.org
Sun Dec 18 16:10:35 UTC 2016


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch modern-packaging
in repository icinga.

commit d4a4ed1331decb18889b9d2f9b1f5e0ffef38ced
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Fri Dec 16 20:27:33 2016 +0100

    Create /var/run/icinga in idoutils init script too.
---
 debian/changelog                   | 1 +
 debian/icinga-idoutils.ido2db.init | 9 +++++++++
 2 files changed, 10 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 30fcc69..73f12f6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,6 +15,7 @@ icinga (1.13.3-4) UNRELEASED; urgency=medium
   * Fix duplicate short description and spelling errors in long description.
   * Drop unused override for package-contains-empty-directory.
   * Add comments to lintian overrides.
+  * Create /var/run/icinga in idoutils init script too.
 
  -- Bas Couwenberg <sebastic at debian.org>  Sat, 03 Dec 2016 23:27:06 +0100
 
diff --git a/debian/icinga-idoutils.ido2db.init b/debian/icinga-idoutils.ido2db.init
index 36e4bf9..4583e05 100644
--- a/debian/icinga-idoutils.ido2db.init
+++ b/debian/icinga-idoutils.ido2db.init
@@ -45,6 +45,14 @@ if [ "$IDO2DB" != "yes"  ]; then
     exit 0
 fi
 
+check_run () {
+	if [ ! -d '/var/run/icinga' ];
+	then
+		mkdir /var/run/icinga
+		chown nagios:nagios /var/run/icinga
+		chmod 0750 /var/run/icinga
+	fi
+}
 
 check_started () {
 	start-stop-daemon --quiet --pidfile $PIDFILE --exec $DAEMON --status > /dev/null 
@@ -132,6 +140,7 @@ do_stop()
 	return "$RETVAL"
 }
 
+check_run
 
 case "$1" in
   start)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-nagios/icinga.git



More information about the Pkg-nagios-changes mailing list