2
votes
2answers
779 views

Run script before restart/shutdown

Is it possible to execute a script/command right before OS X is shutting down or restarting? I'd like to run sudo apachectl stop to stop apache from auto-starting.
1
vote
2answers
278 views

Shell or Applescript to delay shutdown?

We have a workstation that gets used sporadically, and I'm trying to setup a script that backs it up during shutdown. I created a LogoutHook in com.apple.loginwindow to a 1-line bash script, that ...
1
vote
0answers
55 views

Apple script that closes Apple Remote Desktop

First let me say that I have ZERO experience in Apple Scripting. That said, I need to build a Apple Script or whatever is more efficient for that case, that is going to close Apple Remote Desktop ...
1
vote
2answers
930 views

How can I automatically run an AppleScript on shutdown or logout?

I am more used to the Javascript style event handlers, but is there a similar thing in applescript that listens to system events like logout or shutdown to execute code or is there a way to have an ...
5
votes
1answer
2k views

Is there a way to force Mac OS X to close all the applications when restarting?

I sometimes shut down my Mac, and I cannot wait it shuts down because I am urgently requested to do something in another office that would require some hours. In some cases, an application that opens ...