Re: init.d startup script does not exit
- From: Tzafrir Cohen <tzafrir@xxxxxxxxxxxxx>
- Date: Sun, 14 Sep 2008 07:09:08 +0000
On Sat, Sep 13, 2008 at 11:35:13PM -0700, rex wrote:
-----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.
Which means that this program doesn't properly daemonize.
Use start-stop-daemon instead of writing your own. Some relevant
options:
-c, --chuid username|uid
Change to this username/uid before starting the process.
...
-b, --background
Typically used with programs that don’t detach on their own.
...
There are many other options there. It can help you creating a robust
script. One that will not attempt to run the daemon twice (something
your current script does not prevent).
Reference: start-stop-daemon
Examples: scripts under /etc/init.d
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.
Use update-rc.d rather than your own commands. It will safe you time,
eventually.
--
Tzafrir Cohen | tzafrir@xxxxxxxxxx | VIM is
http://tzafrir.org.il | | a Mutt's
tzafrir@xxxxxxxxxxxxx | | best
ICQ# 16849754 | | friend
--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
- References:
- init.d startup script does not exit
- From: rex
- init.d startup script does not exit
- Prev by Date: kredit tanpa agunan
- Next by Date: Re: init.d startup script does not exit
- Previous by thread: Re: init.d startup script does not exit
- Next by thread: kredit tanpa agunan
- Index(es):
Relevant Pages
|