diff --git a/includes/dashboard.php b/includes/dashboard.php index 724a0175..0d80a8f4 100755 --- a/includes/dashboard.php +++ b/includes/dashboard.php @@ -88,6 +88,11 @@ function DisplayDashboard(&$extraFooterScripts) $strTxBytes .= getHumanReadableDatasize($strTxBytes); } + exec ('vnstat --dbiflist', $stdoutVnStatDB); + if (!preg_match('/'.$_SESSION['ap_interface'].'/', $stdoutVnStatDB[0])) { + exec('sudo vnstat --add --iface '.$_SESSION['ap_interface'], $return); + } + define('SSIDMAXLEN', 32); // Warning iw comes with: "Do NOT screenscrape this tool, we don't consider its output stable." exec('iw dev ' .$_SESSION['wifi_client_interface']. ' link ', $stdoutIw); diff --git a/installers/raspap.sudoers b/installers/raspap.sudoers index 8e7b3e72..2e97f4fc 100644 --- a/installers/raspap.sudoers +++ b/installers/raspap.sudoers @@ -64,3 +64,4 @@ www-data ALL=(ALL) NOPASSWD:/bin/rm /etc/wireguard/*.conf www-data ALL=(ALL) NOPASSWD:/bin/rm /etc/wireguard/wg-*.key www-data ALL=(ALL) NOPASSWD:/usr/sbin/netplan www-data ALL=(ALL) NOPASSWD:/bin/truncate -s 0 /tmp/*.log,/bin/truncate -s 0 /var/log/dnsmasq.log +www-data ALL=(ALL) NOPASSWD:/usr/bin/vnstat *