diff options
| author | ahpnils | 2015-08-28 09:31:22 +0200 |
|---|---|---|
| committer | ahpnils | 2015-08-28 09:31:22 +0200 |
| commit | 6ca6e29cff2d5ceb950e2091b04162d21805c113 (patch) | |
| tree | 7bdbb5565eab7f7938a8509fc0ec90cc96ef665b | |
| parent | 05b4bf92a2118fba8dd8eda30060def48985b40c (diff) | |
| parent | eb3523a2e71f818b03db160b85c6dbd3b5cc271c (diff) | |
Merge remote-tracking branch 'upstream/master'
| -rwxr-xr-x | phpmalwarefinder | 19 |
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 |
| 28 | fi | 28 | fi |
| 29 | 29 | ||
| 30 | if [ -f "${IONICE_BIN}" ] | ||
| 31 | then | ||
| 32 | NICE=${IONICE_BIN} | ||
| 33 | NICE_OPTS="-c 3" | ||
| 34 | else | ||
| 35 | if [ -f "${NICE_BIN}" ] | ||
| 36 | then | ||
| 37 | NICE=${NICE_BIN} | ||
| 38 | NICE_OPTS="-n 20" | ||
| 39 | fi | ||
| 40 | fi | ||
| 41 | |||
| 30 | show_help() { | 42 | show_help() { |
| 31 | cat << EOF | 43 | cat << EOF |
| 32 | Usage ${0##*/} [-cfhw] <file|folder> ... | 44 | Usage ${0##*/} [-cfhw] <file|folder> ... |
| @@ -85,7 +97,12 @@ then | |||
| 85 | exit 1 | 97 | exit 1 |
| 86 | fi | 98 | fi |
| 87 | 99 | ||
| 100 | if [ ! -e ${NICE} ] | ||
| 101 | then | ||
| 102 | echo "no nice program available. Please install ionice or nice." | ||
| 103 | exit 1 | ||
| 104 | fi | ||
| 105 | |||
| 88 | OPTS="${OPTS} -r ${CONFIG_PATH}" | 106 | OPTS="${OPTS} -r ${CONFIG_PATH}" |
| 89 | 107 | ||
| 90 | ${NICE} ${NICE_OPTS} $YARA $OPTS $@ | 108 | ${NICE} ${NICE_OPTS} $YARA $OPTS $@ |
| 91 | |||
