Hi Scott,

On 25/06/2008, at 11:29 AM, Scott Houchin wrote:

Is it possible to modify the Authoxy preferences from a shell or apple script and then have Authoxy load the new settings?

For sure. Keep this in mind though:

authoxyd knows nothing of plists or pref panes. The daemon is launced by the Pref Pane or startAuthoxy by passing it a series of parameters that are based on the plist.

Through the defaults command, I can modify the preferences plist file, but it wasn't clear how to get the daemon reloaded with those new settings, other than to manually kill the existing daemon and then restart it.

It will need to be restarted one way or the other. The easiest way might be to launch startAuthoxy, who's sole job is to read the plist and (re)launch the daemon. In any case, the daemon needs to be passed the new settings as arguments in the correct fashion.

If I did it manually, would the preference pane know that things changed? The authoxyd process ID is in the plist file, but is that regularly loaded?

Yes, the Pref Pane rereads the plist on launch (but not while it is running). The PID setting, to be honest, is no longer used. Instead, the current PID is written to /tmp/authoxyd.pid. When the Pref Pane stops the daemon, it also removes /tmp/authoxyd.pid (and /tmp/ authoxyd.port) but this is not critical.

|   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________|

Reply via email to