Compare commits

...

4 Commits

Author SHA1 Message Date
sneak eb0549a511 portability for lunix 2020-05-26 23:03:55 +00:00
Jeffrey Paul 6e9182b257 rename filerename file 2020-05-06 13:17:12 -07:00
Jeffrey Paul 2dccccea8b improvements to fixcatalinaimprovements to fixcatalina 2020-05-06 13:16:52 -07:00
Jeffrey Paul 5a42a909bb local mods 2020-05-06 13:10:04 -07:00
3 changed files with 134 additions and 91 deletions

View File

@ -1,5 +1,9 @@
#!/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.
@ -15,156 +19,192 @@
TODISABLE=() TODISABLE=()
# iCloud # iCloud
TODISABLE+=('com.apple.security.cloudkeychainproxy3' \ TODISABLE+=( \
'com.apple.iCloudUserNotifications' \
'com.apple.icloud.findmydeviced.findmydevice-user-agent' \
'com.apple.icloud.fmfd' \
'com.apple.icloud.searchpartyuseragent' \
'com.apple.cloudd' \ 'com.apple.cloudd' \
'com.apple.cloudpaird' \ 'com.apple.cloudpaird' \
'com.apple.cloudphotosd' \ 'com.apple.cloudphotosd' \
'com.apple.followupd' \ 'com.apple.followupd' \
'com.apple.protectedcloudstorage.protectedcloudkeysyncing') 'com.apple.iCloudUserNotifications' \
'com.apple.icloud.findmydeviced.findmydevice-user-agent' \
'com.apple.icloud.fmfd' \
'com.apple.icloud.searchpartyuseragent' \
'com.apple.protectedcloudstorage.protectedcloudkeysyncing' \
'com.apple.security.cloudkeychainproxy3' \
)
# Safari useless stuff # Safari useless stuff
TODISABLE+=('com.apple.SafariBookmarksSyncAgent' \ TODISABLE+=( \
'com.apple.SafariCloudHistoryPushAgent' \ 'com.apple.SafariCloudHistoryPushAgent' \
'com.apple.WebKit.PluginAgent') 'com.apple.WebKit.PluginAgent' \
'com.apple.SafariBookmarksSyncAgent' \
)
# iMessage / Facetime # iMessage / Facetime
TODISABLE+=('com.apple.imagent' \ TODISABLE+=( \
'com.apple.avconferenced' \
'com.apple.imautomatichistorydeletionagent' \ 'com.apple.imautomatichistorydeletionagent' \
'com.apple.imklaunchagent' \ 'com.apple.imklaunchagent' \
'com.apple.imtransferagent' \ 'com.apple.imtransferagent' \
'com.apple.avconferenced') 'com.apple.imagent' \
)
# Game Center / Passbook / Apple TV / Homekit... # Game Center / Passbook / Apple TV / Homekit...
TODISABLE+=('com.apple.gamed' \ TODISABLE+=( \
'com.apple.passd' \
'com.apple.Maps.pushdaemon' \
'com.apple.videosubscriptionsd' \
'com.apple.CommCenter-osx' \ 'com.apple.CommCenter-osx' \
'com.apple.homed') 'com.apple.Maps.pushdaemon' \
'com.apple.homed' \
'com.apple.passd' \
'com.apple.videosubscriptionsd' \
'com.apple.gamed' \
)
# Ad-related # Ad-related
TODISABLE+=('com.apple.ap.adprivacyd' \ TODISABLE+=( \
'com.apple.ap.adservicesd') 'com.apple.ap.adservicesd' \
'com.apple.ap.adprivacyd' \
)
# Screensharing # Screensharing
TODISABLE+=('com.apple.screensharing.MessagesAgent' \ TODISABLE+=( \
'com.apple.screensharing.agent' \ 'com.apple.screensharing.agent' \
'com.apple.screensharing.menuextra') 'com.apple.screensharing.menuextra' \
'com.apple.screensharing.MessagesAgent' \
)
# Siri # Siri
TODISABLE+=('com.apple.siriknowledged' \ TODISABLE+=( \
'com.apple.Siri.agent' \
'com.apple.assistant_service' \ 'com.apple.assistant_service' \
'com.apple.assistantd' \ 'com.apple.assistantd' \
'com.apple.Siri.agent' \ 'com.apple.parsec-fbf' \
'com.apple.parsec-fbf') 'com.apple.siriknowledged' \
)
# VoiceOver / accessibility-related stuff # VoiceOver / accessibility-related stuff
TODISABLE+=('com.apple.VoiceOver' \ TODISABLE+=( \
'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+=('com.apple.quicklook.ui.helper' \ TODISABLE+=( \
'com.apple.quicklook' \
'com.apple.quicklook.ThumbnailsAgent' \ 'com.apple.quicklook.ThumbnailsAgent' \
'com.apple.quicklook') 'com.apple.quicklook.ui.helper' \
)
# Sidecar # Sidecar
TODISABLE+=('com.apple.sidecar-hid-relay' \ TODISABLE+=( \
'com.apple.sidecar-relay') 'com.apple.sidecar-relay'
'com.apple.sidecar-hid-relay' \
)
# Debugging process # Debugging process
TODISABLE+=('com.apple.spindump_agent' \ TODISABLE+=( \
'com.apple.DiagnosticReportCleanup' \
'com.apple.ReportCrash' \ 'com.apple.ReportCrash' \
'com.apple.ReportGPURestart' \ 'com.apple.ReportGPURestart' \
'com.apple.ReportPanic' \ 'com.apple.ReportPanic' \
'com.apple.DiagnosticReportCleanup' \ 'com.apple.TrustEvaluationAgent' \
'com.apple.TrustEvaluationAgent') 'com.apple.spindump_agent' \
)
# Screentime # Screentime
TODISABLE+=('com.apple.ScreenTimeAgent' \ TODISABLE+=( \
'com.apple.UsageTrackingAgent') 'com.apple.UsageTrackingAgent' \
'com.apple.ScreenTimeAgent' \
)
# Others # Others
TODISABLE+=('com.apple.telephonyutilities.callservicesd' \ TODISABLE+=( \
'com.apple.photoanalysisd' \
'com.apple.parsecd' \
'com.apple.AOSPushRelay' \
'com.apple.AOSHeartbeat' \ 'com.apple.AOSHeartbeat' \
'com.apple.AOSPushRelay' \
'com.apple.AddressBook.SourceSync' \
'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.sharingd' \ 'com.apple.helpd' \
'com.apple.identityservicesd' \ 'com.apple.identityservicesd' \
'com.apple.java.InstallOnDemand' \ 'com.apple.java.InstallOnDemand' \
'com.apple.parentalcontrols.check' \ 'com.apple.keyboardservicesd' \
'com.apple.security.keychain-circle-notification' \ 'com.apple.knowledge-agent' \
'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.remindd' \
'com.apple.keyboardservicesd' \
'com.apple.AddressBook.SourceSync' \
'com.apple.telephonyutilities.callservicesd' \
'com.apple.mobileassetd' \ 'com.apple.mobileassetd' \
'com.apple.CalendarAgent' \ 'com.apple.parentalcontrols.check' \
'com.apple.knowledge-agent') 'com.apple.parsecd' \
'com.apple.photoanalysisd' \
'com.apple.remindd' \
'com.apple.security.keychain-circle-notification' \
'com.apple.sharingd' \
'com.apple.suggestd' \
'com.apple.syncdefaultsd' \
'com.apple.telephonyutilities.callservicesd' \
'com.apple.touristd' \
'com.apple.telephonyutilities.callservicesd' \
)
for agent in "${TODISABLE[@]}" echo Disabling unwanted LaunchAgents...
do for agent in "${TODISABLE[@]}"; do
mv ./System/Library/LaunchAgents/${agent}.plist ./System/Library/LaunchAgents/${agent}.plist.bak if [[ -e "./System/Library/launchAgents/${agent}.plist" ]]; then
echo "[OK] Agent ${agent} disabled" mv "./System/Library/LaunchAgents/${agent}.plist" \
"./System/Library/LaunchAgents/${agent}.plist.bak"
echo "[OK] Agent ${agent} disabled"
fi
done done
# Daemons to disable # Daemons to disable
TODISABLE=() TODISABLE=()
# iCloud # iCloud
TODISABLE+=('com.apple.analyticsd', 'com.apple.icloud.findmydeviced') TODISABLE+=( \
'com.apple.analyticsd' \
'com.apple.icloud.findmydeviced' \
)
# Others # Others
TODISABLE+=('com.apple.netbiosd' \ TODISABLE+=( \
'com.apple.preferences.timezone.admintool' \ 'com.apple.ManagedClient' \
'com.apple.remotepairtool' \
'com.apple.security.FDERecoveryAgent' \
'com.apple.SubmitDiagInfo' \
'com.apple.screensharing' \
'com.apple.appleseed.fbahelperd' \
'com.apple.apsd' \
'com.apple.ManagedClient.cloudconfigurationd' \ 'com.apple.ManagedClient.cloudconfigurationd' \
'com.apple.ManagedClient.enroll' \ 'com.apple.ManagedClient.enroll' \
'com.apple.ManagedClient' \
'com.apple.ManagedClient.startup' \ '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.locate' \
'com.apple.locationd' \ 'com.apple.locationd' \
'com.apple.eapolcfg_auth' \ 'com.apple.mediaremoted' \
'com.apple.RemoteDesktop.PrivilegeProxy' \ 'com.apple.preferences.timezone.admintool' \
'com.apple.mediaremoted') 'com.apple.remotepairtool' \
'com.apple.screensharing' \
'com.apple.security.FDERecoveryAgent' \
'com.apple.netbiosd' \
)
for daemon in "${TODISABLE[@]}" for daemon in "${TODISABLE[@]}" ; do
do if [[ -e "./System/Library/LaunchDaemons/${daemon}.plist" ]]; then
mv ./System/Library/LaunchDaemons/${daemon}.plist ./System/Library/LaunchDaemons/${daemon}.plist.bak mv "./System/Library/LaunchDaemons/${daemon}.plist" \
echo "[OK] Daemon ${daemon} disabled" "./System/Library/LaunchDaemons/${daemon}.plist.bak"
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,6 +63,7 @@ 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/"
@ -174,9 +175,11 @@ RE+=" --exclude=/iBooks.app"
RE+=" --exclude=/iMovie.app" RE+=" --exclude=/iMovie.app"
RE+=" --exclude=/iTunes.app" RE+=" --exclude=/iTunes.app"
RETVAL=255 if [[ "$(uname)" = "Darwin" ]]; then
while [ $RETVAL -ne 0 ]; do RETVAL=255
$RSYNC $OPTS $RE $MINRE /Applications/ ${BACKUPDEST}/Applications/ while [ $RETVAL -ne 0 ]; do
RETVAL=$? $RSYNC $OPTS $RE $MINRE /Applications/ ${BACKUPDEST}/Applications/
sleep 1; RETVAL=$?
done sleep 1;
done
fi