1
0
mirror of synced 2026-01-16 16:47:50 +00:00

Merge pull request #1308 from Interlisp/fgh_loadups3

Fix issue with tmp/logindir remaining after loadup-all and loadup-db scripts
This commit is contained in:
Frank Halasz 2023-08-15 15:31:33 -07:00 committed by GitHub
commit 701a642fb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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}