Commit a30c52be authored by Alain Takoudjou's avatar Alain Takoudjou

better check if timeout parameter is an integer

parent afa131fe
...@@ -13,8 +13,8 @@ fi ...@@ -13,8 +13,8 @@ fi
if [ -s "$F_TIMEOUT" ]; then if [ -s "$F_TIMEOUT" ]; then
TIMEOUT=$(cat $F_TIMEOUT) TIMEOUT=$(cat $F_TIMEOUT)
re="^[0-9]+$" result=$(echo $TIMEOUT | grep -E ^[0-9]+$)
if ! [[ $TIMEOUT =~ $re ]]; then if [ -z $result ]; then
# Not an integer # Not an integer
TIMEOUT=20 TIMEOUT=20
fi fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment