From be8f6b190909b14a957761a34793512290d79225 Mon Sep 17 00:00:00 2001 From: xiaorouji <60100640+xiaorouji@users.noreply.github.com> Date: Thu, 9 Feb 2023 15:47:53 +0800 Subject: [PATCH] luci: auto restart when iface up --- luci-app-passwall/root/etc/hotplug.d/iface/98-passwall | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 luci-app-passwall/root/etc/hotplug.d/iface/98-passwall diff --git a/luci-app-passwall/root/etc/hotplug.d/iface/98-passwall b/luci-app-passwall/root/etc/hotplug.d/iface/98-passwall new file mode 100644 index 000000000..d89385efd --- /dev/null +++ b/luci-app-passwall/root/etc/hotplug.d/iface/98-passwall @@ -0,0 +1,6 @@ +#!/bin/sh + +[[ "$ACTION" == "ifup" && $(uci get "passwall.@global[0].enabled") == "1" ]] && { + /etc/init.d/passwall restart + echo "passwall: restart when $INTERFACE ifup" > /dev/kmsg +}