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

View File

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