freebsd-skq/libexec/rc/rc.d/ippool
Cy Schubert 817c58e3ac The check for $ippool_rules in start_cmd is tautological.
Reported by:	hrs@
MFC after:	13 days
X-MFC with:	r345400
2019-03-23 04:32:10 +00:00

38 lines
575 B
Bash
Executable File

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: ippool
# REQUIRE: FILESYSTEMS
# BEFORE: ipfilter
# KEYWORD: nojail
. /etc/rc.subr
name="ippool"
desc="user interface to the IPFilter pools"
rcvar="ippool_enable"
load_rc_config $name
start_precmd="ippool_start_precmd"
stop_cmd="${ippool_program} -F"
reload_cmd="ippool_reload"
extra_commands="reload"
required_files="${ippool_rules}"
required_modules="ipl:ipfilter"
ippool_start_precmd()
{
rc_flags="-f ${ippool_rules} ${rc_flags}"
}
ippool_reload()
{
echo "Reloading IP Pools."
${stop_cmd}
${start_cmd}
}
run_rc_command "$1"