kc-interface/changeKCPWaction.php

20 lines
445 B
PHP
Raw Normal View History

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