From 952fbd32d5ca3bd7a29c895acfaccfba54bc873f Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Mon, 6 May 2019 20:41:13 -0400 Subject: [PATCH] remove connect/disconnect lokinet --- includes/functions.php | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index f3f7efd..fc13073 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -352,13 +352,13 @@ function DisplayLokinetConfig() $status = '
Lokinet daemon is running
'; } - if ($rulestate != "lokinet") { + /* if ($rulestate != "lokinet") { $status = '
Not Connected to Lokinet
'; } else { $status = '
Successfully Connected to Lokinet
'; - } + } */ ?>
@@ -389,11 +389,11 @@ function DisplayLokinetConfig() ' , PHP_EOL; } else { echo '' , PHP_EOL; - } + } */ if ($lokinetstatus[0] == 0) { echo '' , PHP_EOL; } else { @@ -614,20 +614,20 @@ function SaveTORAndVPNConfig() Starting Lokinet background daemon process.
$output";*/ + $output = shell_exec('sudo /etc/init.d/dnsmasq stop'); + echo "
$output
"; $output = shell_exec('sudo /home/pi/loki-network/lokilaunch.sh start'); echo "
$output
"; - /*$output = shell_exec('sudo /etc/init.d/dnsmasq start'); - echo "
$output
";*/ + $output = shell_exec('sudo /etc/init.d/dnsmasq start'); + echo "
$output
"; } elseif (isset($_POST['StopDaemon'])) { ?>
Exiting Lokinet.
$output"; + /* $output = shell_exec('sudo /home/pi/loki-network/lokilaunch.sh disconnect'); + echo "
$output
"; */ ?>
Stopping Lokinet background daemon process. @@ -635,7 +635,7 @@ function SaveTORAndVPNConfig() $output"; - +/* } elseif (isset($_POST['UseLokinet'])) { ?>
@@ -648,13 +648,15 @@ function SaveTORAndVPNConfig() if ($lokinetstatus[0] == 0){ $output = shell_exec('sudo /home/pi/loki-network/lokilaunch.sh start'); echo "
$output
"; - } + $output = shell_exec('sudo /home/pi/loki-network/lokilaunch.sh connect'); echo "
$output
"; $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 "
$output
"; +} + } elseif (isset($_POST['ExitLokinet'])) { ?>
@@ -663,7 +665,7 @@ function SaveTORAndVPNConfig() $output"; - +*/ } elseif (isset($_POST['GenerateLokinet'])) { ?>
@@ -686,8 +688,9 @@ function SaveTORAndVPNConfig() Exiting Lokinet.
$output"; +*/ ?>
Stopping Lokinet background daemon process.