install: preserve bootstrap service state by default

This commit is contained in:
Brad Stein 2026-04-03 15:21:43 -03:00
parent 5343638b51
commit 3dda295cd2
2 changed files with 5 additions and 2 deletions

View File

@ -40,6 +40,7 @@ The installer is idempotent:
Installer knobs (optional): Installer knobs (optional):
- `HECATE_ENABLE_BOOTSTRAP=1` enables `hecate-bootstrap.service` on this host. - `HECATE_ENABLE_BOOTSTRAP=1` enables `hecate-bootstrap.service` on this host.
- `HECATE_ENABLE_BOOTSTRAP=0` disables it; default `auto` preserves current bootstrap enablement state.
- `HECATE_MANAGE_NUT=0` skips writing NUT/udev files. - `HECATE_MANAGE_NUT=0` skips writing NUT/udev files.
- `HECATE_NUT_UPS_NAME` (default `atlasups`) - `HECATE_NUT_UPS_NAME` (default `atlasups`)
- `HECATE_NUT_VENDOR_ID` / `HECATE_NUT_PRODUCT_ID` (defaults `0764` / `0601`) - `HECATE_NUT_VENDOR_ID` / `HECATE_NUT_PRODUCT_ID` (defaults `0764` / `0601`)

View File

@ -14,7 +14,7 @@ SYSTEMD_DIR="/etc/systemd/system"
LIB_DIR="/usr/local/lib/hecate" LIB_DIR="/usr/local/lib/hecate"
START_NOW=1 START_NOW=1
INSTALL_DEPS=1 INSTALL_DEPS=1
ENABLE_BOOTSTRAP="${HECATE_ENABLE_BOOTSTRAP:-0}" ENABLE_BOOTSTRAP="${HECATE_ENABLE_BOOTSTRAP:-auto}"
MANAGE_NUT="${HECATE_MANAGE_NUT:-1}" MANAGE_NUT="${HECATE_MANAGE_NUT:-1}"
NUT_UPS_NAME="${HECATE_NUT_UPS_NAME:-atlasups}" NUT_UPS_NAME="${HECATE_NUT_UPS_NAME:-atlasups}"
NUT_VENDOR_ID="${HECATE_NUT_VENDOR_ID:-0764}" NUT_VENDOR_ID="${HECATE_NUT_VENDOR_ID:-0764}"
@ -185,8 +185,10 @@ systemctl daemon-reload
systemctl enable hecate.service hecate-update.timer systemctl enable hecate.service hecate-update.timer
if [[ "${ENABLE_BOOTSTRAP}" == "1" ]]; then if [[ "${ENABLE_BOOTSTRAP}" == "1" ]]; then
systemctl enable hecate-bootstrap.service systemctl enable hecate-bootstrap.service
else elif [[ "${ENABLE_BOOTSTRAP}" == "0" ]]; then
systemctl disable hecate-bootstrap.service >/dev/null 2>&1 || true systemctl disable hecate-bootstrap.service >/dev/null 2>&1 || true
else
echo "[install] leaving hecate-bootstrap.service state unchanged (HECATE_ENABLE_BOOTSTRAP=${ENABLE_BOOTSTRAP})"
fi fi
if [[ "${START_NOW}" -eq 1 ]]; then if [[ "${START_NOW}" -eq 1 ]]; then