Always depend on cephrundir
This commit is contained in:
parent
bfe5e19c08
commit
e681eedf66
1 changed files with 4 additions and 3 deletions
|
@ -12,16 +12,17 @@ to_monitor=$1
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
depends=""
|
depends="cephrundir"
|
||||||
osd=""
|
osd=""
|
||||||
conf="/etc/monit/conf.d/$to_monitor"
|
conf="/etc/monit/conf.d/$to_monitor"
|
||||||
|
|
||||||
if echo $to_monitor | grep ^osd; then
|
if echo $to_monitor | grep ^osd; then
|
||||||
depends="depends on ${to_monitor}-whoami"
|
depends="${depends}, ${to_monitor}-whoami"
|
||||||
osd="yes"
|
osd="yes"
|
||||||
osdid=$(echo $to_monitor | cut -d. -f2)
|
osdid=$(echo $to_monitor | cut -d. -f2)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
cat > "$conf" <<EOF
|
cat > "$conf" <<EOF
|
||||||
# Generated by $0
|
# Generated by $0
|
||||||
check process ${to_monitor} with pidfile /var/run/ceph/${to_monitor}.pid
|
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}"
|
stop program = "/etc/init.d/ceph stop ${to_monitor}"
|
||||||
|
|
||||||
group ceph
|
group ceph
|
||||||
$depends
|
depends on $depends
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
if [ "$osd" ]; then
|
if [ "$osd" ]; then
|
||||||
|
|
Loading…
Reference in a new issue