Fix php warnings + general code cleanup

This commit is contained in:
billz
2023-09-03 09:47:51 +02:00
parent 5457855aa1
commit 55c0a49911
4 changed files with 42 additions and 26 deletions

View File

@@ -64,7 +64,7 @@ function DisplayOpenVPNConfig()
ftruncate($f, 0);
fclose($f);
}
} elseif (isset($_POST['log-openvpn']) || filesize('/tmp/openvpn.log') >0) {
} elseif (isset($_POST['log-openvpn']) || file_exists('/tmp/openvpn.log')) {
$logEnable = 1;
exec("sudo /etc/raspap/openvpn/openvpnlog.sh", $logOutput);
$logOutput = file_get_contents('/tmp/openvpn.log');