Skip to content

Commit

Permalink
reduce changes
Browse files Browse the repository at this point in the history
  • Loading branch information
s-martin authored Apr 15, 2024
1 parent 217a8ba commit 9aed280
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions htdocs/inc.setWifi.php
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -28,9 +28,7 @@
}
}

// End the command string
$exec .= "END\n";
// Execute the command
exec("sudo bash -c '".escapeshellcmd($exec)."'");
}

Expand Down

0 comments on commit 9aed280

Please sign in to comment.