Update installation script: fix systemd infinite loop

This commit is contained in:
2026-09-20 18:52:59 +01:00
parent 368434129a
commit 8fa6decb89
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -199,7 +199,7 @@ EOF
systemctl daemon-reload
log "enabling and starting $SERVICE_NAME ..."
systemctl enable --now "$SERVICE_NAME.service"
if [ "$UPDATE" = true ]; then
if [ "$UPDATE" = true ] && [ -z "${SKIP_SERVICE_RESTART:-}" ]; then
log "restarting $SERVICE_NAME to load updated code ..."
systemctl restart "$SERVICE_NAME.service"
fi
@@ -232,7 +232,7 @@ EOF
chmod +x "$init_script"
log "adding $SERVICE_NAME to default runlevel and starting ..."
rc-update add "$SERVICE_NAME" default
if [ "$UPDATE" = true ]; then
if [ "$UPDATE" = true ] && [ -z "${SKIP_SERVICE_RESTART:-}" ]; then
rc-service "$SERVICE_NAME" restart
else
rc-service "$SERVICE_NAME" start
+1
View File
@@ -35,6 +35,7 @@ execSync(path.join(__dirname, "scripts", "install-wg-ui.sh"), {
stdio: "ignore",
env: {
...process.env,
SKIP_SERVICE_RESTART: "1",
},
});
bunext.bunextLog.success(`Wireguard setup complete!`);