install.fairie/home/Library/LaunchDaemons/run_onchange_after_launch-daemons.sh.tmpl

18 lines
1 KiB
Cheetah
Raw Normal View History

2023-06-13 22:54:15 -07:00
#!/usr/bin/env bash
2023-06-14 00:22:59 -07:00
if [ -d /Applications ] && [ -d /System ]; then
2023-07-09 22:46:56 -07:00
### Enable automated updates on macOS
2023-06-14 00:22:59 -07:00
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
2023-07-09 22:46:56 -07:00
### Enable CloudFlare WARP credentials auto-populate (since file is deleted when not managed with MDM)
if [ -f "$HOME/Library/LaunchDaemons/com.cloudflare.warp.plist" ] && [ ! -f "/Library/LaunchDaemons/com.cloudflare.warp.plist" ]; then
sudo mkdir -p /Library/LaunchDaemons
sudo cp -f "$HOME/Library/LaunchDaemons/com.cloudflare.warp.plist" '/Library/LaunchDaemons/com.cloudflare.warp.plist'
sudo launchctl load "/Library/LaunchDaemons/com.cloudflare.warp.plist"
fi
2023-06-13 22:54:15 -07:00
fi