From 25ad8ab162a0bc6e51051e837edcb4c1be7405df Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Tue, 7 Apr 2026 12:22:33 -0300 Subject: [PATCH] installer: fix legacy unit filename mapping for migration --- scripts/install.sh | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index c6a23be..6e759a4 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -670,13 +670,13 @@ install_config_template() { } install_systemd_units() { - local unit + local source_map local tmp - for unit in service bootstrap.service update.service update.timer; do - local modern_src="deploy/systemd/ananke.${unit}" - local legacy_src="deploy/systemd/hecate.${unit}" - local target="${SYSTEMD_DIR}/ananke.${unit}" + while IFS='|' read -r target_name modern_name legacy_name; do + local modern_src="deploy/systemd/${modern_name}" + local legacy_src="deploy/systemd/${legacy_name}" + local target="${SYSTEMD_DIR}/${target_name}" if [[ -f "${modern_src}" ]]; then install -m 0644 "${modern_src}" "${target}" @@ -691,9 +691,14 @@ install_systemd_units() { continue fi - echo "[install] missing both modern and legacy systemd unit sources for ananke.${unit}" >&2 + echo "[install] missing both modern and legacy systemd unit sources for ${target_name}" >&2 return 1 - done + done <<'EOF_UNITS' +ananke.service|ananke.service|hecate.service +ananke-bootstrap.service|ananke-bootstrap.service|hecate-bootstrap.service +ananke-update.service|ananke-update.service|hecate-update.service +ananke-update.timer|ananke-update.timer|hecate-update.timer +EOF_UNITS } install_self_update_script() {