summaryrefslogtreecommitdiffstats
path: root/usr/local/www/status_captiveportal.php
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local/www/status_captiveportal.php')
-rwxr-xr-xusr/local/www/status_captiveportal.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr/local/www/status_captiveportal.php b/usr/local/www/status_captiveportal.php
index 358a04d..e1599f8 100755
--- a/usr/local/www/status_captiveportal.php
+++ b/usr/local/www/status_captiveportal.php
@@ -37,11 +37,14 @@ if ($_GET['act'] == "del") {
exit;
}
+// Lock and read in the captive portal DB
$captiveportallck = lock('captiveportal');
-$concurrent = `cat /var/db/captiveportal.db | wc -l`;
$cpcontents = file("/var/db/captiveportal.db", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
unlock($captiveportallck);
+// Set how many sessions are currently under flight
+$concurrent = count($cpcontents);
+
$pgtitle = "Status: Captive portal ({$concurrent})";
include("head.inc");
OpenPOWER on IntegriCloud