20 lines
445 B
PHP
20 lines
445 B
PHP
|
<?php
|
||
|
|
||
|
$rootPW = $_POST["rootPW"];
|
||
|
$pwNewKc = $_POST["pwNewKc"];
|
||
|
|
||
|
$shellcommand = "echo $rootPW | sudo -S nmcli con modify kaoscube 802-11-wireless-security.psk $pwNewKc";
|
||
|
$commandAPdown = "echo $rootPW | sudo -S nmcli con down kaoscube";
|
||
|
$commandAPup = "echo $rootPW | sudo -S nmcli con up kaoscube";
|
||
|
|
||
|
$output = exec($shellcommand);
|
||
|
$output2 = exec($commandAPdown);
|
||
|
$output3 = exec($commandAPup);
|
||
|
|
||
|
echo _($output3);
|
||
|
|
||
|
echo _(" oi oi oi ");
|
||
|
|
||
|
?>
|
||
|
|