init.d startup script does not exit



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I have a script that launches a program. If I launch this program
manually, it keeps on running in the shell. It is a webserver, so I
need it running all the time. However, if I exit the shell, it kills
the webserver.

I tried putting links to it in the rc0.d, rc1.d etc to make it start
during startup, but it keeps on going during startup and never starts
the other services.

here is my script in /etc/init.d/coldfusion

#!/bin/sh -e
sAppName="ColdFusion 8"
sUser=cfuser
COLDFUSION_HOME=/opt/jrun4
case "$1" in
start)
echo "Starting ${sAppName} as user $sUser..."
su ${sUser} -c "$COLDFUSION_HOME/bin/jrun -start instance01"
exit 0
;;
stop)
echo "Stopping ${sAppName}..."
su ${sUser} -c "$COLDFUSION_HOME/bin/jrun -stop instance01"
;;
restart)
echo "Restarting ${sAppName}..."
su ${sUser} -c "$COLDFUSION_HOME/bin/jrun -restart instance01"
;;
status)
su ${sUser} -c "$COLDFUSION_HOME/bin/jrun -status instance01"
;;
*)
echo "usage: /etc/init.d/coldfusion {stop|start|restart|status}"
exit 1
esac
exit 0
###### EOF

When I run #/etc/init.d/coldfusion start, it displays the startup
messages, until it hits:

09/13 23:31:40 info Deploying EJB "JRunSQLInvoker" from:
file:/opt/jrun4/lib/jrun-comp.ear
Server instance01 ready (startup time: 23 seconds)

and then the program/cursor is just there, waiting... forever...

It does not exit. If this was in the startup, I would never get to the
user login.

And, if I press Ctrl-C, then the program terminates, but then webserver
is dead.

Any suggestions please?

Thanks!

- - Rex
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkjMsKAACgkQ2s+LWcEri8SqcgCcCc6JUfAzYN4UveYmOhU5rlW3
WpgAn3eaGqrvOQuCc+hns9LqyNc9WF87
=Tku8
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: Startup Form Option
    ... The problem with the sample database is that the option ... >goes into the startup settings and changes the form startup. ... > Exit Sub ...
    (microsoft.public.access.formscoding)
  • Re: init.d startup script does not exit
    ... I have a script that launches a program. ... However, if I exit the shell, it kills ... during startup, but it keeps on going during startup and never starts ...
    (Debian-User)
  • Re: init.d startup script does not exit
    ... I have a script that launches a program. ... However, if I exit the shell, it kills ... during startup, but it keeps on going during startup and never starts ...
    (Debian-User)
  • Re: Desiabled Macros and VBA Code
    ... I use a startup form that runs the mandatory code in the Open event. ... database startup option points to this form. ... Now to disable the bypass key is a little tricky. ... the required Exit Application button on the main menu form. ...
    (microsoft.public.access.formscoding)
  • Re: init.d startup script does not exit
    ... I have a script that launches a program. ... However, if I exit the shell, it kills ... during startup, but it keeps on going during startup and never starts ...
    (Debian-User)