Skip to content

Instantly share code, notes, and snippets.

@nriley
Created February 13, 2010 00:37
Show Gist options
  • Save nriley/303148 to your computer and use it in GitHub Desktop.
Save nriley/303148 to your computer and use it in GitHub Desktop.
#!/bin/zsh -ef
export PATH=/bin:/usr/bin:/usr/sbin:/usr/libexec
setopt extendedglob
diskutil unmount $(diskutil list | awk '/MaryBackup\+ A/ { print $NF }')
[[ $(id -u) == 0 ]] || { print "$0: must be running as root" >&2 ; exit 1 }
# enable AppleFileServer
launchctl load /System/Library/LaunchDaemons/com.apple.AppleFileServer.plist
# enable backupd
defaults write /Library/Preferences/com.apple.TimeMachine AutoBackup -bool YES
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment