Commit ec9666d4 authored by Seblu's avatar Seblu
Browse files

checkservices: fix display of failed service

do not quickly exit when no service to restart, in order to diplay failed services
parent f3a48778
Loading
Loading
Loading
Loading
+34 −33
Original line number Diff line number Diff line
@@ -166,8 +166,8 @@ for svc in "${needy[@]}"; do
done
(( "${#needy[*]}" )) && echo '-------8<-------------------------------8<---------'

# if nothing to restart we have done
(( $restart == 0 || ${#needy[*]} == 0 )) && exit 0
# start the dangerous action below
if ! (( $restart == 0 || ${#needy[*]} == 0 )); then

	# wait the timeout
	(( $timeout > 0 )) && {
@@ -204,6 +204,7 @@ if in_array dbus.service "${needy[@]}"; then
			exec "$0" "$@"
		fi
	fi
fi

(( $failed )) && systemctl --failed --all --no-pager --no-legend --full list-units