kc-interface/connect2Network.php

15 lines
266 B
PHP
Raw Normal View History

2022-12-20 14:30:30 +01:00
<?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);
?>