summaryrefslogtreecommitdiffstats
path: root/plugins-scripts/check_log.sh
diff options
context:
space:
mode:
authorRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2021-12-02 15:55:55 (GMT)
committerGitHub <noreply@github.com>2021-12-02 15:55:55 (GMT)
commitf5d22b4a5643186ce7b5649576081bbb88af7262 (patch)
treecf36b95a4a964b03d6ecf75770ced2cb3a2ac3a9 /plugins-scripts/check_log.sh
parented7cdf82a42f16532801ea4f118870ce9a130fcf (diff)
parent911e44045d7291f5ede22739fd176ef55dd3de4a (diff)
downloadmonitoring-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-xplugins-scripts/check_log.sh2
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.
225if [ -x /bin/mktemp ]; then 225if [ -x /bin/mktemp ]; then
226
226 tempdiff=$(/bin/mktemp /tmp/check_log.XXXXXXXXXX) 227 tempdiff=$(/bin/mktemp /tmp/check_log.XXXXXXXXXX)
227else 228else
228 tempdiff=$(/bin/date '+%H%M%S') 229 tempdiff=$(/bin/date '+%H%M%S')
@@ -233,6 +234,7 @@ fi
233 234
234diff "$logfile" "$oldlog" | grep -v "^>" > "$tempdiff" 235diff "$logfile" "$oldlog" | grep -v "^>" > "$tempdiff"
235 236
237
236if [ $ALL ]; then 238if [ $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")