Suspend on user login, resume on logout?

Questions and Answers : Macintosh : Suspend on user login, resume on logout?
Message board moderation

To post messages, you must log in.

AuthorMessage
Profile Christian Seti (user)
Avatar

Send message
Joined: 31 May 99
Posts: 38
Credit: 73,899,402
RAC: 62
Australia
Message 142520 - Posted: 25 Jul 2005, 13:30:35 UTC
Last modified: 25 Jul 2005, 13:31:01 UTC

We want to use Mac BOINC with networked, managed clients using Mac OS Server 10.4. This server version offers the ability to trigger login items and logout items, which could be shell scripts.

What I'd like to do is run the command line version of BOINC (as indeed this is the only version that will execute when the Mac is idling at the login screen), but have two shell scripts which suspend BOINC when a user logs in and then resume it when they log out. The logout script is probably the easy one as this (I presume) is merely the same shell script as the one in the *computer's* UNIX startup items. But how do I cleanly escape BOINC with a user login script? I'm thinking of something along the lines of a 'kill' action coupled with 'grep' searching 'ps' but I don't know exactly how to do it. And anyway, shouldn't there be a cleaner way to do this? What if a kill action negates hours worth of work on a workunit because of the abrupt shutdown?
---------------------------------
Nathan Zamprogno
http://baliset.blogspot.com
ID: 142520 · Report as offensive

Questions and Answers : Macintosh : Suspend on user login, resume on logout?


 
©2024 University of California
 
SETI@home and Astropulse are funded by grants from the National Science Foundation, NASA, and donations from SETI@home volunteers. AstroPulse is funded in part by the NSF through grant AST-0307956.