From 1ff01f1b4f6a6985bc5cfa9929011d7a8a6fda91 Mon Sep 17 00:00:00 2001 From: frederik Date: Tue, 5 Mar 2024 12:49:58 +0100 Subject: [PATCH] make sure config is defined --- homepage/views.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/homepage/views.php b/homepage/views.php index c31b3a5..ef1cbe8 100644 --- a/homepage/views.php +++ b/homepage/views.php @@ -15,6 +15,11 @@ $user = shell_exec("awk -F: '/1000/{print $1}' /etc/passwd"); $user = trim($user); $home = shell_exec("awk -F: '/1000/{print $6}' /etc/passwd"); $home = trim($home); +if (file_exists('./scripts/thisrun.txt')) { + $config = parse_ini_file('./scripts/thisrun.txt'); +} elseif (file_exists('./scripts/firstrun.ini')) { + $config = parse_ini_file('./scripts/firstrun.ini'); +} function service_mount() { global $home; $service_mount=trim(shell_exec("systemd-escape -p --suffix=mount ".$home."/BirdSongs/StreamData")); @@ -44,13 +49,6 @@ if(isset($_SESSION['behind'])&&intval($_SESSION['behind']) >= 99) {?> } WARNING: Your latitude and longitude are not set properly. Please do so now in Tools -> Settings."; }