fix(install): refresh systemd service configuration before restarting previously running installations

This commit is contained in:
2026-03-16 11:07:00 +00:00
parent f5c1d5fcda
commit 01e3ba16c4
4 changed files with 11 additions and 3 deletions

View File

@@ -250,8 +250,10 @@ echo ""
mkdir -p /var/lib/onebox
mkdir -p /var/www/certbot
# Restart service if it was running before update
# Re-enable and restart service if it was previously running (refreshes unit file)
if [ $SERVICE_WAS_RUNNING -eq 1 ]; then
echo "Refreshing systemd service..."
onebox systemd enable
echo "Restarting Onebox service..."
systemctl restart "$SERVICE_NAME"
echo "Service restarted successfully."