overleaf/server-ce/init_preshutdown_scripts/02_flush_project_history
Eric Mc Sween d0cd02d0ac Merge pull request #17885 from overleaf/em-sp-missing-env
Add proper environment in CE/Server Pro preshutdown scripts

GitOrigin-RevId: 84ec76de67e91a4acc1f326a701ebb13a3f1322f
2024-04-16 08:04:26 +00:00

14 lines
315 B
Bash
Executable file

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