[omd-commits] OMD Git: omd: cleanup checkresults dir of Nagios when (re-)starting Nagios

git version control git at mathias-kettner.de
Sat Oct 19 18:48:13 CEST 2013


Module:   omd
Branch:   master
Commit:   4a6a5af72666223594be8ae235e97c9db03331c7
URL:      http://omdistro.org/projects/omd/repository/revisions/4a6a5af72666223594be8ae235e97c9db03331c7

Author:   Mathias Kettner <mk at mathias-kettner.de>
Date:     Fri Oct 18 21:47:42 2013 -0400
Commiter: Mathias Kettner <mk at mathias-kettner.de>
Date:     Fri Oct 18 21:47:42 2013 -0400

cleanup checkresults dir of Nagios when (re-)starting Nagios

---

 Changelog                              |    1 +
 packages/nagios/skel/etc/init.d/nagios |    2 ++
 2 files changed, 3 insertions(+)

diff --git a/Changelog b/Changelog
index 3cc9295..014be20 100644
--- a/Changelog
+++ b/Changelog
@@ -17,6 +17,7 @@ This file documents the revision history for the Open Monitoring Distribution
           - gearmand: increase open files limit
           - Fix bug on Debian/Ubuntu where start/stop script started/stopped
              sites multiple times
+          - cleanup checkresults dir of Nagios when (re-)starting Nagios
 
 1.00     Jun 17 2013
           - Nagios: Update to 3.5.0
diff --git a/packages/nagios/skel/etc/init.d/nagios b/packages/nagios/skel/etc/init.d/nagios
index 363e17b..8646045 100755
--- a/packages/nagios/skel/etc/init.d/nagios
+++ b/packages/nagios/skel/etc/init.d/nagios
@@ -45,6 +45,7 @@ STATUS_FILE=###ROOT###/tmp/nagios/status.dat
 CMD_FILE=###ROOT###/tmp/run/nagios.cmd
 PID_FILE=###ROOT###/tmp/lock/nagios.lock
 STATUS_DAT=###ROOT###/tmp/nagios/status.dat
+CHECKRESULTS_DIR=###ROOT###/tmp/nagios/checkresults
 USR=###SITE###
 GRP=###SITE###
 
@@ -109,6 +110,7 @@ prep_start() {
     fi
     touch $PID_FILE
     chown $USR:$GRP $PID_FILE
+    rm -f $CHECKRESULTS_DIR/*
 }
 
 nagios_wait_stop() {



More information about the omd-commits mailing list