From 00334746d90483f2365d0f601b6930d514b7a190 Mon Sep 17 00:00:00 2001 From: SubleXBle <51033045+SubleXBle@users.noreply.github.com> Date: Sun, 17 Aug 2025 15:31:21 +0200 Subject: [PATCH] Update paths.php --- Web-UI/includes/paths.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Web-UI/includes/paths.php b/Web-UI/includes/paths.php index 3b5dcc8..d96083d 100644 --- a/Web-UI/includes/paths.php +++ b/Web-UI/includes/paths.php @@ -21,8 +21,13 @@ $SERVERS = [ "tests" => "Testing" ]; -// Default Server => Will have to be set in config to work for others -$DEFAULT_SERVER = "swsrv"; +// Config einlesen +$configFile = '/opt/Fail2Ban-Report/Settings/fail2ban-report.config'; +$config = parse_ini_file($configFile, true); + +// Standardserver aus Config laden, fallback auf "swsrv" +$DEFAULT_SERVER = $config['Default Server']['defaultserver'] ?? 'swsrv'; + // If choosen item -> dont forget if (isset($_POST['server']) && array_key_exists($_POST['server'], $SERVERS)) {