Skip to content

Instantly share code, notes, and snippets.

@mmillar-bolis
Created November 23, 2020 07:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mmillar-bolis/e69fc0b94377f152fff4a53c3862daaa to your computer and use it in GitHub Desktop.
Save mmillar-bolis/e69fc0b94377f152fff4a53c3862daaa to your computer and use it in GitHub Desktop.
#!/bin/bash
# NOTE: Just a cut+paste example to work myself out of a hole, if necessary.
# Same deal as the other script, only this time, we use PlistBuddy to delete
# the Disable key in all of the daemon property lists and then force load them.
# Agents to enable
agents=('com.apple.security.keychainsyncingoveridsproxy' 'com.apple.personad' 'com.apple.passd' 'com.apple.screensharing.MessagesAgent' 'com.apple.Maps.mapspushd' 'com.apple.Maps.pushdaemon' 'com.apple.photoanalysisd' 'com.apple.telephonyutilities.callservicesd' 'com.apple.AirPortBaseStationAgent' 'com.apple.DictationIM' 'com.apple.iCloudUserNotifications' 'com.apple.familycircled' 'com.apple.familycontrols.useragent' 'com.apple.familynotificationd' 'com.apple.gamed' 'com.apple.iCloud.findmydeviced.findmydevice-user-agent' 'com.apple.iCloud.fmfd' 'com.apple.cloudfamilyrestrictionsd-mac' 'com.apple.cloudpaird' 'com.apple.cloudphotosd' 'com.apple.DictationIM' 'com.apple.assistant_service' 'com.apple.AOSPushRelay' 'com.apple.CallHistorySyncHelper' 'com.apple.CallHistoryPluginHelper' 'com.apple.geodMachServiceBridge' 'com.apple.syncdefaultsd' 'com.apple.security.cloudkeychainproxy3' 'com.apple.security.idskeychainsyncingproxy' 'com.apple.security.keychain-circle-notification' 'com.apple.sharingd' 'com.apple.appleseed.seedusaged' 'com.apple.cloudd' 'com.apple.assistantd' 'com.apple.parentalcontrols.check' 'com.apple.parsecd' 'com.apple.identityservicesd' 'com.apple.IMLoggingAgent' 'com.apple.Siri' 'com.apple.ReportCrash')
# Daemons to enable
daemons=('com.apple.mediaremoted' 'com.apple.remotepairtool' 'com.apple.rpmuxd' 'com.apple.security.FDERecoveryAgent' 'com.apple.icloud.findmydeviced' 'com.apple.findmymacmessenger' 'com.apple.familycontrols' 'com.apple.findmymac' 'com.apple.SubmitDiagInfo' 'com.apple.screensharing' 'com.apple.appleseed.fbahelperd' 'com.apple.FileSyncAgent.sshd' 'com.apple.ManagedClient.cloudconfigurationd' 'com.apple.AOSNotificationsOSX' 'com.apple.ManagedClient.enroll' 'com.apple.ManagedClient' 'com.apple.ManagedClient.startup' 'com.apple.iCloudStats' 'com.apple.locationd' 'com.apple.mbicloudsetupd' 'com.apple.laterscheduler' 'com.apple.awacsd' 'com.apple.eapolcfg_auth' 'com.apple.familycontrols' 'com.apple.nfcd' 'com.apple.dprivacyd' 'com.apple.ReportCrash.Root' 'com.apple.GameController.gamecontrollerd' 'com.apple.gamed' 'com.apple.siri' 'com.apple.siri.acousticsignature')
for agent in "${agents[@]}"; do
{
/usr/libexec/PlistBuddy -c "Remove Disabled" /System/Library/LaunchDaemons/${agent}.plist
launchctl load -w /System/Library/LaunchAgents/${agent}.plist
} &> /dev/null
echo "[SUCCESS] Enabled ${agent}"
done
for daemon in "${daemons[@]}"; do
{
/usr/libexec/PlistBuddy -c "Remove Disabled" /System/Library/LaunchDaemons/${daemon}.plist
launchctl load -w /System/Library/LaunchDaemons/${daemon}.plist
} &> /dev/null
echo "[SUCCESS] Enabled ${daemon}"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment