update
This commit is contained in:
@@ -79,12 +79,17 @@ services=(
|
||||
|
||||
for service in "${services[@]}"; do
|
||||
if systemctl list-unit-files | grep -q "$service"; then
|
||||
print_status "Restarting service: $service"
|
||||
# Check if service is enabled before restarting
|
||||
if systemctl is-enabled --quiet "$service" 2>/dev/null; then
|
||||
print_status "Restarting enabled service: $service"
|
||||
sudo systemctl restart "$service"
|
||||
if systemctl is-active --quiet "$service"; then
|
||||
print_status "✓ $service is running"
|
||||
else
|
||||
print_status "⚠ $service may not be active"
|
||||
print_status "⚠ $service failed to start"
|
||||
fi
|
||||
else
|
||||
print_status "ℹ Service $service is disabled, skipping restart"
|
||||
fi
|
||||
else
|
||||
print_status "ℹ Service $service not found (may not be installed)"
|
||||
|
||||
Reference in New Issue
Block a user