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.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
Scripts / handy tips
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Previous Message  |  Next Message 
 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 r.casipit@attbi.com, thanks.

#!/bin/sh
echo -n ' Dns2go'

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

exit 0
#End


Note: First create a file called dns2go.sh in your /usr/local/etc/rc.d directory by going to that directory and typing mk dns2go.sh, then type "ee dns2go.sh" 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 dns2go.sh" 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  |  Forum List  |  Flat View   Newer Topic  |  Older Topic 

 Topics Author  Date
 dns2go boot script   new
apache916 04-05-03 05:46 
 Re: dns2go boot script   new
Robert 08-05-03 23:22 
 Re: dns2go boot script   new
Robert 13-05-03 06:55 
 Re: dns2go boot script   new
wtp 03-12-03 11:53 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 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

phorum.org