[packages/nagios-ndoutils] Remove stale UNIX socket before starting
jajcus
jajcus at pld-linux.org
Thu Dec 13 09:33:07 CET 2012
commit 559da4d7d45229fc53f56d23fcfcb00a057d3267
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date: Thu Dec 13 09:32:14 2012 +0100
Remove stale UNIX socket before starting
The socket file could stay after system crash and would prevent
ndo2db from starting.
ndo2db.init | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/ndo2db.init b/ndo2db.init
index 4d97f9e..8df7d7f 100644
--- a/ndo2db.init
+++ b/ndo2db.init
@@ -39,6 +39,7 @@ fi
# Set defaults
configfile=/etc/nagios/ndo2db.cfg
pidfile=/var/lib/nagios/ndo2db.pid
+socketfile=/var/lib/nagios/ndo.sock
# Get service config - may override defaults
[ -f /etc/sysconfig/ndo2db ] && . /etc/sysconfig/ndo2db
@@ -50,6 +51,10 @@ start() {
return
fi
+ if [ -e "$socketfile" ] ; then
+ rm "$socketfile"
+ fi
+
msg_starting "Nagios NDO2DB"
daemon /usr/sbin/ndo2db -c $configfile
RETVAL=$?
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/nagios-ndoutils.git/commitdiff/559da4d7d45229fc53f56d23fcfcb00a057d3267
More information about the pld-cvs-commit
mailing list