-
-
Save jagtesh/de81fa1c6b45fad0ff8e to your computer and use it in GitHub Desktop.
Updated it for use with brew
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 | |
# Install sleepwatcher | |
sudo cp /usr/local/Cellar/sleepwatcher/2.2/de.bernhard-baehr.sleepwatcher-20compatibility.plist /Library/LaunchAgents/ | |
sudo cp /usr/local/Cellar/sleepwatcher/2.2/etc/sleepwatcher/rc.* /etc/c | |
# Add bluetooth script to /etc/rc.wakeup (the script requires root) | |
sudo tee -a /etc/rc.wakeup <<EOF | |
kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport && sleep 3 && kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport | |
EOF | |
# Load the agent to start sleepwatcher | |
sudo launchctl load /Library/LaunchAgents/de.bernhard-baehr.sleepwatcher-20compatibility.plist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment