#!/bin/sh # Nico Schottelius, 2018-02-22 # Copyright ungleich glarus ag if [ $# -ne 1 ]; then echo "$0: to monitor" echo "f.i. osd.17 or mon.server4" exit 1 fi to_monitor=$1 set -e set -x depends="" osd="" conf="/etc/monit/conf.d/$to_monitor" if echo $to_monitor | grep ^osd; then depends="depends on ${to_monitor}-whoami" osd="yes" osdid=$(echo $to_monitor | cut -d. -f2) fi cat > "$conf" <> "$conf" <