feat: change agent installer to use restart instead of enable --now for systemd service activation
CI / backend (push) Failing after 2s
CI / frontend (push) Failing after 27s

Replace `systemctl enable --now` with separate `systemctl enable` and `systemctl restart` commands to ensure agent service restarts on reinstall rather than silently failing when service already exists
This commit is contained in:
2026-07-09 14:58:22 +02:00
parent 926a1b8165
commit 5040ac2f16
+2 -1
View File
@@ -730,7 +730,8 @@ EOF
if command -v systemctl >/dev/null 2>&1; then if command -v systemctl >/dev/null 2>&1; then
systemctl daemon-reload systemctl daemon-reload
systemctl enable --now "$SERVICE_NAME.service" systemctl enable "$SERVICE_NAME.service"
systemctl restart "$SERVICE_NAME.service"
systemctl status "$SERVICE_NAME.service" --no-pager || true systemctl status "$SERVICE_NAME.service" --no-pager || true
else else
echo "systemctl not found. Run manually: python3 $INSTALL_DIR/nexafabric-agent.py --config $CONFIG_DIR/config.json" echo "systemctl not found. Run manually: python3 $INSTALL_DIR/nexafabric-agent.py --config $CONFIG_DIR/config.json"