Files
initscripts/usr/lib/init/services/dnsd.service
T
2024-11-01 14:15:42 +07:00

33 lines
575 B
Desktop File
Executable File

#!/bin/sh
#--- import colors and init-funcs ---
. /usr/lib/init/colors.sh
. /usr/lib/init/init-funcs.sh
#------------------------------------
start() {
notify "Starting dnsd"
/usr/bin/dnsd -d -c /etc/dnsd.conf
check $? "start dnsd"
echo $(pgrep dnsd) > /var/run/dnsd.pid
return $?
}
stop() {
notify "Stopping dnsd"
kill $(cat /var/run/dnsd.pid)
check $? "stop dnsd"
rm /var/run/dnsd.pid &> /dev/null
return $?
}
case "$1" in
start|stop|restart|reload|help)
"$1"
;;
*)
help
return 1
esac
return $?