diff options
author | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2021-12-02 15:55:55 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-02 15:55:55 (GMT) |
commit | f5d22b4a5643186ce7b5649576081bbb88af7262 (patch) | |
tree | cf36b95a4a964b03d6ecf75770ced2cb3a2ac3a9 /plugins-scripts/check_log.sh | |
parent | ed7cdf82a42f16532801ea4f118870ce9a130fcf (diff) | |
parent | 911e44045d7291f5ede22739fd176ef55dd3de4a (diff) | |
download | monitoring-plugins-f5d22b4a5643186ce7b5649576081bbb88af7262.tar.gz |
Merge pull request #1459 from waja/fix/shellcheck
Several fixes shellcheck complaining about
Diffstat (limited to 'plugins-scripts/check_log.sh')
-rwxr-xr-x | plugins-scripts/check_log.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins-scripts/check_log.sh b/plugins-scripts/check_log.sh index 382bd72..6113123 100755 --- a/plugins-scripts/check_log.sh +++ b/plugins-scripts/check_log.sh | |||
@@ -223,6 +223,7 @@ fi | |||
223 | # The temporary file that the script should use while | 223 | # The temporary file that the script should use while |
224 | # processing the log file. | 224 | # processing the log file. |
225 | if [ -x /bin/mktemp ]; then | 225 | if [ -x /bin/mktemp ]; then |
226 | |||
226 | tempdiff=$(/bin/mktemp /tmp/check_log.XXXXXXXXXX) | 227 | tempdiff=$(/bin/mktemp /tmp/check_log.XXXXXXXXXX) |
227 | else | 228 | else |
228 | tempdiff=$(/bin/date '+%H%M%S') | 229 | tempdiff=$(/bin/date '+%H%M%S') |
@@ -233,6 +234,7 @@ fi | |||
233 | 234 | ||
234 | diff "$logfile" "$oldlog" | grep -v "^>" > "$tempdiff" | 235 | diff "$logfile" "$oldlog" | grep -v "^>" > "$tempdiff" |
235 | 236 | ||
237 | |||
236 | if [ $ALL ]; then | 238 | if [ $ALL ]; then |
237 | # Get the last matching entry in the diff file | 239 | # Get the last matching entry in the diff file |
238 | entry=$($GREP "$query" "$tempdiff") | 240 | entry=$($GREP "$query" "$tempdiff") |