#!/bin/sh
|
|
#
|
|
|
|
if [ -f "/var/run/adblock.pid" ] || [ "${ACTION}" != "ifup" ]
|
|
then
|
|
exit 0
|
|
fi
|
|
|
|
. /lib/functions/network.sh
|
|
adb_pid="${$}"
|
|
adb_logger="/usr/bin/logger"
|
|
network_find_wan adb_wanif4
|
|
network_find_wan6 adb_wanif6
|
|
|
|
if [ "${INTERFACE}" = "${adb_wanif4}" ] || [ "${INTERFACE}" = "${adb_wanif6}" ]
|
|
then
|
|
/etc/init.d/adblock start
|
|
"${adb_logger}" -t "adblock[${adb_pid}] info " "adblock service started due to '${ACTION}' of '${INTERFACE}' interface"
|
|
fi
|