Petite amélioration d'UI pour la commande monitoringctl show (ne pas afficher la liste si n=1)
This commit is contained in:
parent
0be5f409aa
commit
6dbe21b04c
|
@ -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:"
|
||||
|
|
Loading…
Reference in a new issue