Always depend on cephrundir

This commit is contained in:
Nico Schottelius 2018-03-08 14:14:01 +01:00
parent bfe5e19c08
commit e681eedf66

View file

@ -12,16 +12,17 @@ to_monitor=$1
set -e
depends=""
depends="cephrundir"
osd=""
conf="/etc/monit/conf.d/$to_monitor"
if echo $to_monitor | grep ^osd; then
depends="depends on ${to_monitor}-whoami"
depends="${depends}, ${to_monitor}-whoami"
osd="yes"
osdid=$(echo $to_monitor | cut -d. -f2)
fi
cat > "$conf" <<EOF
# Generated by $0
check process ${to_monitor} with pidfile /var/run/ceph/${to_monitor}.pid
@ -29,7 +30,7 @@ check process ${to_monitor} with pidfile /var/run/ceph/${to_monitor}.pid
stop program = "/etc/init.d/ceph stop ${to_monitor}"
group ceph
$depends
depends on $depends
EOF
if [ "$osd" ]; then