xref: /freebsd/libexec/rc/rc.d/blacklistd (revision 79e374217d69a98161fc91a286dacf1f78090894)
10696600cSBjoern A. Zeeb#!/bin/sh
20696600cSBjoern A. Zeeb#
30696600cSBjoern A. Zeeb# Copyright (c) 2016 The FreeBSD Foundation
40696600cSBjoern A. Zeeb#
50696600cSBjoern A. Zeeb# This software was developed by Kurt Lidl under sponsorship from the
60696600cSBjoern A. Zeeb# FreeBSD Foundation.
70696600cSBjoern A. Zeeb#
80696600cSBjoern A. Zeeb# Redistribution and use in source and binary forms, with or without
90696600cSBjoern A. Zeeb# modification, are permitted provided that the following conditions
100696600cSBjoern A. Zeeb# are met:
110696600cSBjoern A. Zeeb# 1. Redistributions of source code must retain the above copyright
120696600cSBjoern A. Zeeb#    notice, this list of conditions and the following disclaimer.
130696600cSBjoern A. Zeeb# 2. Redistributions in binary form must reproduce the above copyright
140696600cSBjoern A. Zeeb#    notice, this list of conditions and the following disclaimer in the
150696600cSBjoern A. Zeeb#    documentation and/or other materials provided with the distribution.
160696600cSBjoern A. Zeeb#
170696600cSBjoern A. Zeeb# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
180696600cSBjoern A. Zeeb# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
190696600cSBjoern A. Zeeb# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
200696600cSBjoern A. Zeeb# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
210696600cSBjoern A. Zeeb# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
220696600cSBjoern A. Zeeb# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
230696600cSBjoern A. Zeeb# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
240696600cSBjoern A. Zeeb# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
250696600cSBjoern A. Zeeb# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
260696600cSBjoern A. Zeeb# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
270696600cSBjoern A. Zeeb# SUCH DAMAGE.
280696600cSBjoern A. Zeeb#
290696600cSBjoern A. Zeeb#
300696600cSBjoern A. Zeeb
310696600cSBjoern A. Zeeb# PROVIDE: blacklistd
32*79e37421SJose Luis Duran# REQUIRE: netif ipfilter ipfw pf
330696600cSBjoern A. Zeeb
340696600cSBjoern A. Zeeb. /etc/rc.subr
350696600cSBjoern A. Zeeb
360696600cSBjoern A. Zeebname="blacklistd"
3772383174SJose Luis Durandesc="The blacklist daemon has been renamed to blocklist"
380696600cSBjoern A. Zeebrcvar="blacklistd_enable"
390696600cSBjoern A. Zeebcommand="/usr/sbin/${name}"
400696600cSBjoern A. Zeebrequired_files="/etc/blacklistd.conf"
4172383174SJose Luis Duranstart_precmd="blacklistd_prestart"
420696600cSBjoern A. Zeeb
43f99f0ee1SAlexander Leidinger# no svcj options needed
44f99f0ee1SAlexander Leidinger: ${blacklistd_svcj_options:=""}
45f99f0ee1SAlexander Leidinger
4672383174SJose Luis Duranblacklistd_prestart()
4772383174SJose Luis Duran{
4872383174SJose Luis Duran	echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
4972383174SJose Luis Duran	echo "@  WARNING: blacklistd has been renamed to blocklistd      @"
5072383174SJose Luis Duran	echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
5172383174SJose Luis Duran}
5272383174SJose Luis Duran
530696600cSBjoern A. Zeebload_rc_config $name
540696600cSBjoern A. Zeebrun_rc_command "$1"
55