Re: running from inittab

From: David Luyer <luyer@dont-contact.us>
Date: Mon, 6 Jan 1997 23:40:18 +0800 (WST)

On Mon, 6 Jan 1997, Markus Gyger wrote:
>> I'm relieved to hear it's not just me who had problems getting RunCache to
>> work from an init.d file under DEC Unix.

nohup the RunCache script.

ie, put a "nohup /usr/local/squid/bin/RunCache" in the init.d file.

DEC Unix seems to send a SIGHUP to things as it starts them (either when
it finished that init.d script, or when it finished all the init.d
scripts, I've never really cheched), which is very annoying, and has
caused a lot of things to not start if they are started from shell scripts
and not nohup'd (apache, squid, etc...).

Since nohup writes to nohup.out in the current directory, we use...

[...]
        case "$1" in
        'start')
                cd /usr/local/squid/bin
                /usr/ucb/nohup /usr/local/squid/bin/RunCache main &
                echo "Squid main started"
                /usr/ucb/nohup /usr/local/squid/bin/RunCache free &
                echo "Squid free started"
                /usr/ucb/nohup /usr/local/squid/bin/RunCache user &
                echo "Squid user started"
                ;;
[...]

You might also want to modify RunCache to write a "RunCache.pid" as well
as the squid.pid, to stop the cache easier. We've also got a small mod
for RunCache to accept just the name of the cache it's running, instead of
the entire pathname to the config file.

David.

Oh - and for a funny note - today we got a bunch of email from AOLers
complaing about our copyright violation, hacking of remote web sites, etc
(this was attributed to a "student" called "squid"). Why? Because we have
a cache indexer which gives out a list of most accessed sites, a list of
URLs accessed on a site (tree index or searchable), etc. We don't make
local copies or anything, just serve up the links. *sigh*
Received on Mon Jan 06 1997 - 07:54:24 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:34:00 MST