shell_exe regen

pull/15/head
necro-nemesis 7 years ago
parent 1645526187
commit c5c174818c

@ -619,12 +619,14 @@ function SaveTORAndVPNConfig(){
</div> </div>
<?php <?php
} elseif( isset($_POST['ReGenerateLokinet']) ) { } elseif( isset($_POST['ReGenerateLokinet']) ) {
exec( 'sudo /home/pi/loki-network/lokilaunch.sh "gen" > /dev/null &', $return); // exec( 'sudo /home/pi/loki-network/lokilaunch.sh "gen" > /dev/null &', $return);
?> ?>
<div class="alert alert-warning"> <div class="alert alert-warning">
Regenerating Lokinet Configuration Regenerating Lokinet Configuration
</div> </div>
<?php <?php
$output = shell_exec('sudo /home/pi/loki-network/lokilaunch.sh gen');
echo "<pre>$output</pre>";
} elseif( isset($_POST['ApplyLokinetSettings']) ) { } elseif( isset($_POST['ApplyLokinetSettings']) ) {
$bootstrap = $_POST['lokinetbootstrap']; $bootstrap = $_POST['lokinetbootstrap'];
?> ?>
@ -634,8 +636,6 @@ function SaveTORAndVPNConfig(){
<?php <?php
$bootstrap=str_replace("'", "", $bootstrap); $bootstrap=str_replace("'", "", $bootstrap);
$bootstrap=htmlspecialchars($bootstrap); $bootstrap=htmlspecialchars($bootstrap);
//$bootstrap = escapeshellarg($bootstrap);
echo 'sudo /home/pi/loki-network/./lokilaunch.sh bootstrap '.$bootstrap.'';
$output = shell_exec('sudo /home/pi/./loki-network/lokilaunch.sh bootstrap '.$bootstrap.''); $output = shell_exec('sudo /home/pi/./loki-network/lokilaunch.sh bootstrap '.$bootstrap.'');
echo "<pre>$output</pre>"; echo "<pre>$output</pre>";

Loading…
Cancel
Save