Race condition? Sleep after creating service

This commit is contained in:
Nico Schottelius 2018-02-22 13:22:02 +01:00
parent 1eb3a1c64b
commit 4d1bb04557

View file

@ -10,6 +10,8 @@ fi
to_monitor=$1 to_monitor=$1
set -e
set -x
cat > "/etc/monit/conf-enabled/$to_monitor" <<EOF cat > "/etc/monit/conf-enabled/$to_monitor" <<EOF
# Auto generated by $0 # Auto generated by $0
@ -21,4 +23,5 @@ check process $to_monitor with pidfile /var/run/ceph/${to_monitor}.pid
EOF EOF
monit reload monit reload
sleep 1
monit start "$to_monitor" monit start "$to_monitor"