File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -270,7 +270,17 @@ if [ ${#ACTIVE_SERVICES_BEFORE_UPGRADE[@]} -eq 0 ]; then
270270 warn " No relevant services were active before the upgrade. Skipping restart."
271271else
272272 for SERVICE in " ${ACTIVE_SERVICES_BEFORE_UPGRADE[@]} " ; do
273- systemctl restart " $SERVICE " && success " $SERVICE restarted." || warn " $SERVICE failed to restart."
273+ info " Attempting to restart $SERVICE ..."
274+ systemctl enable " $SERVICE " & > /dev/null || warn " Could not enable $SERVICE . It might not exist."
275+ systemctl restart " $SERVICE "
276+ sleep 2
277+ if systemctl is-active --quiet " $SERVICE " ; then
278+ success " $SERVICE restarted successfully and is active."
279+ else
280+ warn " $SERVICE failed to restart or is not active."
281+ warn " Showing last 5 log entries for $SERVICE :"
282+ journalctl -u " $SERVICE " -n 5 --no-pager
283+ fi
274284 done
275285fi
276286
You can’t perform that action at this time.
0 commit comments