tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* daemons failing to start from init.d scripts
@ 1996-06-24 20:02 Mike Grau
  0 siblings, 0 replies; only message in thread
From: Mike Grau @ 1996-06-24 20:02 UTC (permalink / raw)
  To: tru64-unix-managers

I am new to OSF and have inherited a DEC 3000/800S server running dUniX 3.2c.
I am trying to start the pop and httpd daemons at startup.
The pop script was written as per the suggestions contained in the archive 
"SUMMARY: POP start *NOT* in /etc/inittab":

1. Use /sbin/init.d/lpd as skeleton, copy this file to
/sbin/init.d/pop and edit it to have it start/stop
the pop daemon;

2. Create links for this file in directories /sbin/rc0.d
and /sbin/rc3.d. Choose appropriate sequence numbers to
place the file correctly within the boot/shutdown
sequence. For my system, the following works:

cd /sbin/init.d
ln -s ../init.d/pop ../rc3.d/S41pop # start it right after sendmail 
ln -s ../init.d/pop ../rc0.d/K24pop # stop it just before sendmail

3. Reboot or execute the script by running the pop daemon:
#. /sbin/init.d/pop start

The script executes fine, but on a reboot the script starts the daemon, 
but it appearently dies.

The same is true for the httpd startup script. It will start/stop/restart 
from the command line fine, but not after a "shutdown -r". I have added 
lines to the script to check if the httpd daemon is already running in 
the event of a manuel start:

case "$1" in
'start')
                ps -e | grep -v grep | grep httpd > /dev/null 2>&1
                if [ $? -eq 0 ]; then
                        echo "HTTPd server already running."
                        exit 0
                fi

This portion of the script succeeds only on a reboot & then of course 
exits. Taking this out of the script causes the script to execute as if 
it were starting the daemon, but the daemon apparently dies as in the pop 
script.

What have I overlooked? My apologies if its something obvious or if my 
question is vague - any help would be greatly appreciated.

---------------------------------------------------------------------
| Michael Grau                   |                                  |
| Kansas Corporation Commission  | Tel: (913) 271-3236              |
| 1500 SW Arrowhead RD           | Fax: (913) 271-3354              |
| Topeka, KS 66606-4027          |                                  |
|                                | email: mikeg@kcc.state.ks.us     |
---------------------------------------------------------------------

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1996-06-24 20:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-06-24 20:02 daemons failing to start from init.d scripts Mike Grau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox