Created
February 13, 2010 00:36
-
-
Save nriley/303147 to your computer and use it in GitHub Desktop.
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/zsh -ef | |
# Stop Time Machine & AppleFileServer | |
export PATH=/bin:/usr/bin:/usr/sbin:/usr/libexec | |
setopt extendedglob | |
diskutil mount $(diskutil list | awk '/MaryBackup\+ A/ { print $NF }') | |
[[ $(id -u) == 0 ]] || { print "$0: must be running as root" >&2 ; exit 1 } | |
# disable AppleFileServer | |
if launchctl list com.apple.AppleFileServer >& /dev/null ; then | |
launchctl unload /System/Library/LaunchDaemons/com.apple.AppleFileServer.plist | |
fi | |
# disable backupd | |
defaults write /Library/Preferences/com.apple.TimeMachine AutoBackup -bool NO | |
# wait for backupd to stop | |
while launchctl list com.apple.backupd | grep -q 'com.apple.backupd-status'; do | |
sleep 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment