freebsd-ports/dns/gdnsd/files/gdnsd.in
Danilo Egea Gondolfo 68dd4b9874 - Remove the duplication of gdnsd_flags in command_args
PR:		ports/192102
Submitted by:	Allan Jude <allanjude@FreeBSD.org>
2014-07-24 23:37:10 +00:00

45 lines
798 B
Bash

#!/bin/sh
# $FreeBSD$
#
# PROVIDE: gdnsd
# REQUIRE: DAEMON
# REQUIRE: LOGIN
# KEYWORD: FreeBSD shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# gdnsd_enable (bool): Set to NO by default.
# Set it to YES to enable gdnsd.
# gdnsd_flags (str): Set to "" by default
# Extra command line argument flags
. /etc/rc.subr
name="gdnsd"
rcvar=gdnsd_enable
# set defaults
load_rc_config $name
: ${gdnsd_enable:="NO"}
: ${gdnsd_flags:=""}
command="%%PREFIX%%/sbin/gdnsd"
command_args="start"
procname=${command}
reload_cmd="gdnsd_reload"
configtest_cmd="gdnsd_checkconf"
extra_commands="reload configtest"
gdnsd_reload()
{
${command} ${gdnsd_flags} reload
}
gdnsd_checkconf()
{
${command} ${gdnsd_flags} checkconf
}
run_rc_command "$1"