Created
May 5, 2020 08:09
-
-
Save maffinca69/74ac926e06ae75ae034668d8a930c21b to your computer and use it in GitHub Desktop.
This is gist has been created on based post nebular. Thanks all, who helped creating this script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
com.apple.security.keychainsyncingoveridsproxy | |
com.apple.personad | |
com.apple.passd | |
com.apple.screensharing.MessagesAgent | |
com.apple.CommCenter-osx | |
com.apple.Maps.mapspushd | |
com.apple.Maps.pushdaemon | |
com.apple.photoanalysisd | |
com.apple.telephonyutilities.callservicesd | |
com.apple.AirPlayUIAgent | |
com.apple.AirPortBaseStationAgent | |
com.apple.CalendarAgent | |
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.imagent | |
com.apple.cloudfamilyrestrictionsd-mac | |
com.apple.cloudpaird | |
com.apple.cloudphotosd | |
com.apple.DictationIM | |
com.apple.assistant_service | |
com.apple.CallHistorySyncHelper | |
com.apple.CallHistoryPluginHelper | |
com.apple.AOSPushRelay | |
com.apple.IMLoggingAgent | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
com.apple.preferences.timezone.admintool | |
com.apple.preferences.timezone.auto | |
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.appleseed.fbahelperd | |
com.apple.apsd | |
com.apple.AOSNotificationOSX | |
com.apple.FileSyncAgent.sshd | |
com.apple.ManagedClient.cloudconfigurationd | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
[ -f /etc/appleshit.daemons.cfg ] || { | |
echo "Please create /etc/appleshit.daemons.cfg with all daemons to disable, one per line." | |
exit 1 | |
} | |
[ -f /etc/appleshit.agents.cfg ] || { | |
echo "Please create /etc/appleshit.agents.cfg with all agents to disable, one per line." | |
exit 1 | |
} | |
# Create backup dirs if not already created | |
[ -d /System/Library/LaunchDaemons.off ] || mkdir /System/Library/LaunchDaemons.off | |
[ -d /System/Library/LaunchAgents.off ] || mkdir /System/Library/LaunchAgents.off | |
# Color, because why not?) | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
NC='\033[0m' # No Color | |
# Disable AGENTS | |
echo "----- APPLE AGENTS -----" | |
input="/etc/appleshit.agents.cfg" | |
while IFS= read -r agent | |
do | |
[ -f /System/Library/LaunchAgents/${agent}.plist ] && { | |
echo -e "${GREEN}${agent} exists, disabling${NC}" | |
launchctl unload -w /System/Library/LaunchAgents/${agent}.plist | |
sudo mv /System/Library/LaunchAgents/${agent}.plist /System/Library/LaunchAgents.off/${agent}.plist | |
} || { | |
echo -e "${RED}${agent} DOES NOT EXIST${NC}" | |
} | |
done < "$input" | |
# Disable DAEMONS | |
input="/etc/appleshit.daemons.cfg" | |
echo "----- APPLE DAEMONS -----" | |
while IFS= read -r daemon | |
do | |
[ -f /System/Library/LaunchDaemons/${daemon}.plist ] && { | |
echo -e "${GREEN}${daemon} exists, disabling${NC}" | |
launchctl unload -w /System/Library/LaunchDaemons/${daemon}.plist | |
sudo mv /System/Library/LaunchDaemons/${daemon}.plist /System/Library/LaunchDaemons.off/${daemon}.plist | |
} || { | |
echo -e "${RED}${daemon} DOES NOT EXIST${NC}" | |
} | |
done < "$input" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# AGENTS | |
echo "----- APPLE AGENTS" | |
input="/etc/appleshit.agents.cfg" | |
while IFS= read -r agent | |
do | |
[ -f /System/Library/LaunchAgents.off/${agent}.plist ] && { | |
echo "- A ${agent} was disabled, enabling" | |
mv /System/Library/LaunchAgents.off/${agent}.plist /System/Library/LaunchAgents/${agent}.plist | |
launchctl load -w /System/Library/LaunchAgents/${agent}.plist | |
} || { | |
echo "! A ${agent} does not exists, or was not disabled" | |
} | |
done < "$input" | |
# DAEMONS | |
input="/etc/appleshit.daemons.cfg" | |
echo "----- APPLE DAEMONS" | |
while IFS= read -r daemon | |
do | |
[ -f /System/Library/LaunchDaemons.off/${daemon}.plist ] && { | |
echo "- D ${daemon} was disabled, enabling" | |
mv /System/Library/LaunchDaemons.off/${daemon}.plist /System/Library/LaunchDaemons/${daemon}.plist | |
launchctl load -w /System/Library/LaunchDaemons/${daemon}.plist | |
} || { | |
echo "! D ${daemon} does not exists, or was not disabled" | |
} | |
done < "$input" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment