Révision 189c3953
shell: use 'command -v' instead of 'hash' (for non-bash)
see https://stackoverflow.com/a/677212
| plugins/rabbitmq/rabbitmq_connections | ||
|---|---|---|
| 89 | 89 |
# real work - i.e. display the data. Almost always this will be |
| 90 | 90 |
# "value" subfield for every data field. |
| 91 | 91 |
|
| 92 |
if hash rabbitmqctl >/dev/null 2>&1; then
|
|
| 92 |
if command -v rabbitmqctl >/dev/null 2>&1; then
|
|
| 93 | 93 |
connections=$(HOME=/tmp rabbitmqctl list_connections state | grep -c running) |
| 94 | 94 |
else |
| 95 | 95 |
echo "$0: Could not run rabbitmqctl" >&2 |
Formats disponibles : Unified diff