overleaf/server-ce/init_scripts/100_restore_site_status.sh
Jakob Ackermann 12befda220 Merge pull request #16919 from overleaf/jpa-check-env-vars
[server-ce] add script for checking on old ShareLaTeX env vars

GitOrigin-RevId: a60d6f7648d65c336054795affe91a349aa629cf
2024-02-12 09:03:33 +00:00

12 lines
398 B
Bash
Executable file

#!/bin/bash
set -e
# pre-shutdown scripts close the site by overriding the content of SITE_MAINTENANCE_FILE,
# this script restores the original value on container restart
SITE_MAINTENANCE_FILE_BAK="$SITE_MAINTENANCE_FILE.bak.shutdown"
if [ -f "${SITE_MAINTENANCE_FILE_BAK}" ]; then
mv -f "${SITE_MAINTENANCE_FILE_BAK}" "${SITE_MAINTENANCE_FILE}"
rm -f "${SITE_MAINTENANCE_FILE_BAK}"
fi