tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Mike Grau <mikeg () wildcat ! kcc ! state ! ks ! us>
To: tru64-unix-managers
Subject: daemons failing to start from init.d scripts
Date: Mon, 24 Jun 1996 20:02:19 +0000	[thread overview]
Message-ID: <96076333621539.tru64-unix-managers.marc@archive.invalid> (raw)

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     |
---------------------------------------------------------------------

                 reply	other threads:[~1996-06-24 20:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

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