Compare commits

..

No commits in common. "eb0549a5111ad8b54a0a24cf3cab8dcad6d13d1c" and "e8c586aad585e9e801f6a9692e7edc34bd45b1b3" have entirely different histories.

3 changed files with 91 additions and 134 deletions

View File

@ -1,9 +1,5 @@
#!/bin/bash #!/bin/bash
# script originally found at
# https://gist.github.com/pwnsdx/1217727ca57de2dd2a372afdd7a0fc21
# thanks to @pwnsdx
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it! # IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it!
# IMPORTANT: You will need to run this script from Recovery. In fact, macOS Catalina brings read-only filesystem which prevent this script from working from the main OS. # IMPORTANT: You will need to run this script from Recovery. In fact, macOS Catalina brings read-only filesystem which prevent this script from working from the main OS.
# This script needs to be run from the volume you wish to use. # This script needs to be run from the volume you wish to use.
@ -19,192 +15,156 @@
TODISABLE=() TODISABLE=()
# iCloud # iCloud
TODISABLE+=( \ TODISABLE+=('com.apple.security.cloudkeychainproxy3' \
'com.apple.cloudd' \
'com.apple.cloudpaird' \
'com.apple.cloudphotosd' \
'com.apple.followupd' \
'com.apple.iCloudUserNotifications' \ 'com.apple.iCloudUserNotifications' \
'com.apple.icloud.findmydeviced.findmydevice-user-agent' \ 'com.apple.icloud.findmydeviced.findmydevice-user-agent' \
'com.apple.icloud.fmfd' \ 'com.apple.icloud.fmfd' \
'com.apple.icloud.searchpartyuseragent' \ 'com.apple.icloud.searchpartyuseragent' \
'com.apple.protectedcloudstorage.protectedcloudkeysyncing' \ 'com.apple.cloudd' \
'com.apple.security.cloudkeychainproxy3' \ 'com.apple.cloudpaird' \
) 'com.apple.cloudphotosd' \
'com.apple.followupd' \
'com.apple.protectedcloudstorage.protectedcloudkeysyncing')
# Safari useless stuff # Safari useless stuff
TODISABLE+=( \ TODISABLE+=('com.apple.SafariBookmarksSyncAgent' \
'com.apple.SafariCloudHistoryPushAgent' \ 'com.apple.SafariCloudHistoryPushAgent' \
'com.apple.WebKit.PluginAgent' \ 'com.apple.WebKit.PluginAgent')
'com.apple.SafariBookmarksSyncAgent' \
)
# iMessage / Facetime # iMessage / Facetime
TODISABLE+=( \ TODISABLE+=('com.apple.imagent' \
'com.apple.avconferenced' \
'com.apple.imautomatichistorydeletionagent' \ 'com.apple.imautomatichistorydeletionagent' \
'com.apple.imklaunchagent' \ 'com.apple.imklaunchagent' \
'com.apple.imtransferagent' \ 'com.apple.imtransferagent' \
'com.apple.imagent' \ 'com.apple.avconferenced')
)
# Game Center / Passbook / Apple TV / Homekit... # Game Center / Passbook / Apple TV / Homekit...
TODISABLE+=( \ TODISABLE+=('com.apple.gamed' \
'com.apple.CommCenter-osx' \
'com.apple.Maps.pushdaemon' \
'com.apple.homed' \
'com.apple.passd' \ 'com.apple.passd' \
'com.apple.Maps.pushdaemon' \
'com.apple.videosubscriptionsd' \ 'com.apple.videosubscriptionsd' \
'com.apple.gamed' \ 'com.apple.CommCenter-osx' \
) 'com.apple.homed')
# Ad-related # Ad-related
TODISABLE+=( \ TODISABLE+=('com.apple.ap.adprivacyd' \
'com.apple.ap.adservicesd' \ 'com.apple.ap.adservicesd')
'com.apple.ap.adprivacyd' \
)
# Screensharing # Screensharing
TODISABLE+=( \ TODISABLE+=('com.apple.screensharing.MessagesAgent' \
'com.apple.screensharing.agent' \ 'com.apple.screensharing.agent' \
'com.apple.screensharing.menuextra' \ 'com.apple.screensharing.menuextra')
'com.apple.screensharing.MessagesAgent' \
)
# Siri # Siri
TODISABLE+=( \ TODISABLE+=('com.apple.siriknowledged' \
'com.apple.Siri.agent' \
'com.apple.assistant_service' \ 'com.apple.assistant_service' \
'com.apple.assistantd' \ 'com.apple.assistantd' \
'com.apple.parsec-fbf' \ 'com.apple.Siri.agent' \
'com.apple.siriknowledged' \ 'com.apple.parsec-fbf')
)
# VoiceOver / accessibility-related stuff # VoiceOver / accessibility-related stuff
TODISABLE+=( \ TODISABLE+=('com.apple.VoiceOver' \
'com.apple.voicememod' \
'com.apple.accessibility.AXVisualSupportAgent' \ 'com.apple.accessibility.AXVisualSupportAgent' \
'com.apple.accessibility.dfrhud' \ 'com.apple.accessibility.dfrhud' \
'com.apple.accessibility.heard' \ 'com.apple.accessibility.heard')
'com.apple.voicememod' \
'com.apple.VoiceOver' \
)
# Quicklook # Quicklook
TODISABLE+=( \ TODISABLE+=('com.apple.quicklook.ui.helper' \
'com.apple.quicklook' \
'com.apple.quicklook.ThumbnailsAgent' \ 'com.apple.quicklook.ThumbnailsAgent' \
'com.apple.quicklook.ui.helper' \ 'com.apple.quicklook')
)
# Sidecar # Sidecar
TODISABLE+=( \ TODISABLE+=('com.apple.sidecar-hid-relay' \
'com.apple.sidecar-relay' 'com.apple.sidecar-relay')
'com.apple.sidecar-hid-relay' \
)
# Debugging process # Debugging process
TODISABLE+=( \ TODISABLE+=('com.apple.spindump_agent' \
'com.apple.DiagnosticReportCleanup' \
'com.apple.ReportCrash' \ 'com.apple.ReportCrash' \
'com.apple.ReportGPURestart' \ 'com.apple.ReportGPURestart' \
'com.apple.ReportPanic' \ 'com.apple.ReportPanic' \
'com.apple.TrustEvaluationAgent' \ 'com.apple.DiagnosticReportCleanup' \
'com.apple.spindump_agent' \ 'com.apple.TrustEvaluationAgent')
)
# Screentime # Screentime
TODISABLE+=( \ TODISABLE+=('com.apple.ScreenTimeAgent' \
'com.apple.UsageTrackingAgent' \ 'com.apple.UsageTrackingAgent')
'com.apple.ScreenTimeAgent' \
)
# Others # Others
TODISABLE+=( \ TODISABLE+=('com.apple.telephonyutilities.callservicesd' \
'com.apple.AOSHeartbeat' \ 'com.apple.photoanalysisd' \
'com.apple.parsecd' \
'com.apple.AOSPushRelay' \ 'com.apple.AOSPushRelay' \
'com.apple.AddressBook.SourceSync' \ 'com.apple.AOSHeartbeat' \
'com.apple.AddressBook.abd' \
'com.apple.AirPlayUIAgent' \ 'com.apple.AirPlayUIAgent' \
'com.apple.AirPortBaseStationAgent' \ 'com.apple.AirPortBaseStationAgent' \
'com.apple.CalendarAgent' \
'com.apple.CallHistoryPluginHelper' \
'com.apple.CallHistorySyncHelper' \
'com.apple.KeyboardAccessAgent' \
'com.apple.RemoteDesktop' \
'com.apple.SocialPushAgent' \
'com.apple.amp.mediasharingd' \
'com.apple.appleseed.seedusaged' \
'com.apple.appleseed.seedusaged.postinstall' \
'com.apple.exchange.exchangesyncd' \
'com.apple.familycircled' \ 'com.apple.familycircled' \
'com.apple.familycontrols.useragent' \ 'com.apple.familycontrols.useragent' \
'com.apple.familynotificationd' \ 'com.apple.familynotificationd' \
'com.apple.findmymacmessenger' \ 'com.apple.findmymacmessenger' \
'com.apple.helpd' \ 'com.apple.sharingd' \
'com.apple.identityservicesd' \ 'com.apple.identityservicesd' \
'com.apple.java.InstallOnDemand' \ 'com.apple.java.InstallOnDemand' \
'com.apple.keyboardservicesd' \ 'com.apple.parentalcontrols.check' \
'com.apple.knowledge-agent' \ 'com.apple.security.keychain-circle-notification' \
'com.apple.syncdefaultsd' \
'com.apple.appleseed.seedusaged' \
'com.apple.appleseed.seedusaged.postinstall' \
'com.apple.CallHistorySyncHelper' \
'com.apple.RemoteDesktop' \
'com.apple.CallHistoryPluginHelper' \
'com.apple.SocialPushAgent' \
'com.apple.touristd' \
'com.apple.macos.studentd' \ 'com.apple.macos.studentd' \
'com.apple.KeyboardAccessAgent' \
'com.apple.exchange.exchangesyncd' \
'com.apple.suggestd' \
'com.apple.AddressBook.abd' \
'com.apple.helpd' \
'com.apple.amp.mediasharingd' \
'com.apple.mediaanalysisd' \ 'com.apple.mediaanalysisd' \
'com.apple.mediaremoteagent' \ 'com.apple.mediaremoteagent' \
'com.apple.mobileassetd' \
'com.apple.parentalcontrols.check' \
'com.apple.parsecd' \
'com.apple.photoanalysisd' \
'com.apple.remindd' \ 'com.apple.remindd' \
'com.apple.security.keychain-circle-notification' \ 'com.apple.keyboardservicesd' \
'com.apple.sharingd' \ 'com.apple.AddressBook.SourceSync' \
'com.apple.suggestd' \
'com.apple.syncdefaultsd' \
'com.apple.telephonyutilities.callservicesd' \ 'com.apple.telephonyutilities.callservicesd' \
'com.apple.touristd' \ 'com.apple.mobileassetd' \
'com.apple.telephonyutilities.callservicesd' \ 'com.apple.CalendarAgent' \
) 'com.apple.knowledge-agent')
echo Disabling unwanted LaunchAgents... for agent in "${TODISABLE[@]}"
for agent in "${TODISABLE[@]}"; do do
if [[ -e "./System/Library/launchAgents/${agent}.plist" ]]; then mv ./System/Library/LaunchAgents/${agent}.plist ./System/Library/LaunchAgents/${agent}.plist.bak
mv "./System/Library/LaunchAgents/${agent}.plist" \
"./System/Library/LaunchAgents/${agent}.plist.bak"
echo "[OK] Agent ${agent} disabled" echo "[OK] Agent ${agent} disabled"
fi
done done
# Daemons to disable # Daemons to disable
TODISABLE=() TODISABLE=()
# iCloud # iCloud
TODISABLE+=( \ TODISABLE+=('com.apple.analyticsd', 'com.apple.icloud.findmydeviced')
'com.apple.analyticsd' \
'com.apple.icloud.findmydeviced' \
)
# Others # Others
TODISABLE+=( \ TODISABLE+=('com.apple.netbiosd' \
'com.apple.ManagedClient' \
'com.apple.ManagedClient.cloudconfigurationd' \
'com.apple.ManagedClient.enroll' \
'com.apple.ManagedClient.startup' \
'com.apple.RemoteDesktop.PrivilegeProxy' \
'com.apple.SubmitDiagInfo' \
'com.apple.appleseed.fbahelperd' \
'com.apple.apsd' \
'com.apple.eapolcfg_auth' \
'com.apple.locate' \
'com.apple.locationd' \
'com.apple.mediaremoted' \
'com.apple.preferences.timezone.admintool' \ 'com.apple.preferences.timezone.admintool' \
'com.apple.remotepairtool' \ 'com.apple.remotepairtool' \
'com.apple.screensharing' \
'com.apple.security.FDERecoveryAgent' \ 'com.apple.security.FDERecoveryAgent' \
'com.apple.netbiosd' \ 'com.apple.SubmitDiagInfo' \
) 'com.apple.screensharing' \
'com.apple.appleseed.fbahelperd' \
'com.apple.apsd' \
'com.apple.ManagedClient.cloudconfigurationd' \
'com.apple.ManagedClient.enroll' \
'com.apple.ManagedClient' \
'com.apple.ManagedClient.startup' \
'com.apple.locate' \
'com.apple.locationd' \
'com.apple.eapolcfg_auth' \
'com.apple.RemoteDesktop.PrivilegeProxy' \
'com.apple.mediaremoted')
for daemon in "${TODISABLE[@]}" ; do for daemon in "${TODISABLE[@]}"
if [[ -e "./System/Library/LaunchDaemons/${daemon}.plist" ]]; then do
mv "./System/Library/LaunchDaemons/${daemon}.plist" \ mv ./System/Library/LaunchDaemons/${daemon}.plist ./System/Library/LaunchDaemons/${daemon}.plist.bak
"./System/Library/LaunchDaemons/${daemon}.plist.bak"
echo "[OK] Daemon ${daemon} disabled" echo "[OK] Daemon ${daemon} disabled"
fi
done done

