Options:
-p, --path <path> path to ClamAV lib directory, if not $CLAM_LIB_DIR
+ -w, --warning <number> number of revisions sigs can be out of date (warning)
+ -c, --critical <number> number of revisions sigs can be out of date (critical)
-V, --version output version
-h, --help output help information
-p|--path) CLAM_LIB_DIR=$1; shift ;;
-V|--version) version; exit ;;
-h|--help) help; exit ;;
+ -w|--warning) WARN_THRESHOLD=$1; shift ;;
+ -c|--critical) CRIT_THRESHOLD=$1; shift ;;
*)
echo "UNKNOWN: Unrecognised argument: $ARG"
usage >&2
esac
done
+if ! [[ $WARN_THRESHOLD =~ $NUMERICAL_REGEX ]]; then
+ echo "UNKNOWN: Warning threshold must be numeric!"
+ exit $UNKNOWN
+fi
+if ! [[ $CRIT_THRESHOLD =~ $NUMERICAL_REGEX ]]; then
+ echo "UNKNOWN: Critical threshold must be numeric!"
+ exit $UNKNOWN
+fi
+
#
# Showtime.
#