diff --git a/fail2ban/.footprint b/fail2ban/.footprint index 4ed5d9263..5e55a4098 100644 --- a/fail2ban/.footprint +++ b/fail2ban/.footprint @@ -321,11 +321,11 @@ drwxr-xr-x root/root usr/lib/python3.10/site-packages/fail2ban/tests/__pycache__ -rw-r--r-- root/root usr/lib/python3.10/site-packages/fail2ban/tests/__pycache__/tickettestcase.cpython-310.pyc -rw-r--r-- root/root usr/lib/python3.10/site-packages/fail2ban/tests/__pycache__/utils.cpython-310.pyc drwxr-xr-x root/root usr/lib/python3.10/site-packages/fail2ban/tests/action_d/ --rw-r--r-- root/root usr/lib/python3.10/site-packages/fail2ban/tests/action_d/__init__.py +-rw-rw-r-- root/root usr/lib/python3.10/site-packages/fail2ban/tests/action_d/__init__.py drwxr-xr-x root/root usr/lib/python3.10/site-packages/fail2ban/tests/action_d/__pycache__/ -rw-r--r-- root/root usr/lib/python3.10/site-packages/fail2ban/tests/action_d/__pycache__/__init__.cpython-310.pyc -rw-r--r-- root/root usr/lib/python3.10/site-packages/fail2ban/tests/action_d/__pycache__/test_smtp.cpython-310.pyc --rw-r--r-- root/root usr/lib/python3.10/site-packages/fail2ban/tests/action_d/test_smtp.py +-rw-rw-r-- root/root usr/lib/python3.10/site-packages/fail2ban/tests/action_d/test_smtp.py -rw-r--r-- root/root usr/lib/python3.10/site-packages/fail2ban/tests/actionstestcase.py -rw-r--r-- root/root usr/lib/python3.10/site-packages/fail2ban/tests/actiontestcase.py -rw-r--r-- root/root usr/lib/python3.10/site-packages/fail2ban/tests/banmanagertestcase.py diff --git a/fail2ban/.signature b/fail2ban/.signature index 9172e6d71..c3c254ffb 100644 --- a/fail2ban/.signature +++ b/fail2ban/.signature @@ -1,9 +1,9 @@ untrusted comment: verify with /etc/ports/contrib.pub -RWSagIOpLGJF3xFFFJKXR0GoJGIw/MMwGPQXStLZGdxab+yvW+pR8kU9qMPu/yTIolUu6HiJ+59R2BjFZwZj9VdwrEwi3YM7ngA= -SHA256 (Pkgfile) = c28eb3eb6c8af0cdcc8e978f6594d1dc17d19920eb25b518893bcbe9263e40ae -SHA256 (.footprint) = 820f8ec11bd2570df5ff505cc059a5f46e8aa7a24956065289cbb0bf543a64c7 +RWSagIOpLGJF3/4AZzdzFsH3GvO9Nyzfk0eRJfDWCfg0INgsq1GOKGs9snBHtaeRssIOfUrabNkB9wE6ZRLY02gByJm6Rw570gU= +SHA256 (Pkgfile) = c0efbf39cfc0936e6f21d5ffec6e03178de324e9c4a24a70b37d86a2d9a16ea6 +SHA256 (.footprint) = 5e2bf20a8d01734c752ccdf62933609ca95b7eac0cf09055908d759ed08fcb36 SHA256 (fail2ban-1.1.0.tar.gz) = 474fcc25afdaf929c74329d1e4d24420caabeea1ef2e041a267ce19269570bae SHA256 (2fed408c05ac5206b490368d94599869bd6a056d.patch) = 1a1a251de039cf567ac81be76ab2b516a44a68751b4432145159fe3b3a59a24a SHA256 (50ff131a0fd8f54fdeb14b48353f842ee8ae8c1a.patch) = b959a99fcdf1aa9966e33845fa7522cdf2cc256e98d5230ac47b28057ca70690 -SHA256 (fail2ban.rc) = 2ce3ca9c641dcaa29028909b4f9a2d7f22533ac9d3be9aba45a8362fcb4e36b0 +SHA256 (fail2ban.rc) = 550809c96019bf4d0af2a613f6c2ec0fb6a44089d673b1dffca697b22b52c891 SHA256 (paths-crux.conf) = 7362f8bfadb65a670ccaf5fe6d318776c7f08dd065f8c772da5c825354674e7e diff --git a/fail2ban/Pkgfile b/fail2ban/Pkgfile index 2146e0556..4f563db95 100644 --- a/fail2ban/Pkgfile +++ b/fail2ban/Pkgfile @@ -18,6 +18,9 @@ build() { patch -Np1 -i $SRC/2fed408c05ac5206b490368d94599869bd6a056d.patch patch -Np1 -i $SRC/50ff131a0fd8f54fdeb14b48353f842ee8ae8c1a.patch + + find . -mindepth 2 -type f -exec sed -i -e 's|/var\(/run/fail2ban\)|\1|g' {} + + /usr/bin/python3 setup.py build /usr/bin/python3 setup.py install --root=$PKG --prefix=/usr --skip-build /usr/bin/python3 -mcompileall $PKG diff --git a/fail2ban/fail2ban.rc b/fail2ban/fail2ban.rc index b98215a71..9f19d3450 100644 --- a/fail2ban/fail2ban.rc +++ b/fail2ban/fail2ban.rc @@ -3,46 +3,41 @@ # /etc/rc.d/fail2ban: start/stop fail2ban daemon # -# User settings here -DAEMON=fail2ban-client -export PATH="/sbin:/usr/sbin:/bin:/usr/bin:" +SSD=/sbin/start-stop-daemon +PROG=/usr/bin/fail2ban-client +PID=/run/fail2ban/fail2ban.pid +OPTS="start" # Check for configuration files [ -f /etc/fail2ban/fail2ban.conf ] || exit 1 -# If you have to edit this section for this or any other -# port useage let me know, with a patch or added lines, -# or simplely e-mail me the altered file and I'll include the changes. - -RETVAL=0 - case $1 in start) - echo -n "Starting $DAEMON..." - rm -rf /var/run/fail2ban/fail2ban.sock # in case of unclean shutdown - /usr/bin/$DAEMON start > /dev/null & RETVAL=$? - if [ $RETVAL = 0 ]; then - echo " done." - fi + [ -d /run/fail2ban ] || mkdir /run/fail2ban + [ -e /run/fail2ban/fail2ban.sock ] && rm /run/fail2ban/fail2ban.sock + $SSD --start --pidfile $PID --exec $PROG -- $OPTS > /dev/null ;; stop) - echo -n "Shutting down $DAEMON..." - /usr/bin/$DAEMON stop > /dev/null - RETVAL=$? - echo " done." + $PROG stop > /dev/null ;; restart) $0 stop sleep 2 $0 start - RETVAL=$? + ;; +reload) + $PROG reload + ;; +status) + $PROG status + ;; +stats) + $PROG stats ;; *) - echo "usage: $0 [start|stop|restart]" + echo "usage: $0 [start|stop|restart|reload|status|stats]" exit 1 ;; esac -exit $RETVAL - # End of file