Fix caddyfile not updating due to command execution being intercepted by auth prompt

We always want this command to execute regardless and rebuild the caddy config accordingly.
This commit is contained in:
jaredb7
2023-05-10 23:56:23 +10:00
parent e99129f5f5
commit 6af59a2908
2 changed files with 15 additions and 5 deletions
+5 -2
View File
@@ -25,7 +25,9 @@ if (!isset($_SERVER['PHP_AUTH_USER'])) {
if(isset($_GET['submit'])) {
if(isset($_GET["caddy_pwd"])) {
$caddy_pwd = $_GET["caddy_pwd"];
saveSetting('CADDY_PWD', "\"$caddy_pwd\"",'update_caddyfile');
saveSetting('CADDY_PWD', "\"$caddy_pwd\"");
//Make sure the caddy file is set directly
update_caddyfile();
}
if(isset($_GET["ice_pwd"])) {
@@ -37,7 +39,8 @@ if(isset($_GET['submit'])) {
$birdnetpi_url = $_GET["birdnetpi_url"];
// remove trailing slash to prevent conf from becoming broken
$birdnetpi_url = rtrim($birdnetpi_url, '/');
saveSetting('BIRDNETPI_URL', $birdnetpi_url,'update_caddyfile');
saveSetting('BIRDNETPI_URL', $birdnetpi_url);
update_caddyfile();
}
if(isset($_GET["rtsp_stream"])) {