Add a readability check to that file

This commit is contained in:
Salt 2021-11-25 16:40:45 -06:00
parent 6f85b4e493
commit dc4b522ef5
1 changed files with 3 additions and 0 deletions

View File

@ -150,6 +150,9 @@ main() {
if [ -z "${_args[0]}" ]; then
error "Must specify a file" 50
fi
if ! [ -r "${_args[0]}" ]; then
error "File is unreadable: ${_args[0]}" 50
fi
if ! (( _optcritthresh > 0 )) 2>/dev/null; then
error "Critical threshold must be an integer greater than 0" 50
fi