View File

@ -40,8 +40,8 @@ mailoffsite: imapbackup
databackup: databackup:
mkdir -p $(HOME)/Library/misc mkdir -p $(HOME)/Library/misc
#brew list > $(HOME)/Library/misc/brewinstalled.txt brew list > $(HOME)/Library/misc/brewinstalled.txt
#brew cask list > $(HOME)/Library/misc/brew-cask-installed.txt brew cask list > $(HOME)/Library/misc/brew-cask-installed.txt
~/dev/hacks/bin/backup.command ~/dev/hacks/bin/backup.command
cleanup: cleanup:

View File

@ -63,7 +63,6 @@ RE+=" --exclude=/Library/Containers/com.docker.docker/"
RE+=" --exclude=/Library/Cookies/" RE+=" --exclude=/Library/Cookies/"
RE+=" --exclude=/Library/Developer/" RE+=" --exclude=/Library/Developer/"
RE+=" --exclude=/Library/Homebrew/" RE+=" --exclude=/Library/Homebrew/"
RE+=" --exclude=/Library/Syncthing/folders/" # syncthing is its own backup
RE+=" --exclude=/Library/Logs/" RE+=" --exclude=/Library/Logs/"
RE+=" --exclude=/Library/Mail/" # keep your mail on the server! RE+=" --exclude=/Library/Mail/" # keep your mail on the server!
RE+=" --exclude=/Library/Mail?Downloads/" RE+=" --exclude=/Library/Mail?Downloads/"
@ -175,11 +174,9 @@ RE+=" --exclude=/iBooks.app"
RE+=" --exclude=/iMovie.app" RE+=" --exclude=/iMovie.app"
RE+=" --exclude=/iTunes.app" RE+=" --exclude=/iTunes.app"
if [[ "$(uname)" = "Darwin" ]]; then
RETVAL=255 RETVAL=255
while [ $RETVAL -ne 0 ]; do while [ $RETVAL -ne 0 ]; do
$RSYNC $OPTS $RE $MINRE /Applications/ ${BACKUPDEST}/Applications/ $RSYNC $OPTS $RE $MINRE /Applications/ ${BACKUPDEST}/Applications/
RETVAL=$? RETVAL=$?
sleep 1; sleep 1;
done done
fi