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
if [ -s "$F_TIMEOUT" ]; then
TIMEOUT=$(cat $F_TIMEOUT)
re="^[0-9]+$"
if ! [[ $TIMEOUT =~ $re ]]; then
result=$(echo $TIMEOUT | grep -E ^[0-9]+$)
if [ -z $result ]; then
# Not an integer
TIMEOUT=20
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