1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Update vnstat

This commit is contained in:
Ycarus (Yannick Chabanois) 2019-09-02 18:00:10 +02:00
parent cb4dce3f03
commit 155e56460e
6 changed files with 298 additions and 0 deletions

View file

@ -0,0 +1,13 @@
#!/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