# HG changeset patch # User MrJuneJune # Date 1786133807 25200 # Node ID 358dd5950985658b01239174a89cea365a5638da # Parent de291f3968818a0cfdcfd37cecfd0e8aa5768f1b sync production config on every deploy Always install the ignored repository .config into /etc/mrjunejune before promoting the new bundle. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> diff -r de291f396881 -r 358dd5950985 mrjunejune/deploy.sh --- a/mrjunejune/deploy.sh Fri Aug 07 13:08:10 2026 -0700 +++ b/mrjunejune/deploy.sh Fri Aug 07 13:16:47 2026 -0700 @@ -10,19 +10,16 @@ production_config="/etc/mrjunejune/.config" # The real config is ignored and intentionally excluded from the immutable -# bundle. Install it once into the service-owned system location; preserve the -# existing production config on subsequent deployments. -if ! sudo test -f "$production_config"; then - if [[ ! -f "$source_config" ]]; then - echo "Missing initial config: $source_config" >&2 - exit 1 - fi - sudo install -d -o mrjunejune_server -g zenbu_team -m 0750 \ - "$(dirname "$production_config")" - sudo install -o mrjunejune_server -g zenbu_team -m 0640 \ - "$source_config" "$production_config" - echo "Installed initial production config at $production_config" +# bundle. Synchronize the repository's service config on every deployment. +if [[ ! -f "$source_config" ]]; then + echo "Missing deployment config: $source_config" >&2 + exit 1 fi +sudo install -d -o mrjunejune_server -g zenbu_team -m 0750 \ + "$(dirname "$production_config")" +sudo install -o mrjunejune_server -g zenbu_team -m 0640 \ + "$source_config" "$production_config" +echo "Updated production config at $production_config" # Always create staging from an empty directory. Copying into an existing # directory nests the bundle and can promote stale/incomplete runtime files.