fix(agent): restart systemd service on reinstall instead of no-op start

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-06-25 10:17:13 -05:00
co-authored by Claude Sonnet 4.6
parent c3693d00db
commit c24248b2c3
+7 -2
View File
@@ -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)