From 75bc9918ef5b9e82ac8dba82e22df6b30075e8b2 Mon Sep 17 00:00:00 2001 From: ehpersonal38 <103586016+ehpersonal38@users.noreply.github.com> Date: Fri, 17 Feb 2023 20:06:56 -0500 Subject: [PATCH] issue #742 --- scripts/advanced.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/advanced.php b/scripts/advanced.php index 440f16e..2e09f06 100644 --- a/scripts/advanced.php +++ b/scripts/advanced.php @@ -66,13 +66,14 @@ if(isset($_GET['submit'])) { if(isset($_GET["rtsp_stream"])) { $rtsp_stream = str_replace("\r\n", ",", $_GET["rtsp_stream"]); if(strcmp($rtsp_stream,$config['RTSP_STREAM']) !== 0) { - $contents = preg_replace("/RTSP_STREAM=.*/", "RTSP_STREAM=$rtsp_stream", $contents); - $contents2 = preg_replace("/RTSP_STREAM=.*/", "RTSP_STREAM=$rtsp_stream", $contents2); + $contents = preg_replace("/RTSP_STREAM=.*/", "RTSP_STREAM=\"$rtsp_stream\"", $contents); + $contents2 = preg_replace("/RTSP_STREAM=.*/", "RTSP_STREAM=\"$rtsp_stream\"", $contents2); $fh = fopen('/etc/birdnet/birdnet.conf', "w"); $fh2 = fopen("./scripts/thisrun.txt", "w"); fwrite($fh, $contents); fwrite($fh2, $contents2); exec('sudo systemctl restart birdnet_recording.service'); + exec('sudo systemctl restart livestream.service'); } }