Files
packages/net/banip/files/banip.hotplug
T
Dirk Brenken 49b43b81e8 banip: update 0.3.7
* fix a logical glitch in the hotplug event handler
* properly handle fatal iptables errors - even in subshells

Signed-off-by: Dirk Brenken <dev@brenken.org>
2019-11-08 18:40:30 +01:00

13 lines
246 B
Bash

#!/bin/sh
#
[ "${ACTION}" != "add" ] && exit 0
ban_pidfile="/var/run/banip.pid"
ban_enabled="$(/etc/init.d/banip enabled; printf "%u" "${?}")"
if [ "${ban_enabled}" = "0" ] && [ ! -s "${ban_pidfile}" ]
then
/etc/init.d/banip refresh
fi
exit 0