From 2d05f74d46a5b82a46c7830bd5b1df8de1c674c4 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Mon, 18 Mar 2019 19:22:14 -0400 Subject: [PATCH] Create Lokinet Functions --- includes/functions.php | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index de0321d..6a15519 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -411,8 +411,6 @@ function DisplayLokinetConfig(){ - - @@ -599,5 +597,25 @@ function SaveTORAndVPNConfig(){ foreach( $return as $line ) { echo htmlspecialchars($line, ENT_QUOTES).'
' , PHP_EOL; } + } elseif( isset($_POST['StartLokinet']) ) { + echo "Attempting to start Lokinet"; + exec( 'lokinet', $return ); + location.reload(); + } + } elseif( isset($_POST['StopLokinet']) ) { + echo "Attempting to stop Lokinet"; + exec( 'pkill lokinet', $return ); + location.reload(); + } + } elseif( isset($_POST['GenerateLokinet']) ) { + echo "Attempting to generate Lokinet"; + exec( 'lokinet -g', $return ); + location.reload(); + } + } elseif( isset($_POST['ReGenerateLokinet']) ) { + echo "Attempting to regenerate Lokinet"; + exec( 'lokinet -g', $return ); + location.reload(); + } } }