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.

24 lines
594 B

  1. #!/bin/sh
  2. #
  3. adb_pid="${$}"
  4. adb_helper="/usr/bin/adblock-helper.sh"
  5. adb_pidfile="/var/run/adblock.pid"
  6. adb_enabled="$(/etc/init.d/adblock enabled; echo $?)"
  7. if [ "${adb_enabled}" = "1" ] || [ -f "${adb_pidfile}" ] || [ "${ACTION}" != "ifup" ]
  8. then
  9. exit 0
  10. fi
  11. . "${adb_helper}"
  12. f_envload
  13. if [ "${INTERFACE}" = "${adb_wanif4}" ] || [ "${INTERFACE}" = "${adb_wanif6}" ]
  14. then
  15. if [ -z "${adb_hotplugif}" ] || [ "${INTERFACE}" = "${adb_hotplugif}" ]
  16. then
  17. /etc/init.d/adblock start
  18. f_log "adblock service started due to '${ACTION}' of '${INTERFACE}' interface"
  19. fi
  20. fi