On Thursday 25 December 2003 00:25, gffds fsdff wrote:
> Is there a way, when booting, to have an application launch?
> Ex:
> exec /usr/servers/bots/zDSBot3/zDSBot3 &
Have a look at /usr/local/etc/rc.d
All scripts that are executable and end in ".sh" in that directory get 
executed at boot-time. You could create your own scripts in that directory 
that starts your application.

On boot the scripts are executed with the first agrument being "start". On 
shutdown the scripts are executed with "stop" as first argument. By checking 
the argument in your script you can determine if you should start the 
application or not. (Don't start it at shutdown :)

A simple rc.d-script could look something like this :
--- cut here ---
case "$1" in
        /some/dir/some-app && echo -n ' some-app'
        echo "Usage: `basename $0` {start|stop}" >&2
exit 0
--- cut here ---

The "echo -n" line is the output you see when you boot your system after :
"Local package initialization :"
This only works on applications that daemonize (dissapear into the background 
when you start them). If your program doesn't daemonize, you should start it 
with an "&" sign behind it...

[EMAIL PROTECTED] mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to