From 9aed280f1bb730ceed3d93ed0b6a10c6c8cf7107 Mon Sep 17 00:00:00 2001 From: s-martin Date: Mon, 15 Apr 2024 18:20:20 +0200 Subject: [PATCH] reduce changes --- htdocs/inc.setWifi.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/htdocs/inc.setWifi.php b/htdocs/inc.setWifi.php index 6e5daa3a0..94e12d8de 100755 --- a/htdocs/inc.setWifi.php +++ b/htdocs/inc.setWifi.php @@ -6,7 +6,7 @@ */ unset($exec); if(isset($_POST["submitWifi"]) && $_POST["submitWifi"] == "submit") { - // Initialize the command string + // make multiline bash $exec = "bash -e <<'END'\n"; $exec .= "source ".$conf['scripts_abs']."/helperscripts/inc.networkHelper.sh\n"; $exec .= "clear_wireless_networks\n"; @@ -28,9 +28,7 @@ } } - // End the command string $exec .= "END\n"; - // Execute the command exec("sudo bash -c '".escapeshellcmd($exec)."'"); }