daemons failing to start from init.d scripts

From: Mike Grau <mikeg_at_wildcat.kcc.state.ks.us>
Date: Mon, 24 Jun 1996 15:02:19 -0500 (CDT)

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_at_kcc.state.ks.us |
---------------------------------------------------------------------
Received on Mon Jun 24 1996 - 22:27:13 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:46 NZDT