Update build scripts to reset file ownerships
This commit is contained in:
parent
81f4dd6f54
commit
5de5f4404f
@ -5,10 +5,12 @@ HC_BIN="/opt/hc/bin/check_health.sh"
|
|||||||
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
|
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
|
||||||
# ------------------------- CONFIGURATION ends here ---------------------------
|
# ------------------------- CONFIGURATION ends here ---------------------------
|
||||||
echo "INFO: starting post-install script ..."
|
echo "INFO: starting post-install script ..."
|
||||||
|
# debian: reset ownerships
|
||||||
|
chown -R root:root /opt/hc /etc/opt/hc 2>/dev/null
|
||||||
# refresh symbolic FPATH links
|
# refresh symbolic FPATH links
|
||||||
if [[ -x ${HC_BIN} ]]
|
if [[ -x ${HC_BIN} ]]
|
||||||
then
|
then
|
||||||
${HC_BIN} --fix-symlinks
|
${HC_BIN} --fix-symlinks
|
||||||
(( $? == 0 )) || echo "WARN: updating symlinks failed"
|
(( $? == 0 )) || echo "WARN: updating symlinks failed"
|
||||||
fi
|
fi
|
||||||
echo "INFO: finished post-install script"
|
echo "INFO: finished post-install script"
|
||||||
|
@ -5,10 +5,12 @@ HC_BIN="/opt/hc/bin/check_health.sh"
|
|||||||
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
|
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
|
||||||
# ------------------------- CONFIGURATION ends here ---------------------------
|
# ------------------------- CONFIGURATION ends here ---------------------------
|
||||||
echo "INFO: starting post-install script ..."
|
echo "INFO: starting post-install script ..."
|
||||||
|
# debian: reset ownerships
|
||||||
|
chown -R root:root /opt/hc /etc/opt/hc 2>/dev/null
|
||||||
# refresh symbolic FPATH links
|
# refresh symbolic FPATH links
|
||||||
if [[ -x ${HC_BIN} ]]
|
if [[ -x ${HC_BIN} ]]
|
||||||
then
|
then
|
||||||
${HC_BIN} --fix-symlinks
|
${HC_BIN} --fix-symlinks
|
||||||
(( $? == 0 )) || echo "WARN: updating symlinks failed"
|
(( $? == 0 )) || echo "WARN: updating symlinks failed"
|
||||||
fi
|
fi
|
||||||
echo "INFO: finished post-install script"
|
echo "INFO: finished post-install script"
|
||||||
|
@ -5,10 +5,12 @@ HC_BIN="/opt/hc/bin/check_health.sh"
|
|||||||
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
|
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
|
||||||
# ------------------------- CONFIGURATION ends here ---------------------------
|
# ------------------------- CONFIGURATION ends here ---------------------------
|
||||||
echo "INFO: starting post-install script ..."
|
echo "INFO: starting post-install script ..."
|
||||||
|
# debian: reset ownerships
|
||||||
|
chown -R root:root /opt/hc /etc/opt/hc 2>/dev/null
|
||||||
# refresh symbolic FPATH links
|
# refresh symbolic FPATH links
|
||||||
if [[ -x ${HC_BIN} ]]
|
if [[ -x ${HC_BIN} ]]
|
||||||
then
|
then
|
||||||
${HC_BIN} --fix-symlinks
|
${HC_BIN} --fix-symlinks
|
||||||
(( $? == 0 )) || echo "WARN: updating symlinks failed"
|
(( $? == 0 )) || echo "WARN: updating symlinks failed"
|
||||||
fi
|
fi
|
||||||
echo "INFO: finished post-install script"
|
echo "INFO: finished post-install script"
|
||||||
|
@ -5,10 +5,12 @@ HC_BIN="/opt/hc/bin/check_health.sh"
|
|||||||
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
|
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
|
||||||
# ------------------------- CONFIGURATION ends here ---------------------------
|
# ------------------------- CONFIGURATION ends here ---------------------------
|
||||||
echo "INFO: starting post-install script ..."
|
echo "INFO: starting post-install script ..."
|
||||||
|
# debian: reset ownerships
|
||||||
|
chown -R root:root /opt/hc /etc/opt/hc 2>/dev/null
|
||||||
# refresh symbolic FPATH links
|
# refresh symbolic FPATH links
|
||||||
if [[ -x ${HC_BIN} ]]
|
if [[ -x ${HC_BIN} ]]
|
||||||
then
|
then
|
||||||
${HC_BIN} --fix-symlinks
|
${HC_BIN} --fix-symlinks
|
||||||
(( $? == 0 )) || echo "WARN: updating symlinks failed"
|
(( $? == 0 )) || echo "WARN: updating symlinks failed"
|
||||||
fi
|
fi
|
||||||
echo "INFO: finished post-install script"
|
echo "INFO: finished post-install script"
|
||||||
|
@ -5,10 +5,12 @@ HC_BIN="/opt/hc/bin/check_health.sh"
|
|||||||
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
|
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
|
||||||
# ------------------------- CONFIGURATION ends here ---------------------------
|
# ------------------------- CONFIGURATION ends here ---------------------------
|
||||||
echo "INFO: starting post-install script ..."
|
echo "INFO: starting post-install script ..."
|
||||||
|
# debian: reset ownerships
|
||||||
|
chown -R root:root /opt/hc /etc/opt/hc 2>/dev/null
|
||||||
# refresh symbolic FPATH links
|
# refresh symbolic FPATH links
|
||||||
if [[ -x ${HC_BIN} ]]
|
if [[ -x ${HC_BIN} ]]
|
||||||
then
|
then
|
||||||
${HC_BIN} --fix-symlinks
|
${HC_BIN} --fix-symlinks
|
||||||
(( $? == 0 )) || echo "WARN: updating symlinks failed"
|
(( $? == 0 )) || echo "WARN: updating symlinks failed"
|
||||||
fi
|
fi
|
||||||
echo "INFO: finished post-install script"
|
echo "INFO: finished post-install script"
|
||||||
|
@ -5,10 +5,12 @@ HC_BIN="/opt/hc/bin/check_health.sh"
|
|||||||
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
|
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
|
||||||
# ------------------------- CONFIGURATION ends here ---------------------------
|
# ------------------------- CONFIGURATION ends here ---------------------------
|
||||||
echo "INFO: starting post-install script ..."
|
echo "INFO: starting post-install script ..."
|
||||||
|
# debian: reset ownerships
|
||||||
|
chown -R root:root /opt/hc /etc/opt/hc 2>/dev/null
|
||||||
# refresh symbolic FPATH links
|
# refresh symbolic FPATH links
|
||||||
if [[ -x ${HC_BIN} ]]
|
if [[ -x ${HC_BIN} ]]
|
||||||
then
|
then
|
||||||
${HC_BIN} --fix-symlinks
|
${HC_BIN} --fix-symlinks
|
||||||
(( $? == 0 )) || echo "WARN: updating symlinks failed"
|
(( $? == 0 )) || echo "WARN: updating symlinks failed"
|
||||||
fi
|
fi
|
||||||
echo "INFO: finished post-install script"
|
echo "INFO: finished post-install script"
|
||||||
|
@ -5,10 +5,12 @@ HC_BIN="/opt/hc/bin/check_health.sh"
|
|||||||
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
|
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
|
||||||
# ------------------------- CONFIGURATION ends here ---------------------------
|
# ------------------------- CONFIGURATION ends here ---------------------------
|
||||||
echo "INFO: starting post-install script ..."
|
echo "INFO: starting post-install script ..."
|
||||||
|
# debian: reset ownerships
|
||||||
|
chown -R root:root /opt/hc /etc/opt/hc 2>/dev/null
|
||||||
# refresh symbolic FPATH links
|
# refresh symbolic FPATH links
|
||||||
if [[ -x ${HC_BIN} ]]
|
if [[ -x ${HC_BIN} ]]
|
||||||
then
|
then
|
||||||
${HC_BIN} --fix-symlinks
|
${HC_BIN} --fix-symlinks
|
||||||
(( $? == 0 )) || echo "WARN: updating symlinks failed"
|
(( $? == 0 )) || echo "WARN: updating symlinks failed"
|
||||||
fi
|
fi
|
||||||
echo "INFO: finished post-install script"
|
echo "INFO: finished post-install script"
|
||||||
|
@ -11,6 +11,10 @@ HC_BIN="/opt/hc/bin/check_health.sh"
|
|||||||
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
|
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
|
||||||
# ------------------------- CONFIGURATION ends here ---------------------------
|
# ------------------------- CONFIGURATION ends here ---------------------------
|
||||||
echo "INFO: starting post-install script ..."
|
echo "INFO: starting post-install script ..."
|
||||||
|
# debian: reset ownerships & permissions
|
||||||
|
chown -R root:root /opt/hc /etc/opt/hc 2>/dev/null
|
||||||
|
chown root:root /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 ]]
|
if [[ ! -f ${HC_ETC_DIR}/core/check_health.conf ]]
|
||||||
then
|
then
|
||||||
|
@ -7,6 +7,8 @@ HC_BIN="/opt/hc/bin/check_health.sh"
|
|||||||
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
|
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
|
||||||
# ------------------------- CONFIGURATION ends here ---------------------------
|
# ------------------------- CONFIGURATION ends here ---------------------------
|
||||||
echo "INFO: starting post-install script ..."
|
echo "INFO: starting post-install script ..."
|
||||||
|
# debian: reset ownerships
|
||||||
|
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 ]]
|
if [[ ! -f ${HC_ETC_DIR}/core/providers/notify_eif.conf ]]
|
||||||
then
|
then
|
||||||
@ -23,4 +25,4 @@ then
|
|||||||
${HC_BIN} --fix-symlinks
|
${HC_BIN} --fix-symlinks
|
||||||
(( $? == 0 )) || echo "WARN: updating symlinks failed"
|
(( $? == 0 )) || echo "WARN: updating symlinks failed"
|
||||||
fi
|
fi
|
||||||
echo "INFO: finished post-install script"
|
echo "INFO: finished post-install script"
|
||||||
|
@ -7,6 +7,8 @@ HC_BIN="/opt/hc/bin/check_health.sh"
|
|||||||
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
|
PATH="$PATH:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
|
||||||
# ------------------------- CONFIGURATION ends here ---------------------------
|
# ------------------------- CONFIGURATION ends here ---------------------------
|
||||||
echo "INFO: starting post-install script ..."
|
echo "INFO: starting post-install script ..."
|
||||||
|
# debian: reset ownerships
|
||||||
|
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 ]]
|
if [[ ! -f ${HC_ETC_DIR}/core/providers/notify_sms.conf ]]
|
||||||
then
|
then
|
||||||
@ -23,4 +25,4 @@ then
|
|||||||
${HC_BIN} --fix-symlinks
|
${HC_BIN} --fix-symlinks
|
||||||
(( $? == 0 )) || echo "WARN: updating symlinks failed"
|
(( $? == 0 )) || echo "WARN: updating symlinks failed"
|
||||||
fi
|
fi
|
||||||
echo "INFO: finished post-install script"
|
echo "INFO: finished post-install script"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user