diff --git a/README.md b/README.md index 623e7b4..e4867c1 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,7 @@ The installer is idempotent: Installer knobs (optional): - `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_NUT_UPS_NAME` (default `atlasups`) - `HECATE_NUT_VENDOR_ID` / `HECATE_NUT_PRODUCT_ID` (defaults `0764` / `0601`) diff --git a/scripts/install.sh b/scripts/install.sh index b6ee38e..3eec6c4 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -14,7 +14,7 @@ SYSTEMD_DIR="/etc/systemd/system" LIB_DIR="/usr/local/lib/hecate" START_NOW=1 INSTALL_DEPS=1 -ENABLE_BOOTSTRAP="${HECATE_ENABLE_BOOTSTRAP:-0}" +ENABLE_BOOTSTRAP="${HECATE_ENABLE_BOOTSTRAP:-auto}" MANAGE_NUT="${HECATE_MANAGE_NUT:-1}" NUT_UPS_NAME="${HECATE_NUT_UPS_NAME:-atlasups}" NUT_VENDOR_ID="${HECATE_NUT_VENDOR_ID:-0764}" @@ -185,8 +185,10 @@ systemctl daemon-reload systemctl enable hecate.service hecate-update.timer if [[ "${ENABLE_BOOTSTRAP}" == "1" ]]; then systemctl enable hecate-bootstrap.service -else +elif [[ "${ENABLE_BOOTSTRAP}" == "0" ]]; then 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 if [[ "${START_NOW}" -eq 1 ]]; then