install.fairie/home/Library/LaunchDaemons/run_onchange_after_launch-daemons.sh.tmpl
Brian Zalewski e81b978d95 Latest
2023-06-14 07:22:59 +00:00

10 lines
541 B
Bash

#!/usr/bin/env bash
### Enable automated updates on macOS
if [ -d /Applications ] && [ -d /System ]; then
if [ -f "$HOME/Library/LaunchDaemons/com.apple.automatedupdates.plist" ] && [ ! -f "/Library/LaunchDaemons/com.apple.automatedupdates.plist" ]; then
sudo mkdir -p /Library/LaunchDaemons
sudo cp -f "$HOME/Library/LaunchDaemons/com.apple.automatedupdates.plist" "/Library/LaunchDaemons/com.apple.automatedupdates.plist"
sudo launchctl load "/Library/LaunchDaemons/com.apple.automatedupdates.plist"
fi
fi