Proper way to start a program at log-on
ecrist at secure-computing.net
Sun May 23 21:51:29 PDT 2004
Make a shell script like the ones in /usr/local/etc/rc.d to start and
stop the process.
The script MUST be named whatever.sh and must be executable. It must
accept start and stop as parameters.
This is the general solution. There is probably a doc reference for it
but I havent looked.
On Mon, 2004-05-24 at 07:58, Gerard Seibert wrote:
> Since I am still new to this OS, I thought that I would check to make
> that I am doing this correctly.
> On my WinXP machine, I run the Distributed Net 'dnetc' program.
> information regarding this program is available here:
> To start the program in the background I need to issue the following
> command: 'dnetc -quiet'. Since I want to start this program
> each time I log on, I placed that command at the end of my
> file. I then placed the shutdown command 'dnetc -shutdown' in the
> '/etc/rc.shutdown' file.
> Since everything seems to be workings correctly, I assume that I have
> this correctly. If there is a better way to do this, I would
> receiving the information.
> Gerard E. Seibert
> gerard-seibert at rcn.com
I would do it this way myself. You can use the other scripts in this
directory as an example. If permissions are an issue, I would setuid
for the user you want this to run as, but not root. Back in 1998, I
used to run this very program, and this was my solution.
Eric F Crist
AdTech Integrated Systems, Inc
More information about the freebsd-questions