Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am working on a project where I need to implement a logout script on some Macintosh computers. I have read the following Create a logoff script/task for Mac OS X article and found that while it is helpful, I am not sure it addresses my needs. We use login scripts by way of a .sh file that is called from a plist LaunchAgent. I was curious if there was a way to create a plist file that could call a file in the same manner (i.e. from Launchd).

The methods of using the LogoutHook seem to be more hackish (and super deprecated) than anything. I also have concerns about how long Apple will support or allow this method to be used since it has been around since 10.2. The logout script will need to work on OS X 10.6 (Snow Leopard) and 10.7 (Lion).

share|improve this question
You do realize that it's not exactly possible to provide an answer that is guaranteed to work in 10.8+? – Daniel Beck Dec 6 '11 at 19:05
Fair enough, at least for 10.6 and 10.7 hopefully an answer can be found. I have edited the question to remove that element. Thanks for pointing it out. – John Dec 6 '11 at 19:13
TN2228 (from mid 2008) states: This technote only discusses login; it does not cover issues related to logout. Specifically, while the authorization plug-in technique described in this technote is a good alternative for the login hook, there is currently no equivalent replacement for the logout hook, referencing the Radar (Apple Bug Database) issue 4905756. You could try to contact Apple developer support and inquire about that issue's status. – Daniel Beck Dec 6 '11 at 19:17

You must log in to answer this question.

Browse other questions tagged .