From c24248b2c30618b5bb3d3b0aaa1ccca245e6f45b Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Thu, 25 Jun 2026 10:17:13 -0500 Subject: [PATCH] fix(agent): restart systemd service on reinstall instead of no-op start Co-Authored-By: Claude Sonnet 4.6 --- agent/install.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/agent/install.sh b/agent/install.sh index ccde5f4..2e46afb 100644 --- a/agent/install.sh +++ b/agent/install.sh @@ -142,8 +142,13 @@ WantedBy=multi-user.target EOF systemctl daemon-reload systemctl enable usite-agent - systemctl start usite-agent - ok "Servicio systemd 'usite-agent' instalado y activo" + if systemctl is-active --quiet usite-agent; then + systemctl restart usite-agent + ok "Servicio systemd 'usite-agent' reiniciado con nueva configuración" + else + systemctl start usite-agent + ok "Servicio systemd 'usite-agent' instalado y activo" + fi STARTED=1 # 2) openrc (Alpine, algunos VPS)