View Single Post
  #9  
Old 3rd April 2006, 05:54
kaptk2 kaptk2 is offline
Junior Member
 
Join Date: Mar 2006
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default Fixed It!

I finally fixed it so that it works with out manually adding anything. I edited the init script to look like this. And it works now with the instructions provided. It also now show up when you run ntsysv. Hope this helps somebody else in the future.

Code:
#! /bin/sh
# mydns         Start the MyDNS server
# Author:       Falko Timme <ft@falkotimme.com>.

# Comments to support chkconfig on RedHat Linux
# chkconfig: 235 90 90
# description: A DNS server that runs off of a MySQL backend

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
NAME=mydns
DAEMON=/usr/local/sbin/$NAME
DESC="DNS server"

SCRIPTNAME=/etc/init.d/$NAME

# Gracefully exit if the package has been removed.
test -x $DAEMON || exit 0

case "$1" in
  start)
        echo -n "Starting $DESC: $NAME"
        $DAEMON --background
        echo "."
        ;;
  stop)
        echo "Stopping $DESC: $NAME."
        kill -9 `pidof $NAME` &> /dev/null
        ;;
  restart)
        echo "Restarting $DESC: $NAME."
        $0 stop && sleep 1
        $0 start
        ;;
  *)
        echo "Usage: $SCRIPTNAME {start|stop|restart}" >&2
        exit 1
        ;;
esac

exit 0
Reply With Quote