Skip to content

Instantly share code, notes, and snippets.

@jakebathman
Created February 15, 2018 20:25
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jakebathman/3826d4f2f53665e810bb37926a35f969 to your computer and use it in GitHub Desktop.
Save jakebathman/3826d4f2f53665e810bb37926a35f969 to your computer and use it in GitHub Desktop.
Determine if Backblaze is currently backing up files on macOS
#!/bin/sh
# This will look at the overviewstatus.xml file and
# determine if Backblaze is currently transmitting a file.
#
# Developed against:
# macOS 10.13.3
# Backblaze 5.2.0.172
BBSTATUS='/Library/Backblaze.bzpkg/bzdata/overviewstatus.xml'
if ggrep -iqP 'cur\_state=\"transmitting\" current\_file=\"(?!Producing File Lists)' "$BBSTATUS"; then
echo 1;
else
# 1 = false
echo 0;
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment