On 04/08/2006, at 6:53 PM, David Moyle wrote:
I tried making a script killall authoxyd which worked great, didn't
have to
workout the PID using grep etc (which I never got working) but I
found that
when another user logs in and Authoxy tries to start it wouldn't,
doing it
manually it would just refuse to work.
Okay, that's unexpected - we need to find out why this is happening.
Something should appear in the system log (/var/log/system.log) which
will give you a clue as why Authoxy is not starting.
I presume the command killall authoxyd was still 'running' and
killed any
process with that name. Maybe I need to end the script in some way?
(I know
very little about UNIX coding)
Nah, that doesn't sound right at all. killall runs once and returns
immediately. All it does is send a signal to the process with the
matching name, and return. Use the "ps -auxww" command to confirm
that killall worked, that is, that authoxyd doesn't appear in the
running processes list afterwards.
You can test all this by simply running the commands in a Terminal
window (not in a script). For example, if you start Authoxy using
startAuthoxy or System Preferences, then run killall authoxyd in
Terminal, and then start Authoxy again, does everything work? It
should, and doing that should be no different that doing it in a script.
Also, Heath did you get my suggestion about possibly including a
exit on
logout option for Authoxy?
Yep. As I said, there are options to do with registering with the
WindowServer so the daemon can get the cue from the logout event.
This raises a few issues though, so it'd be great if we didn't have
to go down this path. I'd prefer to find out why your method (which
sounds completely logical) isn't working.
Also I've never looked at the system log, but I might do, and the
authoxy
log didn't show any entries.
That's strange, but do check the log itself and let me know.
--
____________________________________________________________________
| Heath Raftery <[EMAIL PROTECTED]> |
| HRSoftWorks <http://www.hrsoftworks.net> |
| |
| *He who joyfully marches to music in rank and file has already |
| earned my contempt. He has been given a large brain by mistake, |
| since for him the spinal cord would suffice.* |
| - Albert Einstein _\|/_ |
|_____________________________________________________m(. .)m________|