summaryrefslogtreecommitdiffstats
path: root/net/banip/files/banip.hotplug
blob: 763c07baf593b6974ef8433c0ec4982e1addd3f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh
#
ban_pidfile="/var/run/banip.pid"
ban_enabled="$(/etc/init.d/banip enabled; printf "%u" "${?}")"

if [ "${ban_enabled}" = "1" ] || [ ! -f "${ban_pidfile}" ] || [ -s "${ban_pidfile}" ] || [ "${ACTION}" != "add" ]
then
	exit 0
else
	/etc/init.d/banip refresh
fi