forked from dago/check_mk
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.f12
26 lines (24 loc) · 926 Bytes
/
.f12
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
SITE=${SITE:-$(cat .site || true)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
sed -e "s#@BINDIR@#/omd/sites/$SITE/bin#g" \
-e "s#@VARDIR@#/omd/sites/$SITE/var/check_mk#g" \
-e "s#@CHECK_ICMP@#/omd/sites/$SITE/lib/nagios/plugins/check_icmp#g" \
-e "s#@PNPURL@#/$SITE/pnp4nagios/#g" \
-e "s#@CGIURL@#/$SITE/nagios/cgi-bin#g" \
< check_mk_templates.cfg > /tmp/check_mk_templates.cfg
sudo mv /tmp/check_mk_templates.cfg /omd/sites/$SITE/etc/nagios/conf.d
for dir in doc web modules checks checkman mkeventd notifications agents livestatus pnp-templates
do
echo "*******************************************************"
echo "VERZEICHNIS $dir **********************************"
echo "*******************************************************"
cd $dir
if bash .f12 ; then
echo "OK."
else
echo "FEHLER in $dir. Abbruch"
exit 1
fi
cd ..
done