mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-31 21:01:33 +02:00
Merge pull request #11733 from overleaf/msm-close-site-sp-shutdwn
[CE/SP] close site on shutdown before flushing GitOrigin-RevId: e36c80f2f4c6f10eda3a536319a2fcc5dfda4fa4
This commit is contained in:
12
server-ce/init_scripts/00_restore_site_status
Executable file
12
server-ce/init_scripts/00_restore_site_status
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user