check sleeptime variable

This commit is contained in:
Andrew Hurley 2021-08-22 18:06:09 +10:00
parent 7e585ca668
commit 1e4cadb6ec
1 changed files with 7 additions and 2 deletions

View File

@ -108,8 +108,13 @@ while true; do
modulus=4
fi
done
echo "- sleeping for $sleeptime seconds"
sleep $sleeptime
if [[ -z $sleeptime ]]; then
echo "sleeptime error"
exit 1
else
echo "- sleeping for $sleeptime seconds"
sleep $sleeptime
fi
done
exit 0