strpos
This commit is contained in:
parent
70543310f1
commit
ef929f1434
|
|
@ -31,7 +31,7 @@ if (is_file($jsonFile)) {
|
||||||
// Function to get UFW status
|
// Function to get UFW status
|
||||||
function getUfwStatus() {
|
function getUfwStatus() {
|
||||||
$status = shell_exec("sudo ufw status");
|
$status = shell_exec("sudo ufw status");
|
||||||
return (strintpos($status, 'Status: active') !== false) ? 'enabled' : 'disabled';
|
return (strpos($status, 'Status: active') !== false) ? 'enabled' : 'disabled';
|
||||||
}
|
}
|
||||||
|
|
||||||
$currentStatus = getUfwStatus();
|
$currentStatus = getUfwStatus();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue