Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable tmutil timemachine check #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions agents/check_mk_agent.macosx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export LC_ALL=C
OrigLANG=${LANG}
unset LANG

CMK_VERSION="2.0.0p19"
CMK_VERSION="2.3.0p11"
export MK_LIBDIR='/usr/local/lib/check_mk_agent'
export MK_CONFDIR='/etc/check_mk'
export MK_VARDIR='/var/lib/check_mk_agent'
Expand Down Expand Up @@ -400,16 +400,13 @@ if [ -r "$MK_CONFDIR/fileinfo.cfg" ] ; then
IFS=$OLD_IFS
fi

# Doesn't work since 10.14 due to missing permissions for tmutil
case $osver in
10.?.*|10.1[0-3].*)
if command -v tmutil >/dev/null 2>&1
then
echo '<<<timemachine>>>'
tmutil latestbackup 2>&1
fi
;;
esac
# Full Disk Access has to be allowed to /bin/sh for this to work on macOS 10.14+
# Only allow it if you are aware what the security implications of it are!!!
if command -v tmutil >/dev/null 2>&1
then
echo '<<<timemachine>>>'
tmutil latestbackup 2>&1
fi

# temperatures and sensors, requires HardwareMonitor.app. On newer machines/OSes
# HardwareMonitor.app has no access to relevant sensors any more and if macOS'
Expand Down