Commit 20921522 authored by Marian Babik's avatar Marian Babik
Browse files

init fix

parent 84609144
......@@ -81,9 +81,9 @@ if [[ -z "${ETF_HOSTED_BY}" ]]; then
echo " Variable ETF_HOSTED_BY is not defined, not touching main.mk"
else
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
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
echo "all_hosts += [ \"${ETF_HOSTED_BY}\" ]" >> /opt/omd/sites/${CHECK_MK_SITE}/etc/check_mk/main.mk
fi
fi
......
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