|
|
|
@ -352,13 +352,13 @@ function DisplayLokinetConfig()
|
|
|
|
|
$status = '<div class="alert alert-success alert-dismissable">Lokinet daemon is running
|
|
|
|
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>';
|
|
|
|
|
}
|
|
|
|
|
if ($rulestate != "lokinet") {
|
|
|
|
|
/* if ($rulestate != "lokinet") {
|
|
|
|
|
$status = '<div class="alert alert-danger alert-dismissable">Not Connected to Lokinet
|
|
|
|
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>';
|
|
|
|
|
} else {
|
|
|
|
|
$status = '<div class="alert alert-success alert-dismissable">Successfully Connected to Lokinet
|
|
|
|
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>';
|
|
|
|
|
}
|
|
|
|
|
} */
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
<div class="row">
|
|
|
|
@ -389,11 +389,11 @@ function DisplayLokinetConfig()
|
|
|
|
|
<input type="url" class="form-control" placeholder="http://206.81.100.174/n-st-5.signed" id="lokinetbootstrap" name="lokinetbootstrap">
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
if ($rulestate != "lokinet") {
|
|
|
|
|
/* if ($rulestate != "lokinet") {
|
|
|
|
|
echo '<input type="submit" class="btn btn-danger" name="UseLokinet" value="Use Lokinet" />' , PHP_EOL;
|
|
|
|
|
} else {
|
|
|
|
|
echo '<input type="submit" class="btn btn-success" name="ExitLokinet" value="Exit Lokinet" />' , PHP_EOL;
|
|
|
|
|
}
|
|
|
|
|
} */
|
|
|
|
|
if ($lokinetstatus[0] == 0) {
|
|
|
|
|
echo '<input type="submit" class="btn btn-danger" name="StartDaemon" value="Start Daemon" />' , PHP_EOL;
|
|
|
|
|
} else {
|
|
|
|
@ -614,20 +614,20 @@ function SaveTORAndVPNConfig()
|
|
|
|
|
Starting Lokinet background daemon process.
|
|
|
|
|
</div>
|
|
|
|
|
<?php
|
|
|
|
|
/*$output = shell_exec('sudo /etc/init.d/dnsmasq stop');
|
|
|
|
|
echo "<pre><strong>$output</strong></pre>";*/
|
|
|
|
|
$output = shell_exec('sudo /etc/init.d/dnsmasq stop');
|
|
|
|
|
echo "<pre><strong>$output</strong></pre>";
|
|
|
|
|
$output = shell_exec('sudo /home/pi/loki-network/lokilaunch.sh start');
|
|
|
|
|
echo "<pre><strong>$output</strong></pre>";
|
|
|
|
|
/*$output = shell_exec('sudo /etc/init.d/dnsmasq start');
|
|
|
|
|
echo "<pre><strong>$output</strong></pre>";*/
|
|
|
|
|
$output = shell_exec('sudo /etc/init.d/dnsmasq start');
|
|
|
|
|
echo "<pre><strong>$output</strong></pre>";
|
|
|
|
|
} elseif (isset($_POST['StopDaemon'])) {
|
|
|
|
|
?>
|
|
|
|
|
<div class="alert alert-danger">
|
|
|
|
|
Exiting Lokinet.
|
|
|
|
|
</div>
|
|
|
|
|
<?php
|
|
|
|
|
$output = shell_exec('sudo /home/pi/loki-network/lokilaunch.sh disconnect');
|
|
|
|
|
echo "<pre><strong>$output</strong></pre>";
|
|
|
|
|
/* $output = shell_exec('sudo /home/pi/loki-network/lokilaunch.sh disconnect');
|
|
|
|
|
echo "<pre><strong>$output</strong></pre>"; */
|
|
|
|
|
?>
|
|
|
|
|
<div class="alert alert-danger">
|
|
|
|
|
Stopping Lokinet background daemon process.
|
|
|
|
@ -635,7 +635,7 @@ function SaveTORAndVPNConfig()
|
|
|
|
|
<?php
|
|
|
|
|
$output = shell_exec('sudo /home/pi/loki-network/lokilaunch.sh stop');
|
|
|
|
|
echo "<pre><strong>$output</strong></pre>";
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
} elseif (isset($_POST['UseLokinet'])) {
|
|
|
|
|
?>
|
|
|
|
|
<div class="alert alert-success">
|
|
|
|
@ -648,13 +648,15 @@ function SaveTORAndVPNConfig()
|
|
|
|
|
if ($lokinetstatus[0] == 0){
|
|
|
|
|
$output = shell_exec('sudo /home/pi/loki-network/lokilaunch.sh start');
|
|
|
|
|
echo "<pre><strong>$output</strong></pre>";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$output = shell_exec('sudo /home/pi/loki-network/lokilaunch.sh connect');
|
|
|
|
|
echo "<pre><strong>$output</strong></pre>";
|
|
|
|
|
$output = shell_exec('sudo /etc/init.d/dnsmasq start');
|
|
|
|
|
# sleep(5);
|
|
|
|
|
# $output = shell_exec('sudo dnsmasq --interface=wlan0 --bind-interfaces --dhcp-range=10.3.141.0,10.3.141.24,12h --conf-file=/etc/resolv.conf');
|
|
|
|
|
echo "<pre><strong>$output</strong></pre>";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} elseif (isset($_POST['ExitLokinet'])) {
|
|
|
|
|
?>
|
|
|
|
|
<div class="alert alert-danger">
|
|
|
|
@ -663,7 +665,7 @@ function SaveTORAndVPNConfig()
|
|
|
|
|
<?php
|
|
|
|
|
$output = shell_exec('sudo /home/pi/loki-network/lokilaunch.sh disconnect');
|
|
|
|
|
echo "<pre><strong>$output</strong></pre>";
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
} elseif (isset($_POST['GenerateLokinet'])) {
|
|
|
|
|
?>
|
|
|
|
|
<div class="alert alert-success">
|
|
|
|
@ -686,8 +688,9 @@ function SaveTORAndVPNConfig()
|
|
|
|
|
Exiting Lokinet.
|
|
|
|
|
</div>
|
|
|
|
|
<?php
|
|
|
|
|
$output = shell_exec('sudo /home/pi/loki-network/lokilaunch.sh disconnect');
|
|
|
|
|
/* $output = shell_exec('sudo /home/pi/loki-network/lokilaunch.sh disconnect');
|
|
|
|
|
echo "<pre><strong>$output</strong></pre>";
|
|
|
|
|
*/
|
|
|
|
|
?>
|
|
|
|
|
<div class="alert alert-danger">
|
|
|
|
|
Stopping Lokinet background daemon process.
|
|
|
|
|