check that munin-cron is not running (via cron) when it is run in setup, fixes #660 (#1579)

This commit is contained in:
jvolkenant 2019-05-15 11:58:40 -07:00 committed by Joshua Tauberer
parent 85e59245fd
commit c6fa0d23df
1 changed files with 5 additions and 1 deletions

View File

@ -76,4 +76,8 @@ restart_service munin-node
# generate initial statistics so the directory isn't empty
# (We get "Pango-WARNING **: error opening config file '/root/.config/pango/pangorc': Permission denied"
# if we don't explicitly set the HOME directory when sudo'ing.)
sudo -H -u munin munin-cron
# We check to see if munin-cron is already running, if it is, there is no need to run it simultaneously
# generating an error.
if [ ! -f /var/run/munin/munin-update.lock ]; then
sudo -H -u munin munin-cron
fi