Fix install script service management to only use debros-node

- Remove references to debros-bootstrap service in update logic
- Standardize on single debros-node service for all node types
- Fix service stopping/starting during updates
- Clean up legacy service references
This commit is contained in:
johnysigma 2025-08-06 08:39:44 +03:00
parent 79d4a3980f
commit cc276ccc22

View File

@ -101,15 +101,9 @@ check_existing_installation() {
if [ -d "$INSTALL_DIR" ] && [ -f "$INSTALL_DIR/bin/node" ]; then if [ -d "$INSTALL_DIR" ] && [ -f "$INSTALL_DIR/bin/node" ]; then
log "Found existing DeBros Network installation at $INSTALL_DIR" log "Found existing DeBros Network installation at $INSTALL_DIR"
# Check if services are running # Check if service is running
BOOTSTRAP_RUNNING=false
NODE_RUNNING=false NODE_RUNNING=false
if systemctl is-active --quiet debros-bootstrap.service 2>/dev/null; then
BOOTSTRAP_RUNNING=true
log "Bootstrap service is currently running"
fi
if systemctl is-active --quiet debros-node.service 2>/dev/null; then if systemctl is-active --quiet debros-node.service 2>/dev/null; then
NODE_RUNNING=true NODE_RUNNING=true
log "Node service is currently running" log "Node service is currently running"
@ -578,13 +572,11 @@ build_binaries() {
if [ "$UPDATE_MODE" = true ]; then if [ "$UPDATE_MODE" = true ]; then
log "Update mode: checking for running services before binary update..." log "Update mode: checking for running services before binary update..."
for service in debros-bootstrap debros-node; do if systemctl is-active --quiet debros-node.service 2>/dev/null; then
if systemctl is-active --quiet $service.service 2>/dev/null; then log "Stopping debros-node service to update binaries..."
log "Stopping $service service to update binaries..." sudo systemctl stop debros-node.service
sudo systemctl stop $service.service services_were_running+=("debros-node")
services_were_running+=("$service")
fi fi
done
# Give services a moment to fully stop # Give services a moment to fully stop
if [ ${#services_were_running[@]} -gt 0 ]; then if [ ${#services_were_running[@]} -gt 0 ]; then