From 789ff73fe96994d37feb4ddb3638fc26d13b41fd Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Wed, 7 Oct 2026 00:53:23 +1100 Subject: [PATCH] fix(scripts): archie-update-install loads the archie env file so a shell run can back up the bundled database --- scripts/archie-update-install | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/archie-update-install b/scripts/archie-update-install index 0f738c442..e724d32d7 100755 --- a/scripts/archie-update-install +++ b/scripts/archie-update-install @@ -15,6 +15,14 @@ SOURCE_URL="${ARCHIE_SOURCE_URL:-https://github.com/samcharles93/archie-core.git BIN_DIR="${ARCHIE_BIN_DIR:-$HOME/.local/bin}" CONFIG_PATH="${ARCHIE_CONFIG_PATH:-${XDG_CONFIG_HOME:-$HOME/.config}/archie/config.toml}" export PATH="/usr/local/go/bin:$PATH" +# The units load this file; a run from a shell needs it too, for PGPASSWORD. +ENV_FILE="$(dirname "$CONFIG_PATH")/env" +if [ -r "$ENV_FILE" ]; then + set -a + # shellcheck disable=SC1090 + . "$ENV_FILE" + set +a +fi # State for the managed image, independent of archied's daemon build stamp. AGENT_VERSION_FILE="${ARCHIE_AGENT_VERSION_FILE:-$BIN_DIR/archie-agent.version}"