1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-14 19:33:59 +02:00
openwrt-packages/utils/cache-domains/files/30-cache-domains
Gerard Ryan 109f2770a1 cache-domains: Fixed hotplug script not running
Signed-off-by: Gerard Ryan <G.M0N3Y.2503@gmail.com>
2022-03-08 21:55:35 -08:00

15 lines
302 B
Bash

#!/bin/sh
. /lib/functions/network.sh
network_find_wan WAN_IFACE
if [ "${ACTION}" = "ifup" ] && [ "${INTERFACE}" = "${WAN_IFACE}" ] && [ ! -e /var/cache-domains/lancache.conf ]; then
for ATTEMPT in $(seq 1 3); do
if /usr/bin/cache-domains configure; then
break
else
sleep 30
fi
done
fi