Commit 64be6c1c authored by Marian Babik's avatar Marian Babik
Browse files

main.mk fix

parent d066fb9d
......@@ -75,7 +75,11 @@ echo "Configuring main.mk: $ETF_HOSTED_BY"
if [ -z "${ETF_HOSTED_BY}" ]; then
echo " Variable ETF_HOSTED_BY is not defined, not touching main.mk"
else
sed "s/all_hosts.*/all_hosts += [ \"${ETF_HOSTED_BY}\" ]/g" -i /opt/omd/sites/$CHECK_MK_SITE/etc/check_mk/main.mk
if grep -q all_hosts /opt/omd/sites/$CHECK_MK_SITE/etc/check_mk/main.mk; then
sed "s/all_hosts.*/all_hosts += [ \"${ETF_HOSTED_BY}\" ]/g" -i /opt/omd/sites/$CHECK_MK_SITE/etc/check_mk/main.mk
else
echo "all_hosts += [ \"${ETF_HOSTED_BY}\" ]" >> /opt/omd/sites/$CHECK_MK_SITE/etc/check_mk/main.mk
fi
fi
echo "Configuring ETF ..."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment