diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2019-08-29 00:31:36 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2019-08-29 00:31:36 +0200 |
commit | 4d5bc7291ed8c6df4eb34e7b3e7ebd5bf164e718 (patch) | |
tree | ff1ce3626b4dafe15c6eafdaf6627a39bc7ade1d /start-munin.sh | |
parent | 22d3c280de70895fe5df15d4f57a87be17362a51 (diff) | |
download | munin-4d5bc7291ed8c6df4eb34e7b3e7ebd5bf164e718.tar.gz munin-4d5bc7291ed8c6df4eb34e7b3e7ebd5bf164e718.tar.bz2 munin-4d5bc7291ed8c6df4eb34e7b3e7ebd5bf164e718.tar.xz munin-4d5bc7291ed8c6df4eb34e7b3e7ebd5bf164e718.zip |
Pre-intialize data folder
Diffstat (limited to 'start-munin.sh')
-rwxr-xr-x | start-munin.sh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/start-munin.sh b/start-munin.sh index 564eada..63f5732 100755 --- a/start-munin.sh +++ b/start-munin.sh @@ -140,9 +140,15 @@ echo "Using the following munin nodes:" echo $NODES echo "(ssh) $SSH_NODES" echo "(snmp) $SNMP_NODES" + +# Pregenerate data +echo "First run" +munin-cron + +echo "Start data servers" # start spawn-cgi to enable CGI interface with munin (dynamix graph generation) -spawn-fcgi -p 9000 /usr/lib/munin/cgi/munin-cgi-graph -spawn-fcgi -p 9001 /usr/lib/munin/cgi/munin-cgi-html +spawn-fcgi -n -p 9000 /usr/lib/munin/cgi/munin-cgi-graph & graph_pid=$! +spawn-fcgi -n -p 9001 /usr/lib/munin/cgi/munin-cgi-html & html_pid=$1 # start nginx /usr/sbin/nginx # show logs @@ -152,7 +158,7 @@ echo "tail -F running in $pid" sleep 1 -trap "echo 'stopping processes' ; kill $pid $cron_pid $(cat /tmp/nginx.pid) $(cat /tmp/rsyslogd.pid)" SIGTERM SIGINT +trap "echo 'stopping processes' ; kill $pid $cron_pid $graph_pid $html_pid $(cat /tmp/nginx.pid) $(cat /tmp/rsyslogd.pid)" SIGTERM SIGINT echo "Waiting for signal SIGINT/SIGTERM" wait |