Fix conf_upgrade template naming bugs that caused false ADDED/REMOVED on every nightly pull

- REMOTE_ID_TIER*_DELAY renamed to HOSTN_TIER*_DELAY — these are own-host outage timers
- HOSTN_RADARR_MOVIE_ROOT → HOSTN_RADARR_MOVIES_ROOT (matches common.sh)
- HOSTN_SYS_WATCHDOG_CHECK_DOCKER → CHECK_DOCKER_DAEMON, CHECK_TEMP → CHECK_CPU_TEMP
- Add REMOTE_ID substitution to the sed in git_pull_execute.sh so COVERS_REMOTE_ID
  resolves to the actual remote host (e.g. FALLBACK_HOST1_COVERS_HOST2_TIER1)
- Add HOSTN_PARTNERSHIP_REPLACE_CONTAINERS, HOSTN_PARTNERSHIP_ARR_REPLACE_CONTAINERS,
  and HOSTN_WATCHDOG_CONTAINER_API_CHECKS to template so they aren't removed each pull
This commit is contained in:
Gmer4Lfe
2026-06-13 10:22:02 -04:00
parent 1bc76f8490
commit 60ff658181
2 changed files with 26 additions and 10 deletions
+6 -1
View File
@@ -303,10 +303,15 @@ elif [[ "$SYNC_SUCCESS" == true ]]; then
# This server's host conf only — sparse checkout ensures we have it
HOST_CONF="$CONF_DIR/${MY_ID,,}.conf"
if [[ -f "$CONF_DIR/host.conf.template" && -f "$HOST_CONF" ]]; then
# Template uses HOSTN_ as generic prefix. Substitute MY_ID before merging
# so keys match the target (HOST1_* or HOST2_*) and real values are preserved.
TMPL_RESOLVED=$(mktemp)
sed "s/HOSTN_/${MY_ID}_/g; s/REMOTE_ID/${REMOTE_ID}/g" "$CONF_DIR/host.conf.template" > "$TMPL_RESOLVED"
bash "$UPGRADE_SCRIPT" \
--template "$CONF_DIR/host.conf.template" \
--template "$TMPL_RESOLVED" \
--target "$HOST_CONF" \
--backup $_DRY
rm -f "$TMPL_RESOLVED"
else
warn "${MY_ID,,}.conf or host.conf.template not found — skipping"
fi