1
0

vnstat.defaults 238 B

12345678910111213
  1. #!/bin/sh
  2. wan="$(uci -P/var/state get network.wan.ifname)"
  3. if [ -n "$wan" ]; then
  4. uci -q batch <<-EOF >/dev/null
  5. del_list vnstat.@vnstat[-1].interface=$wan
  6. add_list vnstat.@vnstat[-1].interface=$wan
  7. commit vnstat
  8. EOF
  9. fi
  10. exit 0