Fixed post-install logic for Debian
This commit is contained in:
parent
b60f383f48
commit
bb703e2964
@ -16,6 +16,8 @@ chown -R root:root /opt/hc /etc/opt/hc 2>/dev/null
|
|||||||
chown root:root /etc/logrotate.d/check_health 2>/dev/null
|
chown root:root /etc/logrotate.d/check_health 2>/dev/null
|
||||||
chmod 644 /etc/logrotate.d/check_health 2>/dev/null
|
chmod 644 /etc/logrotate.d/check_health 2>/dev/null
|
||||||
# copy configuration files
|
# copy configuration files
|
||||||
|
if [[ -f ${HC_ETC_DIR}/core/check_health.conf.dist ]]
|
||||||
|
then
|
||||||
if [[ ! -f ${HC_ETC_DIR}/core/check_health.conf ]]
|
if [[ ! -f ${HC_ETC_DIR}/core/check_health.conf ]]
|
||||||
then
|
then
|
||||||
# copy main configuration file
|
# copy main configuration file
|
||||||
@ -26,6 +28,11 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echo "WARN: could not check_health config .dist file in ${HC_ETC_DIR}/core"
|
||||||
|
fi
|
||||||
|
if [[ -f ${HC_ETC_DIR}/check_host.conf.dist ]]
|
||||||
|
then
|
||||||
if [[ ! -f ${HC_ETC_DIR}/check_host.conf ]]
|
if [[ ! -f ${HC_ETC_DIR}/check_host.conf ]]
|
||||||
then
|
then
|
||||||
# copy host check configuration file
|
# copy host check configuration file
|
||||||
@ -36,6 +43,9 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echo "WARN: could not find check_host config .dist file in ${HC_ETC_DIR}"
|
||||||
|
fi
|
||||||
# refresh symbolic FPATH links for core includes & plugins
|
# refresh symbolic FPATH links for core includes & plugins
|
||||||
if [[ -x ${HC_BIN} ]]
|
if [[ -x ${HC_BIN} ]]
|
||||||
then
|
then
|
||||||
|
@ -10,6 +10,8 @@ echo "INFO: starting post-install script ..."
|
|||||||
# debian: reset ownerships
|
# debian: reset ownerships
|
||||||
chown -R root:root /opt/hc /etc/opt/hc 2>/dev/null
|
chown -R root:root /opt/hc /etc/opt/hc 2>/dev/null
|
||||||
# copy plugin configuration file
|
# copy plugin configuration file
|
||||||
|
if [[ -f ${HC_ETC_DIR}/core/providers/notify_eif.conf.dist ]]
|
||||||
|
then
|
||||||
if [[ ! -f ${HC_ETC_DIR}/core/providers/notify_eif.conf ]]
|
if [[ ! -f ${HC_ETC_DIR}/core/providers/notify_eif.conf ]]
|
||||||
then
|
then
|
||||||
cp -p ${HC_ETC_DIR}/core/providers/notify_eif.conf.dist ${HC_ETC_DIR}/core/providers/notify_eif.conf >/dev/null
|
cp -p ${HC_ETC_DIR}/core/providers/notify_eif.conf.dist ${HC_ETC_DIR}/core/providers/notify_eif.conf >/dev/null
|
||||||
@ -19,6 +21,9 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echo "WARN: could not find plugin config .dist file in ${HC_ETC_DIR}/core/providers"
|
||||||
|
fi
|
||||||
# refresh symbolic FPATH links
|
# refresh symbolic FPATH links
|
||||||
if [[ -x ${HC_BIN} ]]
|
if [[ -x ${HC_BIN} ]]
|
||||||
then
|
then
|
||||||
|
@ -10,6 +10,8 @@ echo "INFO: starting post-install script ..."
|
|||||||
# debian: reset ownerships
|
# debian: reset ownerships
|
||||||
chown -R root:root /opt/hc /etc/opt/hc 2>/dev/null
|
chown -R root:root /opt/hc /etc/opt/hc 2>/dev/null
|
||||||
# copy plugin configuration file
|
# copy plugin configuration file
|
||||||
|
if [[ -f ${HC_ETC_DIR}/core/providers/notify_sms.conf.dist ]]
|
||||||
|
then
|
||||||
if [[ ! -f ${HC_ETC_DIR}/core/providers/notify_sms.conf ]]
|
if [[ ! -f ${HC_ETC_DIR}/core/providers/notify_sms.conf ]]
|
||||||
then
|
then
|
||||||
cp -p ${HC_ETC_DIR}/core/providers/notify_sms.conf.dist ${HC_ETC_DIR}/core/providers/notify_sms.conf >/dev/null
|
cp -p ${HC_ETC_DIR}/core/providers/notify_sms.conf.dist ${HC_ETC_DIR}/core/providers/notify_sms.conf >/dev/null
|
||||||
@ -19,6 +21,9 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echo "WARN: could not find plugin config .dist file in ${HC_ETC_DIR}/core/providers"
|
||||||
|
fi
|
||||||
# refresh symbolic FPATH links
|
# refresh symbolic FPATH links
|
||||||
if [[ -x ${HC_BIN} ]]
|
if [[ -x ${HC_BIN} ]]
|
||||||
then
|
then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user