#!/bin/sh #PKG maradns #INIT 60 . /etc/rc.conf case $1 in autostop) ;; autostart) test x"${maradns:-NO}" = x"NO" && exit 0 test x"$maradns" = x"DAEMON" && test -x /bin/mksh && exec mksh -T- $0 start exec sh $0 start ;; start) [ -f /etc/mararc ] || exit [ -d /etc/maradns ] || mkdir /etc/maradns /usr/sbin/maradns & ;; stop) kill $(pgrep -f /usr/sbin/maradns) ;; restart) sh $0 stop sleep 1 sh $0 start ;; *) echo "Usage: $0 {start | stop | restart}" exit 1 ;; esac exit $?