Petite amélioration d'UI pour la commande monitoringctl show (ne pas afficher la liste si n=1)
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |2723|0|2723|0|:zzz:
gitea/ansible-roles/pipeline/head This commit looks good

This commit is contained in:
William Hirigoyen 2024-05-07 12:17:10 +02:00
parent 0be5f409aa
commit 6dbe21b04c

View file

@ -328,8 +328,11 @@ function show_check_commands() {
usage_error "Error: no command found in NRPE configuration for check '${1}."
fi
echo "Available commands (in config order, the last one overwrites the others):"
echo " $check_commands"
n_commands="$(echo "${check_commands}" | wc -l)"
if [ "${n_commands}" -ne 1 ]; then
echo "Available commands (in config order, the last one overwrites the others):"
echo " $check_commands"
fi
check_command=$(echo "${check_commands}" | tail -n1)
echo "Command used by NRPE:"