[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-devel] 1.2 release needs z3950 daemon launcher
From: |
Alan Millar |
Subject: |
[Koha-devel] 1.2 release needs z3950 daemon launcher |
Date: |
Fri Jun 7 01:24:02 2002 |
User-agent: |
Mutt/1.2.5i |
> > On Thu, Jun 06, 2002 at 11:56:34PM +1200, Chris Cormack wrote:
> > > I think what we are still missing before we release it to the world is
We need a launcher for the z3950 search daemon. I have a script that
works, which I can throw in. Steve- did you have any plans for this,
or is there an existing one that I just missed?
The way I see it, there are a few requirements I'd want in it:
- the daemon should not run as root, for general design safety
- it should be launchable by root, so people can put it in system
startup scripts like rc.local
- it should allow local flexibility, such as setting PERL5LIB for modules
- Preferably, log its diagnostic messages.
Here's what I came up with:
---- File z3950-daemon-launch.sh ----
RUNASUSER=apache
su -s /bin/sh -c '/usr/local/koha/z3950-daemon-shell.sh &' - $RUNASUSER &
-------------------------------------
---- File z3950-daemon-shell.sh ----
#!/bin/sh
LOGFILE=/usr/local/koha/logs/z3950-daemon-`date +%Y%m%d-%H%M`
PERL5LIB=/usr/local/koha/modules
export PERL5LIB
exec /usr/local/koha/www/koha/cgi-bin/koha/acqui.simple/processz3950queue
>>$LOGFILE 2>&1
-------------------------------------
We can use this or feel free to embellish as needed, etc.
What also might be nice:
- Proper sysV-type rc.* start-up script ( S90z3950daemon -> z3950daemon start )
- Log file rotation?
- Alan
----
Alan Millar --==> address@hidden <==--