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(); + } } }