The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
Scripts / handy tips
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 dns2go boot script
Author: apache916 
Date:   04-05-03 05:46

For those interested in a handy script that will automatically run your dns2go service every time at boot and run it in the background out of sight. Here is the script that I created. If anyone discovers a serious flaw in my script please email me at, thanks.

echo -n ' Dns2go'

case "$1" in
/usr/local/bin/dns2go &
kill -9 `cat /var/run/`
echo "Usage: `basename $0` {start|stop}" >&2
exit 64

exit 0

Note: First create a file called in your /usr/local/etc/rc.d directory by going to that directory and typing mk, then type "ee" which will put you into the text editor ee for that particular file, insert the script you see above and then press the [Esc] key to exit. It'll ask if you want to save the changes you made to the file and select yes. Then you type "chmod 755" in order to make the file executable. If everything went ok the script will run at bootup and place the service in the background. All this of course was done on my server running freebsd 4.8. Everything here is taken from memory and if I have failed to list all the details I apologize in advance. I hope this helps someone else out there!

Reply To This Message
 Re: dns2go boot script
Author: Robert 
Date:   08-05-03 23:22

I'm lame! Here's a much better script for all you dns2go users.

#Just a very lightweight but effective script to start dns2go #and apache at boot.

echo -n "Starting apache and dns2go services..."

/usr/local/bin/dns2go &
/usr/local/apache/bin/apachectl start

exit 0

How simple is that? Forgive me for being a newbie.
1]#ee /usr/local/etc/rc.d/
2]insert the script above into the file and exit/save
3]#chmod u+x
4]reboot and the script should run! *crossed-fingers*

Reply To This Message
 Re: dns2go boot script
Author: Robert 
Date:   13-05-03 06:55

Don't use this lightweight script! Received hangups during a sudden reboot. *shrugs*

Reply To This Message
 Re: dns2go boot script
Author: wtp 
Date:   03-12-03 11:53


Is it better to use deamontools from ports?

I'm ussing it to keep live snort, dns and other services. Very, very good staff.

Greeting (from Poland)
Greatest BSD service for newbies

Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 

 User Login
 User Name:
 Remember my login:
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum