feat: add active users script #8
@@ -2,7 +2,7 @@
|
||||
<?php
|
||||
$jsonFile = '/opt/html/online.json';
|
||||
|
||||
$activeUsers = shell_exec("who | awk '{print $1}' | sort | uniq");
|
||||
$activeUsers = shell_exec("ps -eo user=,comm= | awk '$2 ~ /sshd/ {print $1}' | sort -u");
|
||||
|
||||
$activeUsersArray = array_filter(explode("\n", $activeUsers));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user