Skip to content

Instantly share code, notes, and snippets.

@shrop
Created March 29, 2014 20:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shrop/9862648 to your computer and use it in GitHub Desktop.
Save shrop/9862648 to your computer and use it in GitHub Desktop.
CrashPlan Pause/Resume
set isCrashPlanRunning to false
try
set pid to do shell script ¬
"sudo launchctl list | grep com.crashplan.engine" user name "username" password ¬
"password" with administrator privileges
set isCrashPlanRunning to true
end try
if isCrashPlanRunning then
log "CrashPlan is already running: " & pid
else
log "CrashPlan is not currently running…"
end if
if isCrashPlanRunning then
log "Stopping CrashPlan engine…"
do shell script ¬
"launchctl unload -w /Library/LaunchDaemons/com.crashplan.engine.plist" user name "username" password ¬
"password" with administrator privileges
else
log "Starting CrashPlan engine…"
tell application "CrashPlan menu bar" to activate
do shell script ¬
"launchctl load -w /Library/LaunchDaemons/com.crashplan.engine.plist" user name "username" password ¬
"password" with administrator privileges
end if
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment