Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > MyDNSConfig > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 25th July 2008, 08:13
hurfi hurfi is offline
Junior Member
 
Join Date: Jul 2008
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default Running A MySQL-Based DNS Server: MyDNS - dnsctl error

Hi,

I've setup two servers running centos 5.2 with mydns/mydnsconfig and i'm now trying to get recursive lookups running.
I'm following the guide but get stuck at the dnsctl setup. The first problem is that http://www.servershak.com/dns/dnsctl just 404's so that aint going to work. I found a post by Falko with the contents of dnsctl so i just created the file and pasted the contents into it.
now when i try to run "chkconfig --levels 235 dnsctl on" i get "service dnsctl does not support chkconfig"

Can anyone help me out?

Cheers,

Hurf
Reply With Quote
Sponsored Links
  #2  
Old 26th July 2008, 11:06
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,743 Times in 2,577 Posts
Default

Did you make dnsctl executable? Can you post the contents of the mydns init script?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 28th July 2008, 04:42
hurfi hurfi is offline
Junior Member
 
Join Date: Jul 2008
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hi Falko,

It's executable for root:

-rwx------ 1 root root 2122 Jul 23 14:20 dnsctl

The my DNS init script looks like:

[root@ns1 init.d]# cat mydns
#!/bin/bash
#
# mydns This starts and stops mydns.
#
# chkconfig: 345 52 50
# description: A database-driven DNS server
#
# processname: /usr/sbin/mydns
# config: /etc/mydns.conf
# pidfile: /var/run/mydns.pid

PATH=/sbin:/bin:/usr/bin:/usr/sbin
prog=mydns

# Source function library.
. /etc/init.d/functions

[ -f /usr/sbin/mydns ] || exit 1
[ -f /etc/mydns.conf ] || exit 1

RETVAL=0

start(){
echo -n $"Starting $prog: "

daemon $prog -b
RETVAL=$?
echo
touch /var/lock/subsys/mydns
return $RETVAL
}

stop(){
echo -n $"Stopping $prog: "
killproc $prog
RETVAL=$?
echo
rm -f /var/lock/subsys/mydns
return $RETVAL

}

restart(){
stop
start
}

condrestart(){
[ -e /var/lock/subsys/mydns ] && restart
return 0
}


# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status $prog
;;
restart|reload)
restart
;;
condrestart)
condrestart
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
RETVAL=1
esac

exit $RETVAL







And the contents of dnsctl look like:


[root@ns1 sbin]# cat dnsctl
#!/bin/sh

# Don Walters
# don@servershak.com
#
# chkconfig:
# description: the djbdns DNS

PATH=/bin:/usr/bin:/usr/local/bin:/usr/local/sbin
export PATH

case "$1" in
start)
echo "Starting dns"
if svok /service/dnscache ; then
svc -u /service/dnscache
else
echo dnscache service not running
fi
if svok /service/tinydns ; then
svc -u /service/tinydns
else
echo tinydns service not running
fi
if [ -d /var/lock/subsys ]; then
touch /var/lock/subsys/dns
fi
;;
stop)
echo "Stopping dns ..."
echo " dnscache"
svc -d /service/dnscache
echo " tinydns"
svc -d /service/tinydns
if [ -f /var/lock/subsys/dns ]; then
rm /var/lock/subsys/dns
fi
;;
stat)
svstat /service/dnscache
svstat /service/dnscache/log
echo "--"
svstat /service/tinydns
svstat /service/tinydns/log
;;
reload|hup)
echo "Sending HUP signal to dns."
svc -h /service/dnscache
svc -h /service/tinydns
;;
pause)
echo "Pausing dnscache"
svc -p /service/dnscache
echo "Pausing tinydns"
svc -p /service/tinydns
;;
cont)
echo "Continuing dnscache"
svc -c /service/dnscache
echo "Continuing tinydns"
svc -c /service/tinydns
;;
restart)
echo "Restarting dns:"
echo "* Stopping dnscache."
svc -d /service/dnscache
echo "* Stopping tinydns."
svc -d /service/tinydns
echo "* Restarting dnscache."
svc -u /service/dnscache
echo "* Restarting tinydns."
svc -u /service/tinydns
;;
help)
cat <<HELP
start -- starts dns service (dns connections allowed. queries can go out)
stop -- stops dns service (dns connections refused, nothing goes out)
pause -- temporarily stops dns service (dns connections accepted, nothing leaves)
cont -- continues paused dns service
stat -- displays status of mail service
restart -- stops and restarts dns
reload -- sends dns HUP
hup -- same as reload
HELP
;;
*)
echo "Usage: $0 {start|stop|restart|reload|stat|pause|cont|help}"
exit 1
;;
esac

exit 0
[root@ns1 sbin]#



Cheers,

Hurf
Reply With Quote
  #4  
Old 29th July 2008, 14:25
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,743 Times in 2,577 Posts
Default

Please replace
Code:
# chkconfig:
with
Code:
# chkconfig: 345 52 50
in the dnsctl script and try to run chkconfig again.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
hurfi (31st July 2008)
  #5  
Old 30th July 2008, 05:23
hurfi hurfi is offline
Junior Member
 
Join Date: Jul 2008
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
 
Default

Hi Falko,

That works...thank you

BUT

Now onto the next part of the guide when running make on ucspi-tcp-0.88 it errors with this:

Code:
./load tcpserver rules.o remoteinfo.o timeoutconn.o cdb.a \
        dns.a time.a unix.a byte.a  `cat socket.lib`
/usr/bin/ld: errno: TLS definition in /lib/libc.so.6 section .tbss mismatches non-TLS reference in tcpserver.o
/lib/libc.so.6: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [tcpserver] Error 1
[root@ns1 ucspi-tcp-0.88]#
Can you possibly offer any further guidance?

Regards,

Last edited by hurfi; 31st July 2008 at 08:07. Reason: edit
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The Perfect Setup - Debian Etch (Debian 4.0) some trouble daniel80 HOWTO-Related Questions 26 1st February 2008 16:30
Problem with keeping Apache alive bobeq Server Operation 3 29th November 2007 16:11
subdomain and mail relay configuration aranthorn Installation/Configuration 24 3rd September 2007 22:53
Dns question Mahir Installation/Configuration 48 14th November 2006 10:19
Installation Fails... :( cyberstorm Installation/Configuration 1 15th January 2006 18:07


All times are GMT +2. The time now is 12:29.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.