Date: 06 Apr 2002 00:18:53 -0800 From: Unix Newbie <unix_newbie@earthlink.net> To: Patrick O'Reilly <bsd@perimeter.co.za> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: adding a service at start up Message-ID: <1018081144.9076.6.camel@debian> In-Reply-To: <005701c1decb$de595b90$b50d030a@PATRICK> References: <1017952363.8817.36.camel@debian><1ZT5VFBj31r8Ewn9@caomhin.demon.co.uk> <200204071508.46778@.perimeter.co.za> <1018074829.9076.2.camel@debian> <005701c1decb$de595b90$b50d030a@PATRICK>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 2002-04-08 at 00:06, Patrick O'Reilly wrote: > ----- Original Message ----- > From: "Unix Newbie" <unix_newbie@earthlink.net> > > Terry. > > First - this list prefers that you do not top-post when replying to > emails. Rather respond logicaly below the questions, the way that Kevin > and I did before, or in-between the way I am doing now. :) Sorry! I should have seen that. Won't happen again. > > > Ok, thanks for the info, I read the page, and I wrote a script that I > > believe will suit my purposes, but I don't know how to test that. (you > > know, debug it, if you will). > > You should be able to run the script by using the full path name: > # /usr/local/etc/rc.d/script.sh > > In fact, it is common practice with scripts in rc.d to write them to > accept one cammand-line parameter, or argument, which will enable you to > start/stop the daemon at will. If you did this then you should be able > to run the script as follows: > # /usr/local/etc/rc.d/script.sh start > > > Also, I have no directory or file named > > rc.d so I just made a file named rc.d and put the script into it. > Should > > rc.d be a directory with scripts in it? Does FreeBSD already know to > use > > this directory at start up when I create it? > > This surprises me! There should be a directory named > /usr/local/etc/rc.d , and your startup script will be a file within that > directory. Try this when logged in as root: > # mkdir -p /usr/local/etc/rc.d > # chmod 755 /usr/local/etc/rc.d No, after looking at the path name I realized I was just being dumb. I was looking in the /etc folder! There is a folder in /usr/local/etc and my shell scripts runs perfectly with the right permisions on it! Everything works great! Can't thank you folks enough! Terry. Invent something idiot proof, and somebody will invent a better idiot. > > FreeBSD *does* know to look for startup scripts in this location at > start, but the script MUST be named {whatever}.sh, as I mentioned > before. > > > Sorry for the basic questions, but after reading the man pages, and > the > > urls (thanks bye the way!) I am still a little confused. > > > > Thanks for all the help! > > > > I hope this helped :) > > Regards, > Patrick O'Reilly. > ___ _ __ > / _ )__ __ (_)_ __ ___ _/ /____ __ > / __/ -_) _) / ~ ) -_), ,-/ -_) _) > /_/ \__/_//_/_/~/_/\__/ \__/\__/_/ > http://www.perimeter.co.za > > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1018081144.9076.6.camel>