Skip to content

Instantly share code, notes, and snippets.

@PastaGringo
Created November 28, 2017 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PastaGringo/c02192b5d9b85d460cf963c66f74e22d to your computer and use it in GitHub Desktop.
Save PastaGringo/c02192b5d9b85d460cf963c66f74e22d to your computer and use it in GitHub Desktop.
Reset QuickBox Dashboard bandwith details
#!/bin/bash
interfaces=$(ls /var/lib/vnstat)
echo
echo "Resetting QuickBox Dashboard bandwith details..."
service vnstat stop
for interface in $interfaces
do
rm -rf "/var/lib/vnstat/$interface" "/var/lib/vnstat/.$interface"
/usr/bin/vnstat -u -i $interface &> /dev/null
done
chown -R vnstat:vnstat /var/lib/vnstat
service vnstat start
echo -e "\e[32mSuccess.\e[39m"
echo -e "\e[33mThe dashboard needs few minutes to display data again.\e[39m"
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment