Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 534544
Collapse All | Expand All

(-)a/net-analyzer/fail2ban/fail2ban-0.8.13.ebuild (-3 / +1 lines)
Lines 39-47 src_install() { Link Here
39
39
40
       rm -rf "${D}"/usr/share/doc/${PN}
40
       rm -rf "${D}"/usr/share/doc/${PN}
41
41
42
       # not FILESDIR
42
       newinitd ${FILESDIR}/${PN}.initrd ${PN}
43
       newconfd files/gentoo-confd ${PN}
44
       newinitd files/gentoo-initd ${PN}
45
       systemd_dounit files/${PN}.service
43
       systemd_dounit files/${PN}.service
46
       systemd_dotmpfilesd files/${PN}-tmpfiles.conf
44
       systemd_dotmpfilesd files/${PN}-tmpfiles.conf
47
       doman man/*.{1,5}
45
       doman man/*.{1,5}
(-)a/net-analyzer/fail2ban/fail2ban-0.8.14.ebuild (-3 / +1 lines)
Lines 39-47 src_install() { Link Here
39
39
40
       rm -rf "${D}"/usr/share/doc/${PN}
40
       rm -rf "${D}"/usr/share/doc/${PN}
41
41
42
       # not FILESDIR
42
       newinitd ${FILESDIR}/${PN}.initrd ${PN}
43
       newconfd files/gentoo-confd ${PN}
44
       newinitd files/gentoo-initd ${PN}
45
       systemd_dounit files/${PN}.service
43
       systemd_dounit files/${PN}.service
46
       systemd_dotmpfilesd files/${PN}-tmpfiles.conf
44
       systemd_dotmpfilesd files/${PN}-tmpfiles.conf
47
       doman man/*.{1,5}
45
       doman man/*.{1,5}
(-)a/net-analyzer/fail2ban/fail2ban-0.9.1.ebuild (-3 / +1 lines)
Lines 44-52 src_install() { Link Here
44
44
45
       rm -rf "${D}"/usr/share/doc/${PN}
45
       rm -rf "${D}"/usr/share/doc/${PN}
46
46
47
       # not FILESDIR
47
       newinitd ${FILESDIR}/${PN}.initrd ${PN}
48
       newconfd files/gentoo-confd ${PN}
49
       newinitd files/gentoo-initd ${PN}
50
       systemd_dounit files/${PN}.service
48
       systemd_dounit files/${PN}.service
51
       systemd_dotmpfilesd files/${PN}-tmpfiles.conf
49
       systemd_dotmpfilesd files/${PN}-tmpfiles.conf
52
       doman man/*.{1,5}
50
       doman man/*.{1,5}
(-)a/net-analyzer/fail2ban/fail2ban-99999999.ebuild (-3 / +1 lines)
Lines 48-56 src_install() { Link Here
48
48
49
       rm -rf "${D}"/usr/share/doc/${PN}
49
       rm -rf "${D}"/usr/share/doc/${PN}
50
50
51
       # not FILESDIR
51
       newinitd ${FILESDIR}/${PN}.initrd ${PN}
52
       newconfd files/gentoo-confd ${PN}
53
       newinitd files/gentoo-initd ${PN}
54
       systemd_dounit files/${PN}.service
52
       systemd_dounit files/${PN}.service
55
       systemd_dotmpfilesd files/${PN}-tmpfiles.conf
53
       systemd_dotmpfilesd files/${PN}-tmpfiles.conf
56
       doman man/*.{1,5}
54
       doman man/*.{1,5}
(-)a/net-analyzer/fail2ban/files/fail2ban.initrd (+57 lines)
Line 0 Link Here
1
#!/sbin/runscript
2
# Copyright 1999-2015 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header: $
5
6
extra_commands="dumpcfg"
7
extra_started_commands="reload short detailed"
8
9
description="Scans log files and bans IPs that show malicious signs"
10
description_dumpcfg="dump configuration. For debugging"
11
description_reload="reloads the configuration"
12
description_short="short status"
13
description_detailed="detailed status about all jails"
14
15
: ${pidfile:=/run/fail2ban/fail2ban.pid}
16
: ${FAIL2BAN_SOCKFILE:=/run/fail2ban/fail2ban.sock}
17
: ${FAIL2BAN_CONFDIR:=/etc/fail2ban}
18
FAIL2BAN_OPTIONS="-c '${FAIL2BAN_CONFDIR}' -s '${FAIL2BAN_SOCKFILE}' -p '${pidfile}'"
19
20
required_files="${FAIL2BAN_CONFDIR}/fail2ban.conf"
21
command="/usr/bin/fail2ban-client"
22
command_args="${FAIL2BAN_OPTIONS} -b -x start"
23
24
depend() {
25
    need net logger iptables
26
}
27
28
start_pre() {
29
    mkdir -p "$(dirname "${pidfile}")" "$(dirname "${FAIL2BAN_SOCKFILE}")"
30
}
31
32
stop() {
33
    ebegin "Stopping fail2ban"
34
    eval ${command} ${FAIL2BAN_OPTIONS} stop
35
    eend $? "Failed to stop fail2ban"
36
}
37
38
reload() {
39
    ebegin "Reloading fail2ban"
40
    eval ${command} ${FAIL2BAN_OPTIONS} reload
41
    eend $? "Failed to reload fail2ban"
42
}
43
44
dumpcfg(){
45
    eval ${command} ${FAIL2BAN_OPTIONS} -d
46
}
47
48
short(){
49
    LANG= eval ${command} ${FAIL2BAN_OPTIONS} status
50
}
51
52
detailed(){
53
    local _j
54
    for _j in $(short | sed -e 's/,//g' -nre 's/\S\S Jail list:[[:space:]]+(.*)$/\1/p'); do
55
        eval ${command} ${FAIL2BAN_OPTIONS} status $_j
56
    done
57
}

Return to bug 534544