summaryrefslogtreecommitdiffstats
path: root/start-munin.sh
diff options
context:
space:
mode:
Diffstat (limited to 'start-munin.sh')
-rw-r--r--start-munin.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/start-munin.sh b/start-munin.sh
index b2a6d78..c3aa70b 100644
--- a/start-munin.sh
+++ b/start-munin.sh
@@ -88,14 +88,16 @@ fi
/usr/sbin/munin-node
echo "Using the following munin nodes:"
echo $NODES
-# start apache
+# start nginx
/usr/sbin/nginx
# show logs
echo "Tailing /var/log/syslog..."
tail -F /var/log/syslog /var/log/munin/munin-update.log & pid=$!
+echo "tail -F running in $pid"
sleep 1
-trap "kill $pid $(cat /var/run/munin/munin-node.pid) $(cat /var/run/nginx.pid) $(cat /var/run/crond.pid) $(cat /var/run/rsyslogd.pid)" TERM QUIT INT
+trap "echo 'stopping processes' ; kill $pid $(cat /var/run/munin/munin-node.pid) $(cat /var/run/nginx.pid) $(cat /var/run/crond.pid) $(cat /var/run/rsyslogd.pid)" SIGTERM SIGINT
+echo "Waiting for signal SIGINT/SIGTERM"
wait