Exit lokinet when stop daemon request made.

pull/23/head
necro-nemesis 6 years ago
parent bb3f0b086f
commit c2a807b1b4

@ -625,6 +625,14 @@ function SaveTORAndVPNConfig()
echo "<pre><strong>$output</strong></pre>"; echo "<pre><strong>$output</strong></pre>";
} elseif (isset($_POST['StopDaemon'])) { } 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>";
sleep 3;
?>
<div class="alert alert-danger"> <div class="alert alert-danger">
Stopping Lokinet background daemon process. Stopping Lokinet background daemon process.
</div> </div>
@ -657,7 +665,7 @@ function SaveTORAndVPNConfig()
} elseif (isset($_POST['GenerateLokinet'])) { } elseif (isset($_POST['GenerateLokinet'])) {
?> ?>
<div class="alert alert-warning"> <div class="alert alert-success">
Generating Lokinet Configuration Generating Lokinet Configuration
</div> </div>
<?php <?php
@ -665,7 +673,7 @@ function SaveTORAndVPNConfig()
echo "<pre><strong>$output</strong></pre>"; echo "<pre><strong>$output</strong></pre>";
} elseif (isset($_POST['ReGenerateLokinet'])) { } elseif (isset($_POST['ReGenerateLokinet'])) {
?> ?>
<div class="alert alert-warning"> <div class="alert alert-success">
Regenerating Lokinet Configuration Regenerating Lokinet Configuration
</div> </div>
<?php <?php
@ -673,7 +681,7 @@ function SaveTORAndVPNConfig()
echo "<pre><strong>$output</strong></pre>"; echo "<pre><strong>$output</strong></pre>";
} elseif (isset($_POST['ApplyLokinetSettings'])) { } elseif (isset($_POST['ApplyLokinetSettings'])) {
$bootstrap = $_POST['lokinetbootstrap']; ?> $bootstrap = $_POST['lokinetbootstrap']; ?>
<div class="alert alert-warning"> <div class="alert alert-success">
Applying Bootstrap Applying Bootstrap
</div> </div>
<?php <?php

Loading…
Cancel
Save