From 27127792ccc49a8c9ea1e305b666222583b70030 Mon Sep 17 00:00:00 2001 From: Alex Narvey Date: Thu, 26 Mar 2026 08:53:44 -0500 Subject: [PATCH] If backblaze is not present create an empty cache file Create an empty backblaze.txt before exiting if backblaze is not present. This way, the munkireport warning log does not fill up with warnings e.g.: WARNING: Can't open /usr/local/munkireport/scripts/cache/backblaze.txt --- scripts/backblaze.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/backblaze.sh b/scripts/backblaze.sh index e1be0a3..4cb15ae 100644 --- a/scripts/backblaze.sh +++ b/scripts/backblaze.sh @@ -10,7 +10,7 @@ SEPARATOR=' = ' # Business logic goes here bzpath="/Library/Backblaze.bzpkg/bzdata/bzreports" -bzversion=`cat "$bzpath"/bzserv_version.txt 2>/dev/null` || exit 0 +bzversion=`cat "$bzpath"/bzserv_version.txt 2>/dev/null` || { touch "${OUTPUT_FILE}"; exit 0; } bzlogin=$(grep -o 'bzlogin="[^"]*"' "$bzpath"/bzdc_synchostinfo.xml | sed 's/bzlogin="//;s/"//') bzlicense=$(grep -o 'bzlicense="[^"]*"' "$bzpath"/bzdc_synchostinfo.xml | sed 's/bzlicense="//;s/"//') bzlicense_status=$(grep -o 'bzlicense_status="[^"]*"' "$bzpath"/bzdc_synchostinfo.xml | sed 's/bzlicense_status="//;s/"//')