mirror of
https://github.com/openwrt/packages.git
synced 2026-05-31 15:02:01 +08:00
177bfef1c7
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
14 lines
238 B
Bash
14 lines
238 B
Bash
#!/bin/sh
|
|
|
|
wan="$(uci -P/var/state get network.wan.ifname)"
|
|
|
|
if [ -n "$wan" ]; then
|
|
uci -q batch <<-EOF >/dev/null
|
|
del_list vnstat.@vnstat[-1].interface=$wan
|
|
add_list vnstat.@vnstat[-1].interface=$wan
|
|
commit vnstat
|
|
EOF
|
|
fi
|
|
|
|
exit 0
|