Add a readability check to that file
This commit is contained in:
parent
6f85b4e493
commit
dc4b522ef5
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user