Date: Sun, 23 May 2004 23:49:48 -0500 From: "Eric Crist" <ecrist@secure-computing.net> To: "'Murray Taylor'" <murraytaylor@bytecraftsystems.com>, "'Gerard Seibert'" <gerard-seibert@rcn.com> Cc: 'freebsd-questions' <freebsd-questions@freebsd.org> Subject: RE: Proper way to start a program at log-on Message-ID: <007101c4414a$8b5e1280$6601a8c0@Nomad> In-Reply-To: <1085373818.33247.11.camel@wstaylorm.dand06.au.bytecraft.au.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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. mjt 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 > sure > that I am doing this correctly. > > On my WinXP machine, I run the Distributed Net 'dnetc' program. > Further > information regarding this program is available here: > http://www.distributed.net//docs/tutor_clients.php. > > To start the program in the background I need to issue the following > command: 'dnetc -quiet'. Since I want to start this program automatically > each time I log on, I placed that command at the end of my '.bash_profile' > 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 > done > this correctly. If there is a better way to do this, I would appreciate > receiving the information. > > Thanks! > > Gerard E. Seibert > gerard-seibert@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. HTH Eric F Crist President AdTech Integrated Systems, Inc (612) 998-3588
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?007101c4414a$8b5e1280$6601a8c0>