Date: Mon, 8 Apr 2002 09:06:05 +0200 From: "Patrick O'Reilly" <bsd@perimeter.co.za> To: "Unix Newbie" <unix_newbie@earthlink.net>, <freebsd-questions@FreeBSD.ORG> Subject: Re: adding a service at start up Message-ID: <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>
next in thread | previous in thread | raw e-mail | index | archive | help
----- 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. :) > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?005701c1decb$de595b90$b50d030a>