overleaf/server-ce/init_preshutdown_scripts/01_flush_document_updater
Jakob Ackermann e36de5a62d Merge pull request #18856 from overleaf/jpa-server-ce-shutdown
[server-ce] improve shutdown procedure

GitOrigin-RevId: 5a99868d17f597c366e42625cd39f05146dcb682
2024-06-18 08:04:04 +00:00

15 lines
327 B
Bash
Executable file

#!/bin/sh
. /etc/container_environment.sh
. /etc/overleaf/env.sh
cd /overleaf/services/document-updater && node scripts/flush_all.js >> /var/log/overleaf/document-updater.log 2>&1
EXIT_CODE="$?"
if [ $EXIT_CODE -ne 0 ]
then
echo "document-updater/scripts/flush_all.js failed with exit code $EXIT_CODE"
exit 1
fi
exit 0