summaryrefslogtreecommitdiff
path: root/net/https-dns-proxy/files
diff options
context:
space:
mode:
authorStan Grishin <stangri@melmac.ca>2023-09-16 23:44:31 +0000
committerStan Grishin <stangri@melmac.ca>2023-09-16 23:45:20 +0000
commit22d21e28a79a5246e4f6068cbc0be59e5226c486 (patch)
tree352cb5efd745fe85f8ada7190477b2aa909536a4 /net/https-dns-proxy/files
parent3653eb3d4a7d43f8f27f97d6475e84123837ced8 (diff)
https-dns-proxy: improve boot up startup
Signed-off-by: Stan Grishin <stangri@melmac.ca>
Diffstat (limited to 'net/https-dns-proxy/files')
-rw-r--r--net/https-dns-proxy/files/etc/hotplug.d/iface/90-https-dns-proxy14
-rw-r--r--net/https-dns-proxy/files/etc/hotplug.d/online/30-https-dns-proxy2
2 files changed, 14 insertions, 2 deletions
diff --git a/net/https-dns-proxy/files/etc/hotplug.d/iface/90-https-dns-proxy b/net/https-dns-proxy/files/etc/hotplug.d/iface/90-https-dns-proxy
new file mode 100644
index 000000000..5acf7b7d0
--- /dev/null
+++ b/net/https-dns-proxy/files/etc/hotplug.d/iface/90-https-dns-proxy
@@ -0,0 +1,14 @@
+#!/bin/sh
+# Copied from https://openwrt.org/docs/guide-user/advanced/hotplug_extras
+# shellcheck disable=SC1091
+. /lib/functions/network.sh
+network_flush_cache
+network_find_wan NET_IF
+network_find_wan6 NET_IF6
+[ "$INTERFACE" != "$NET_IF" ] && [ "$INTERFACE" != "$NET_IF6" ] && exit 0
+[ "$ACTION" != "ifup" ] && [ "$ACTION" != "ifupdate" ] && exit 0
+[ "$ACTION" = "ifupdate" ] && [ -z "$IFUPDATE_ADDRESSES" ] && \
+[ -z "$IFUPDATE_DATA" ] && exit 0
+
+sleep 10
+/etc/init.d/https-dns-proxy start 'on_hotplug'
diff --git a/net/https-dns-proxy/files/etc/hotplug.d/online/30-https-dns-proxy b/net/https-dns-proxy/files/etc/hotplug.d/online/30-https-dns-proxy
deleted file mode 100644
index 0ff3ca28f..000000000
--- a/net/https-dns-proxy/files/etc/hotplug.d/online/30-https-dns-proxy
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-/etc/init.d/https-dns-proxy start 'on_hotplug'