mirror of
https://github.com/novatiq/packages.git
synced 2026-07-29 15:03:05 +01:00
* 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>
13 lines
246 B
Bash
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
|