xref: /freebsd-14.2/libexec/rc/rc.d/ippool (revision d0b2dbfa)
1d8f93710SCy Schubert#!/bin/sh
2d8f93710SCy Schubert#
3d8f93710SCy Schubert#
4d8f93710SCy Schubert
5d8f93710SCy Schubert# PROVIDE: ippool
6d8f93710SCy Schubert# REQUIRE: FILESYSTEMS
7d8f93710SCy Schubert# BEFORE:  ipfilter
8*795be686SCy Schubert# KEYWORD: nojailvnet
9d8f93710SCy Schubert
10d8f93710SCy Schubert. /etc/rc.subr
11d8f93710SCy Schubert
12d8f93710SCy Schubertname="ippool"
13d8f93710SCy Schubertdesc="user interface to the IPFilter pools"
14d8f93710SCy Schubertrcvar="ippool_enable"
15d8f93710SCy Schubertload_rc_config $name
16817c58e3SCy Schubertstart_precmd="ippool_start_precmd"
17d8f93710SCy Schubertstop_cmd="${ippool_program} -F"
18d8f93710SCy Schubertreload_cmd="ippool_reload"
19d8f93710SCy Schubertextra_commands="reload"
20d8f93710SCy Schubertrequired_files="${ippool_rules}"
21d8f93710SCy Schubertrequired_modules="ipl:ipfilter"
22d8f93710SCy Schubert
23817c58e3SCy Schubertippool_start_precmd()
24d8f93710SCy Schubert{
25817c58e3SCy Schubert	rc_flags="-f ${ippool_rules} ${rc_flags}"
26d8f93710SCy Schubert}
27d8f93710SCy Schubert
28d8f93710SCy Schubertippool_reload()
29d8f93710SCy Schubert{
30d8f93710SCy Schubert	echo "Reloading IP Pools."
3129917358SCy Schubert	${stop_cmd}
3229917358SCy Schubert	${start_cmd}
33d8f93710SCy Schubert}
34d8f93710SCy Schubert
35d8f93710SCy Schubert
36d8f93710SCy Schubertrun_rc_command "$1"
37