Re: setting enviroment variable before deamon starts
- From: Juha Laiho <Juha.Laiho@xxxxxx>
- Date: Fri, 18 Jan 2008 15:52:04 GMT
tomb <tomb.fish@xxxxxxxxx> said:
I have problem with running deamon on boot up. I register deamon to
start at boot up in /etc/rc.rd/rc.local file :
#Add you want to add deamon
/home/progs/ts &~
Deamon starts up! but it should use 2 env variables, which I register
in bash profile (/etc/bash).
How can I register environment variable before deamon starts?
If the env.vars are something that just the daemon should see,
then there are two possibilities. One was already discussed;
make a script that starts the daemon, and that you call during
the system startup (in the rc.local script).
The other possibility is to use "env" command as a helper to start
the daemon; instead of the
/home/progs/ts &
you have above (supposing that's one of the daemons you're starting),
use
env VAR1=val1 VAR2=val2 /home/progs/ts &
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
.
- Follow-Ups:
- References:
- Prev by Date: Re: setting enviroment variable before deamon starts
- Next by Date: Timeout timers in an application
- Previous by thread: Re: setting enviroment variable before deamon starts
- Next by thread: Re: setting enviroment variable before deamon starts
- Index(es):
Relevant Pages
|
|