From 131ec46d082787e79a7e4bb08ff984886c439fa5 Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Thu, 14 Jul 2011 05:25:13 -0400 Subject: IRC-bot: cleanup socket file on startup It may sometimes happen that the bot dies or gets killed and the socket file is not cleaned up. When using the init script with 'start', as puppet does, the socket file blocks the bot from starting. --- templates/irc_bot/Debian/nagios-nsa.sh.erb | 1 + 1 file changed, 1 insertion(+) (limited to 'templates') diff --git a/templates/irc_bot/Debian/nagios-nsa.sh.erb b/templates/irc_bot/Debian/nagios-nsa.sh.erb index 6e608db..7de660d 100644 --- a/templates/irc_bot/Debian/nagios-nsa.sh.erb +++ b/templates/irc_bot/Debian/nagios-nsa.sh.erb @@ -51,6 +51,7 @@ cleanup() { case $1 in start) + cleanup start ;; stop) -- cgit v1.2.3 From 767255d6363c33b678f1f51310b1c31964c6fd0b Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Thu, 14 Jul 2011 05:43:18 -0400 Subject: IRC-bot: fix LSB dependencies in Debian init script A misconception on my part made the dependencies "not-quite-right" (as in: the script doesn't really depend on nagios, as we would expect). This gives the IRC bot the save "level" as nagios itself. However, we'd like for nagios to be started before we start the IRC bot. --- templates/irc_bot/Debian/nagios-nsa.sh.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'templates') diff --git a/templates/irc_bot/Debian/nagios-nsa.sh.erb b/templates/irc_bot/Debian/nagios-nsa.sh.erb index 7de660d..c9d1966 100644 --- a/templates/irc_bot/Debian/nagios-nsa.sh.erb +++ b/templates/irc_bot/Debian/nagios-nsa.sh.erb @@ -2,8 +2,8 @@ ### BEGIN INIT INFO # Provides: nagios-nsa -# Required-Start: $remote_fs $syslog $nagios -# Required-Stop: $remote_fs $syslog $nagios +# Required-Start: $remote_fs $syslog nagios3 +# Required-Stop: $remote_fs $syslog nagios3 # Default-Start: 2 3 4 5 # Default-Stop: 1 6 0 # Short-Description: Nagios Simple IRC Agent -- cgit v1.2.3