From d0cd02d0acd8203e5012f62f83eec53304765570 Mon Sep 17 00:00:00 2001 From: Eric Mc Sween <5454374+emcsween@users.noreply.github.com> Date: Mon, 15 Apr 2024 08:54:08 -0400 Subject: [PATCH] Merge pull request #17885 from overleaf/em-sp-missing-env Add proper environment in CE/Server Pro preshutdown scripts GitOrigin-RevId: 84ec76de67e91a4acc1f326a701ebb13a3f1322f --- server-ce/init_preshutdown_scripts/00_close_site | 3 +++ server-ce/init_preshutdown_scripts/01_flush_document_updater | 3 +++ server-ce/init_preshutdown_scripts/02_flush_project_history | 3 +++ 3 files changed, 9 insertions(+) diff --git a/server-ce/init_preshutdown_scripts/00_close_site b/server-ce/init_preshutdown_scripts/00_close_site index 4ad87dd856..6e1a196872 100755 --- a/server-ce/init_preshutdown_scripts/00_close_site +++ b/server-ce/init_preshutdown_scripts/00_close_site @@ -1,5 +1,8 @@ #!/bin/sh +. /etc/container_environment.sh +. /etc/overleaf/env.sh + SITE_MAINTENANCE_FILE_BAK="$SITE_MAINTENANCE_FILE.bak.shutdown" mv "${SITE_MAINTENANCE_FILE}" "${SITE_MAINTENANCE_FILE_BAK}" diff --git a/server-ce/init_preshutdown_scripts/01_flush_document_updater b/server-ce/init_preshutdown_scripts/01_flush_document_updater index d39faac61d..2e9af99316 100755 --- a/server-ce/init_preshutdown_scripts/01_flush_document_updater +++ b/server-ce/init_preshutdown_scripts/01_flush_document_updater @@ -1,5 +1,8 @@ #!/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="$?" diff --git a/server-ce/init_preshutdown_scripts/02_flush_project_history b/server-ce/init_preshutdown_scripts/02_flush_project_history index fafdaa48e0..47f08b4b91 100755 --- a/server-ce/init_preshutdown_scripts/02_flush_project_history +++ b/server-ce/init_preshutdown_scripts/02_flush_project_history @@ -1,5 +1,8 @@ #!/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="$?"