unable to start mydns-ng Centos 5.3

Discussion in 'Installation/Configuration' started by rukus77, Oct 17, 2009.

  1. rukus77

    rukus77 Member

    Hello everyone,

    I was having the axfr issue where everytime I would update ISPConfig, I would have to update database and change a few lines of code from Y,N to 1,etc...

    Anyhow, I decided to try out mydns-ng so I removed mydns and installed ng. Install appeared to go fine, but I believe I need to setup my /etc/init.d/mydns file now. Is there a how to for this? Any guidance would be appreciated.

    I tried using the original mydns file, but I cannot start the service.

    The only way I can get mydns-ng to start is when I run mydns -v

    Thanks,
    Mike
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You need a file in /etc/init.d. The installation is described in the perfect setup guide for ispconfig 3.
     
  3. rukus77

    rukus77 Member

    Hi Till, thanks for your reply. I followed Perfect setup, but it calls for mydns and not mydns-ng for Centos. There is no package for mydns-ng on Centos, so I installed;

    ./configure
    make
    make install

    It is running fine and I tried using the /etc/init.d/mydns for mydns, but nothing happens when I try to start or stop. I do not get any errors or confirmation messages.

    Any suggestions? I appreciate it.

    Thanks,
    Mike
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    You can use the mydns instructions from the debian guide to create the start script.
     
  5. rukus77

    rukus77 Member

    Hi Till, I tried that, but since commands are a little different between the two OS's, I get some errors...

    This is what my config looks like in /etc/init.d/mydns. Do you see anything wrong with it?

    Thanks,
    Mike

    #!/bin/bash
    #
    # mydns This starts and stops mydns.
    #
    # chkconfig: 345 65 50
    # description: A database-driven DNS server
    #
    # processname: /usr/local/sbin/mydns
    # config: /etc/mydns.conf
    # pidfile: /var/run/mydns.pid

    #PATH=/sbin:/bin:/usr/bin:/usr/sbin
    PATH=/usr/local/sbin:/sbin:/bin:/usr/bin:/usr/sbin
    mypath=/usr/local/sbin
    prog=mydns
    myprog=$mypath/$prog

    # 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 $myprog -b
    RETVAL=$?
    echo
    touch /var/lock/subsys/mydns
    return $RETVAL
    }

    stop(){
    echo -n $"Stopping $prog: "
    killproc $myprog
    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
     
    Last edited: Oct 19, 2009
  6. rukus77

    rukus77 Member

    I just noticed where I went wrong. Looks like I missed updating the path on this line.

    Thanks for your assistance,

    Mike
     
  7. ar3inc

    ar3inc New Member

    ok... and what should the line be? I can follow that the path is incorrect but I do not know what it should be. Please help.
     
  8. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    which mydns
    ?
     
  9. rukus77

    rukus77 Member

    In my case, the path should be;

    /usr/local/sbin/mydns

    Mike
     

Share This Page