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.

21 lines
497 B

  1. #!/bin/sh
  2. #
  3. adb_pid="${$}"
  4. adb_pidfile="/var/run/adblock.pid"
  5. adb_logger="/usr/bin/logger"
  6. if [ -f "${adb_pidfile}" ] || [ "${ACTION}" != "ifup" ]
  7. then
  8. exit 0
  9. fi
  10. . /lib/functions/network.sh
  11. network_find_wan adb_wanif4
  12. network_find_wan6 adb_wanif6
  13. if [ "${INTERFACE}" = "${adb_wanif4}" ] || [ "${INTERFACE}" = "${adb_wanif6}" ]
  14. then
  15. /etc/init.d/adblock start
  16. "${adb_logger}" -t "adblock[${adb_pid}] info " "adblock service started due to '${ACTION}' of '${INTERFACE}' interface"
  17. fi