mirror of
https://github.com/opinkerfi/nagios-plugins.git
synced 2024-11-22 02:13:44 +01:00
15 lines
405 B
Bash
15 lines
405 B
Bash
#!/bin/bash
|
|
xroad_list_tokens=$(signer-console list-tokens)
|
|
|
|
if [[ $xroad_list_tokens == "Token: 0 (OK, writable, available, active)" ]]
|
|
then
|
|
echo "OK - $xroad_list_tokens"
|
|
exit 0
|
|
elif [[ $xroad_list_tokens != "Token: 0 (OK, writable, available, active)" ]]
|
|
then
|
|
echo "Critical - $xroad_list_tokens"
|
|
exit 2
|
|
else
|
|
echo "Unknown - $xroad_list_tokens"
|
|
exit 3
|
|
fi |