On Jun 2, 2009, at 10:43 PM, James Brown wrote: >> Things I would change: >> 1) add a user to your plist, the one assp will run under >> 2) run launchd from a non user area, ie: /Library/LaunchDaemons >> 3) set the working directory so you are not using the above paths >> 4) Set your log keys in the plist as well to a separate log for >> debugging >> this way anything assp echo's out will get logged > > Thanks Scott. > > 1) Will do. > 2) I already do. That's how it starts ASSP as root. > 3) Not sure what you mean by this. Why would the working directory not > be /Applictions/assp? That's what I've done for ages. > 4) Not sure what you mean by this either. ASSP is currently logging > to /Applications/assp/maillog.log. > > My other problem now that ASSP starts is that it gives up waiting for > clamd to start: > > Jun-3-09 08:25:16 [init] File::Scan::ClamAV module version 1.910 > installed but not available, error: Cannot connect to unix socket '/ > tmp/clamd': connect: No such file or directory > > Looks like the socket gets created 4 seconds later. From clamd.log: > > Wed Jun 3 08:25:20 2009 -> LOCAL: Unix socket file /tmp/clamd > > From what I've read, it doesn't look like you have any influence over > the order that items get started with launchctl. > > How to users of ClamAV and ASSP get around this on Leopard? > > Thanks,
I just got on the launchd mailing list, and have been learning as I go. For reasons I can not entirely say, it is desirable to set your working directory. So you would not set this: <string>/Applications/assp/assp.pl</string> but rather just <string>assp.pl</string> and in another key string pair, you set the working directory. ASSP logs what it logs, that is correct, but as it starts, launchd has some logging, and can capture things that may get sent to stdlog, or even just get lost. For example, if I have a small script called by launchd once a minute and all it does is: echo "this is a test"; I have no way of knowing that script ran for sure, I would have to do this: echo "this is a test"; echo "this is a test" >> /path/to/logfile.txt; Then I could check the log file. If you set a log key and string setting, any output such as that will go to a separate log. You can define it in a very granular way. I am not sure you would miss anything, but it certainly can not hurt, it may lead to helping you solve some of your current errors. I got the impression the suggestions I made, which were just passed along from the launchd list, were just "good practice" suggestions. It looks like you do not have tmp/clamd, I think that is the issue, or is it that gets created when clam starts? Lets assume that is the case. You may have to two step your launchd item. I have not gotten into clam with ASSP yet, but will tomorrow, and will also have a mac ports installer for ASSP and clam which will solve all this in a one command install. If order of startup matters, I would create a script: #!/bin/bash cd /Applications/assp whatever command you need to start clam sleep 5; /usr/bin/perl asspl.pl chmod +x that script, stuff it somewhere you can access it, then call that script from launchd. I am pretty sure you do not need to do this, and can have ASSP start clam on demand though. I will know more tomorrow. I think you just need to find the clam socket, and update your ASSP prefs to reflect that. -- Scott * If you contact me off list replace talklists@ with scott@ * ------------------------------------------------------------------------------ OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get _______________________________________________ Assp-test mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/assp-test
