From owner-freebsd-questions Mon Apr 8 1:18:29 2002 Delivered-To: freebsd-questions@freebsd.org Received: from pintail.mail.pas.earthlink.net (pintail.mail.pas.earthlink.net [207.217.120.122]) by hub.freebsd.org (Postfix) with ESMTP id B345E37B405 for ; Mon, 8 Apr 2002 01:18:25 -0700 (PDT) Received: from user-11206e7.dsl.mindspring.com ([66.32.25.199] helo=localhost.localdomain) by pintail.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 16uULn-0005jG-00; Mon, 08 Apr 2002 01:18:08 -0700 Subject: Re: adding a service at start up From: Unix Newbie To: Patrick O'Reilly Cc: freebsd-questions@FreeBSD.ORG 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> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0.2 Date: 06 Apr 2002 00:18:53 -0800 Message-Id: <1018081144.9076.6.camel@debian> Mime-Version: 1.0 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 2002-04-08 at 00:06, Patrick O'Reilly wrote: > ----- Original Message ----- > From: "Unix Newbie" > > 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