Skip to content

Instantly share code, notes, and snippets.

@sorrell
Created August 19, 2020 18:11
Show Gist options
  • Save sorrell/5c827de84113d7434b2d69b2c232ff9c to your computer and use it in GitHub Desktop.
Save sorrell/5c827de84113d7434b2d69b2c232ff9c to your computer and use it in GitHub Desktop.

Revisions

  1. sorrell created this gist Aug 19, 2020.
    45 changes: 45 additions & 0 deletions provision.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,45 @@
    #!/bin/bash

    # Utility functions

    # Launch Daemons

    # Disable Apple Push Notification Service daemon
    # https://apple.stackexchange.com/questions/92214/how-to-disable-apple-push-notification-service-apsd-on-os-x-10-8
    sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.apsd.plist

    # Disable CalendarAgent
    launchctl unload -w /System/Library/LaunchAgents/com.apple.CalendarAgent.plist

    # Disable NetBIOS daemon (netbiosd)
    sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.netbiosd.plist

    # Disable Location Services (locationd)
    sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.locationd.plist

    # Disable Notification Center
    # https://apple.stackexchange.com/questions/106149/how-do-i-permanently-disable-notification-center-in-mavericks
    sudo launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist

    # Disable QuickLook
    # https://superuser.com/questions/617658/quicklooksatellite-mac-os-high-cpu-use
    sudo launchctl unload -w /System/Library/LaunchAgents/com.apple.quicklook.*


    # Disabling Maverick's Unicast ARP Cache Validation Script (thanks, MMV!)
    bash <(curl -Ls http://git.io/6YzLCw)

    # Disable Bonjour Script (thanks MMV!)
    bash <(curl -Ls http://git.io/q9j5Zw)

    # Launch Agents

    DISABLE_DIR=/System/Library/LaunchAgentsDisabled
    sudo mkdir ${DISABLE_DIR}

    # Disable Game Center daemon (gamed)
    sudo mv /System/Library/LaunchAgents/com.apple.gamed.plist ${DISABLE_DIR}

    # Disable Airplay Mirroring
    # http://www.ehcho.com/guide/disable-airplay-mirroring/
    sudo mv /System/Library/LaunchAgents/com.apple.AirPlayUIAgent.plist ${DISABLE_DIR}