kc-interface/connect2Network.php
2022-12-20 14:30:30 +01:00

14 lines
266 B
PHP

<?php
$name = $_POST["name"];
$password = $_POST["password"];
$rootPW = $_POST["rootPW"];
$shellcommand = "echo $rootPW | sudo -S nmcli dev wifi connect $name password $password ifname wlx00e0318cea7d";
$output = shell_exec($shellcommand);
echo _($output);
?>