mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-28 21:03:11 -05:00
7c7f8c1573
[CE/SP] close site on shutdown before flushing GitOrigin-RevId: e36c80f2f4c6f10eda3a536319a2fcc5dfda4fa4
12 lines
398 B
Bash
Executable file
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
|