summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Filion <lelutin@gmail.com>2011-01-26 12:18:55 -0500
committerGabriel Filion <lelutin@gmail.com>2011-01-26 12:18:55 -0500
commit3de9b084b260a1625bfba803a4ff4d68f89d2260 (patch)
treea17087b550bf2a0343ca0e39908f74f8b4cdefba
parent7c9f6d224d9bf66bc1c69b1baa066f98b9302999 (diff)
irc bot: Adjust arguments to start-stop-daemon
The start method lacks a parameter that sets the daemon with the right uid: --chuid The stop method does not error out when trying to stop a daemon that does not run. Now the daemon should behave better.
-rw-r--r--templates/irc_bot/nagios-nsa.sh.erb4
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/irc_bot/nagios-nsa.sh.erb b/templates/irc_bot/nagios-nsa.sh.erb
index 61cc063..6e608db 100644
--- a/templates/irc_bot/nagios-nsa.sh.erb
+++ b/templates/irc_bot/nagios-nsa.sh.erb
@@ -16,7 +16,7 @@ SOCKFILE=<%= nagios_nsa_socket %>
start() {
log_daemon_msg "Starting nagios IRC bot" "nagios-nsa"
- if start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --user nagios --exec /usr/local/bin/riseup-nagios-server.pl; then
+ if start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --user nagios --chuid nagios --exec /usr/local/bin/riseup-nagios-server.pl; then
log_end_msg 0
else
log_end_msg 1
@@ -25,7 +25,7 @@ start() {
stop () {
log_daemon_msg "Stopping nagios IRC bot" "nagios-nsa"
- if start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE; then
+ if start-stop-daemon --stop --quiet --pidfile $PIDFILE; then
log_end_msg 0
else
log_end_msg 1