mirror of
https://github.com/oneoffdallas/pfsense-nagios-checks.git
synced 2024-11-22 18:33:42 +01:00
Merge pull request #11 from johanthoren/master
Fix issue with grep matching on substring
This commit is contained in:
commit
6346b1f7cf
@ -68,7 +68,7 @@ fi
|
|||||||
wrtt=$(printf "%0.3f" "$wrtt")
|
wrtt=$(printf "%0.3f" "$wrtt")
|
||||||
crtt=$(printf "%0.3f" "$crtt")
|
crtt=$(printf "%0.3f" "$crtt")
|
||||||
|
|
||||||
STAT=$($GWSTATUSCMD | grep $gwname | sed -E -e 's/[[:blank:]]+/,/g' -e 's/ms//g' -e 's/%//g')
|
STAT=$($GWSTATUSCMD | grep "^${gwname}\s" | sed -E -e 's/[[:blank:]]+/,/g' -e 's/ms//g' -e 's/%//g')
|
||||||
if [ -z "$STAT" ]; then
|
if [ -z "$STAT" ]; then
|
||||||
echo -n "Gateway with name '${gwname}' does not exist, possible values are: "
|
echo -n "Gateway with name '${gwname}' does not exist, possible values are: "
|
||||||
listgw | xargs
|
listgw | xargs
|
||||||
|
Loading…
Reference in New Issue
Block a user