From 4260893b48d4a39382bebe7c7f0a715f9feb92c8 Mon Sep 17 00:00:00 2001 From: Brian Zalewski <59970525+ProfessorManhattan@users.noreply.github.com> Date: Wed, 14 Jun 2023 05:54:15 +0000 Subject: [PATCH] Latest --- .../com.apple.automatedupdates.plist | 18 ++++++++++++++++++ .../run_onchange_after_launch-daemons.sh.tmpl | 6 ++++++ 2 files changed, 24 insertions(+) create mode 100644 home/Library/LaunchDaemons/com.apple.automatedupdates.plist create mode 100644 home/Library/LaunchDaemons/run_onchange_after_launch-daemons.sh.tmpl diff --git a/home/Library/LaunchDaemons/com.apple.automatedupdates.plist b/home/Library/LaunchDaemons/com.apple.automatedupdates.plist new file mode 100644 index 00000000..212eac6e --- /dev/null +++ b/home/Library/LaunchDaemons/com.apple.automatedupdates.plist @@ -0,0 +1,18 @@ + + + + + Label + com.apple.automatedupdates + ProgramArguments + + /usr/sbin/softwareupdate + -i -a + + StartCalendarInterval + + Minute + 0 + + + \ No newline at end of file diff --git a/home/Library/LaunchDaemons/run_onchange_after_launch-daemons.sh.tmpl b/home/Library/LaunchDaemons/run_onchange_after_launch-daemons.sh.tmpl new file mode 100644 index 00000000..10b001b6 --- /dev/null +++ b/home/Library/LaunchDaemons/run_onchange_after_launch-daemons.sh.tmpl @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +### Enable automated updates on macOS +if [ -f "$HOME/Library/LaunchDaemons/com.apple.automatedupdates.plist" ]; then + sudo launchctl load "$HOME/Library/LaunchDaemons/com.apple.automatedupdates.plist" +fi