summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xphpmalwarefinder19
1 files changed, 18 insertions, 1 deletions
diff --git a/phpmalwarefinder b/phpmalwarefinder
index 15354d4..9c4daa4 100755
--- a/phpmalwarefinder
+++ b/phpmalwarefinder
@@ -27,6 +27,18 @@ else
27 fi 27 fi
28fi 28fi
29 29
30if [ -f "${IONICE_BIN}" ]
31then
32 NICE=${IONICE_BIN}
33 NICE_OPTS="-c 3"
34else
35 if [ -f "${NICE_BIN}" ]
36 then
37 NICE=${NICE_BIN}
38 NICE_OPTS="-n 20"
39 fi
40fi
41
30show_help() { 42show_help() {
31 cat << EOF 43 cat << EOF
32Usage ${0##*/} [-cfhw] <file|folder> ... 44Usage ${0##*/} [-cfhw] <file|folder> ...
@@ -85,7 +97,12 @@ then
85 exit 1 97 exit 1
86fi 98fi
87 99
100if [ ! -e ${NICE} ]
101then
102 echo "no nice program available. Please install ionice or nice."
103 exit 1
104fi
105
88OPTS="${OPTS} -r ${CONFIG_PATH}" 106OPTS="${OPTS} -r ${CONFIG_PATH}"
89 107
90${NICE} ${NICE_OPTS} $YARA $OPTS $@ 108${NICE} ${NICE_OPTS} $YARA $OPTS $@
91