Fix build scripts
This commit is contained in:
parent
9d92e0ada7
commit
e446186578
@ -53,9 +53,6 @@ post_install() {
|
|||||||
# location of the HC log/state files
|
# location of the HC log/state files
|
||||||
HC_VAR_DIR="/var/opt/hc"
|
HC_VAR_DIR="/var/opt/hc"
|
||||||
# ------------------------- CONFIGURATION ends here ---------------------------
|
# ------------------------- CONFIGURATION ends here ---------------------------
|
||||||
# update or uninstall?
|
|
||||||
if (( $1 == 0 ))
|
|
||||||
then
|
|
||||||
echo "INFO: starting post-uninstall script ..."
|
echo "INFO: starting post-uninstall script ..."
|
||||||
if [[ -d ${HC_DIR} ]]
|
if [[ -d ${HC_DIR} ]]
|
||||||
then
|
then
|
||||||
@ -83,7 +80,4 @@ post_install() {
|
|||||||
(( $? == 0 )) || echo "WARN: failed to remove ${HC_VAR_DIR}/state/temporary"
|
(( $? == 0 )) || echo "WARN: failed to remove ${HC_VAR_DIR}/state/temporary"
|
||||||
fi
|
fi
|
||||||
echo "INFO: finished post-uninstall script"
|
echo "INFO: finished post-uninstall script"
|
||||||
else
|
|
||||||
echo "INFO: skipping post-uninstall script (RPM upgrade)"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
@ -7,36 +7,30 @@ HC_ETC_DIR="/etc/opt/hc"
|
|||||||
# location of the HC log/state files
|
# location of the HC log/state files
|
||||||
HC_VAR_DIR="/var/opt/hc"
|
HC_VAR_DIR="/var/opt/hc"
|
||||||
# ------------------------- CONFIGURATION ends here ---------------------------
|
# ------------------------- CONFIGURATION ends here ---------------------------
|
||||||
# update or uninstall?
|
echo "INFO: starting post-uninstall script ..."
|
||||||
if (( $1 == 0 ))
|
if [[ -d ${HC_DIR} ]]
|
||||||
then
|
then
|
||||||
echo "INFO: starting post-uninstall script ..."
|
|
||||||
if [[ -d ${HC_DIR} ]]
|
|
||||||
then
|
|
||||||
rm -rf ${HC_DIR} 2>/dev/null
|
rm -rf ${HC_DIR} 2>/dev/null
|
||||||
(( $? == 0 )) || echo "WARN: failed to remove ${HC_DIR}"
|
(( $? == 0 )) || echo "WARN: failed to remove ${HC_DIR}"
|
||||||
fi
|
fi
|
||||||
if [[ -d ${HC_ETC_DIR} ]]
|
if [[ -d ${HC_ETC_DIR} ]]
|
||||||
then
|
then
|
||||||
rm -rf ${HC_ETC_DIR}/*.dist >/dev/null
|
rm -rf ${HC_ETC_DIR}/*.dist >/dev/null
|
||||||
(( $? == 0 )) || echo "WARN: could not remove .dist files in directory ${HC_ETC_DIR}"
|
(( $? == 0 )) || echo "WARN: could not remove .dist files in directory ${HC_ETC_DIR}"
|
||||||
fi
|
fi
|
||||||
if [[ -d ${HC_ETC_DIR}/core ]]
|
if [[ -d ${HC_ETC_DIR}/core ]]
|
||||||
then
|
then
|
||||||
rm -rf ${HC_ETC_DIR}/core/*.dist >/dev/null
|
rm -rf ${HC_ETC_DIR}/core/*.dist >/dev/null
|
||||||
(( $? == 0 )) || echo "WARN: could not remove .dist files in directory ${HC_ETC_DIR}/core"
|
(( $? == 0 )) || echo "WARN: could not remove .dist files in directory ${HC_ETC_DIR}/core"
|
||||||
fi
|
fi
|
||||||
if [[ -d ${HC_ETC_DIR}/core/providers ]]
|
if [[ -d ${HC_ETC_DIR}/core/providers ]]
|
||||||
then
|
then
|
||||||
rm -rf ${HC_ETC_DIR}/core/providers/*.dist >/dev/null
|
rm -rf ${HC_ETC_DIR}/core/providers/*.dist >/dev/null
|
||||||
(( $? == 0 )) || echo "WARN: could not remove .dist files in directory ${HC_ETC_DIR}/core/providers"
|
(( $? == 0 )) || echo "WARN: could not remove .dist files in directory ${HC_ETC_DIR}/core/providers"
|
||||||
fi
|
fi
|
||||||
if [[ -d ${HC_VAR_DIR} ]]
|
if [[ -d ${HC_VAR_DIR} ]]
|
||||||
then
|
then
|
||||||
rm -rf ${HC_VAR_DIR}/state/temporary 2>/dev/null
|
rm -rf ${HC_VAR_DIR}/state/temporary 2>/dev/null
|
||||||
(( $? == 0 )) || echo "WARN: failed to remove ${HC_VAR_DIR}/state/temporary"
|
(( $? == 0 )) || echo "WARN: failed to remove ${HC_VAR_DIR}/state/temporary"
|
||||||
fi
|
|
||||||
echo "INFO: finished post-uninstall script"
|
|
||||||
else
|
|
||||||
echo "INFO: skipping post-uninstall script (RPM upgrade)"
|
|
||||||
fi
|
fi
|
||||||
|
echo "INFO: finished post-uninstall script"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user