motd.sh: inactive and disabled services are not a failure
This commit is contained in:
parent
cb8e2fc73f
commit
025f53864b
4
motd.sh
4
motd.sh
@ -50,8 +50,10 @@ for i in "${!services[@]}"; do
|
|||||||
# color green if service is active, else red
|
# color green if service is active, else red
|
||||||
if [[ "${service_status[$i]}" == "active" ]]; then
|
if [[ "${service_status[$i]}" == "active" ]]; then
|
||||||
out+=" - ${services[$i]},${green}${service_status[$i]}${undim}\n"
|
out+=" - ${services[$i]},${green}${service_status[$i]}${undim}\n"
|
||||||
else
|
elif [[ "${service_status[$i]}" != "inactive" ]] || [[ "$(systemctl is-enabled ${services[$i]})" == "enabled" ]]; then
|
||||||
out+=" ${redbg}/!\\\\${undim} - ${services[$i]},${red}${service_status[$i]}${undim}\n"
|
out+=" ${redbg}/!\\\\${undim} - ${services[$i]},${red}${service_status[$i]}${undim}\n"
|
||||||
|
else
|
||||||
|
out+=" - ${services[$i]},${dim}${service_status[$i]} (disabled)${undim}\n"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user