mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-28 07:32:51 +08:00
14 lines
434 B
Bash
Executable File
14 lines
434 B
Bash
Executable File
#!/bin/sh
|
|
# Hotplug trigger for flowproxy to restore policy routing on interface reload
|
|
|
|
[ "$ACTION" = "ifup" ] || exit 0
|
|
|
|
enabled=$(uci -q get flowproxy.global.enabled || echo 0)
|
|
[ "$enabled" = "1" ] || exit 0
|
|
|
|
target_iface=$(uci -q get flowproxy.global.interface || echo "br-lan")
|
|
|
|
if [ "$DEVICE" = "$target_iface" ] || [ "$INTERFACE" = "$target_iface" ]; then
|
|
[ -x /etc/init.d/flowproxy ] && /etc/init.d/flowproxy add_route
|
|
fi
|