From owner-freebsd-questions Mon Apr 8 0: 8:22 2002 Delivered-To: freebsd-questions@freebsd.org Received: from dns.perimeter.co.za (dns.perimeter.co.za [196.25.164.254]) by hub.freebsd.org (Postfix) with ESMTP id 0D0EE37B41B for ; Mon, 8 Apr 2002 00:08:17 -0700 (PDT) Received: from PATRICK (loopback.mipjhb [209.212.102.245] (may be forged)) by dns.perimeter.co.za (8.11.1/8.11.1) with SMTP id g38787530676; Mon, 8 Apr 2002 09:08:08 +0200 (SAST) (envelope-from bsd@perimeter.co.za) Message-ID: <005701c1decb$de595b90$b50d030a@PATRICK> From: "Patrick O'Reilly" To: "Unix Newbie" , References: <1017952363.8817.36.camel@debian><1ZT5VFBj31r8Ewn9@caomhin.demon.co.uk> <200204071508.46778@.perimeter.co.za> <1018074829.9076.2.camel@debian> Subject: Re: adding a service at start up Date: Mon, 8 Apr 2002 09:06:05 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 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 ----- 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. :) > 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 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