1
0
mirror of synced 2026-01-25 20:06:44 +00:00

In loadup- scripts, at end remove the tmp and tmp/logindir directories if they don't exist before the script runs

This commit is contained in:
Frank Halasz
2023-08-14 23:29:38 -07:00
parent 6a147af97f
commit 7f99792afe

View File

@@ -49,6 +49,19 @@ cmfile="${LOADUP_WORKDIR}/${script_name}.cm"
loadup_start () {
echo ">>>>> START ${script_name}"
if [ -d "${MEDLEYDIR}/tmp" ];
then
TMP_PRE_EXISTS="true"
if [ -d "${MEDLEYDIR}/tmp/logindir" ];
then
LOGINDIR_PRE_EXISTS="true"
else
LOGINDIR_PRE_EXISTS="false"
fi
else
LOGINDIR_PRE_EXISTS="false"
TMP_PRE_EXISTS="false"
fi
}
loadup_finish () {
@@ -74,6 +87,15 @@ loadup_finish () {
fi
done
done
if [ "${TMP_PRE_EXISTS}" = "false" ];
then
rm -rf "${MEDLEYDIR}/tmp"
else
if [ "${LOGINDIR_PRE_EXISTS}" = "false" ];
then
rm -rf "${MEDLEYDIR}/tmp/logindir"
fi
fi
echo "<<<<< END ${script_name}"
echo ""
exit ${exit_code}