You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
410 B

  1. #!/bin/sh
  2. #
  3. [ "${ACTION}" != "add" ] && exit 0
  4. ban_iface="wan"
  5. [ -r "/lib/functions/network.sh" ] && { . "/lib/functions/network.sh"; network_find_wan ban_iface; }
  6. [ "${INTERFACE}" != "${ban_iface}" ] && exit 0
  7. ban_pidfile="/var/run/banip.pid"
  8. ban_enabled="$(/etc/init.d/banip enabled; printf "%u" "${?}")"
  9. if [ "${ban_enabled}" = "0" ] && [ ! -s "${ban_pidfile}" ]
  10. then
  11. /etc/init.d/banip refresh
  12. fi
  13. exit 0