Date: Thu, 11 Jan 2001 13:17:22 +0100 From: Francesco Casadei <fcasadei@inwind.it> To: Odhiambo Washington <wash@iconnect.co.ke> Cc: FBSD-Q <freebsd-questions@freebsd.org>, LangaK@discoveryhealth.co.za Subject: Re: starting a daemon automatically at startup. Message-ID: <20010111131722.C3300@goku.kasby> In-Reply-To: <20010111111947.A40324@poeza.iconnect.co.ke>; from wash@iconnect.co.ke on Thu, Jan 11, 2001 at 11:19:47AM %2B0300 References: <A69BC9CA4B39D411BF2200105A45B45B075B8C03@dhexchange.discoveryhealth.co.za> <20010111111947.A40324@poeza.iconnect.co.ke>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jan 11, 2001 at 11:19:47AM +0300, Odhiambo Washington wrote: > * Langa Kentane <LangaK@discoveryhealth.co.za> [20010111 10:19]: writing on the subject 'starting a daemon automatically at startup.' > Langa> Greetings. > Langa> I have just install ntop on a server running FreeBSD 4.1.1-RELEASE. Now I > Langa> need to start this with the following flags at boot time: '-dw 3000' > Langa> > Langa> How do I go about doing this? > > > Anyway you'd need to create a script to do that, a small one, > and put it in /usr/local/etc/rc.d > > #!/bin/sh > /usr/local/sbin/ntop -dw 3000 && echo -n ' ntop-web' > > save the file > chmod +x filename > > HTH > > > Langa> Thanks in advance. > Langa> > Langa> __________________________________________________________ > Langa> Langa Kentane | TEL: (011) 290 3218 > Langa> Security Administrator | Cell: 082 606 1515 > Langa> DISCOVERY HEALTH | http://www.discoveryhealth.co.za > Langa> __________________________________________________________________ > Langa> > Langa> > Langa> > Langa> To Unsubscribe: send mail to majordomo@FreeBSD.org > Langa> with "unsubscribe freebsd-questions" in the body of the message > > -Wash > > -- > Odhiambo Washington Inter-Connect Ltd., > wash@iconnect.co.ke 5th Flr Furaha Plaza > Tel: 254 11 222604 Nkrumah Rd., > Fax: 254 11 222636 PO Box 83613 MOMBASA, KE. > > And then, the Earth being small, mankind will migrate into space, and will > cross the airless Saharas which separate planet from planet and sun from sun. > The Earth will become a Holy Land which will be visited by pilgrims from all > the quarters of the Universe. Finally, men will master the forces of Nature; > they will become themselves architects of systems, manufacturers of worlds. > -Winwood Reade, "The Matrydom of Man" > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > > end of the original message If you're tracking 4.2-STABLE the system will complain if you do not provide special processing for start and stop command line parameters. Use this: #!/bin/sh case $1 in start) /usr/local/sbin/ntop -dw 3000 && echo -n ' ntop-web' echo $! > /var/run/ntop.pid ;; stop) kill `cat /var/run/ntop.pid` ;; *) echo "Usage: $0 {start|stop}" ;; esac Then do: chmod 754 /usr/local/etc/rc.d/ntop.sh Francesco Casadei 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?20010111131722.C3300>