Add --all to systemctl to also hopefully catch disabled services

This commit is contained in:
Alexandre Aubin 2021-03-22 22:44:17 +01:00
parent f09c0a9f8e
commit 24644664a1

View file

@ -256,8 +256,8 @@ Page extract:\n$page_extract" > $TEST_CONTEXT/curl_result
# If we had a 50x error, try to display service info and logs to help debugging # If we had a 50x error, try to display service info and logs to help debugging
if [[ $curl_error -ne 0 ]] && echo "5" | grep -q "${http_code:0:1}" if [[ $curl_error -ne 0 ]] && echo "5" | grep -q "${http_code:0:1}"
then then
LXC_EXEC "systemctl" | grep "$app_id_to_check.*service" LXC_EXEC "systemctl --all" | grep "$app_id_to_check.*service"
for SERVICE in $(LXC_EXEC "systemctl" | grep "$app_id_to_check.*service" | awk '{print $1}') for SERVICE in $(LXC_EXEC "systemctl -all" | grep "$app_id_to_check.*service" | awk '{print $1}')
do do
LXC_EXEC "journalctl --no-pager --no-hostname -n 30 -u $SERVICE"; LXC_EXEC "journalctl --no-pager --no-hostname -n 30 -u $SERVICE";
done done