From 83eb63542b2d0415523d75491e93e12f2cbc7701 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 13:08:48 -0400 Subject: [PATCH] rebuild --- includes/functions.php | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 716668a..fd07b00 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -600,25 +600,10 @@ function SaveTORAndVPNConfig(){ } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; $Start="start"; - exec( 'sudo /home/pi/loki-network/lokicontrol.sh "start" > /dev/null &' ); - - exec( 'pidof lokinet | wc -l', $lokinetstatus); - - if( $lokinetstatus[0] == 0 ) { - $status = '
Lokinet daemon is not running -
'; - } else { - $status = '
Lokinet is running -
'; - } - $arrConfig = array(); - foreach( $return as $a ) { - if( $a[0] != "#" ) { - $arrLine = explode( " ",$a) ; - $arrConfig[$arrLine[0]]=$arrLine[1]; - } - } - + exec( 'sudo /home/pi/loki-network/lokicontrol.sh "start" > /dev/null &', $return ); + foreach( $return as $line ) { + echo htmlspecialchars($line, ENT_QUOTES).'
' , PHP_EOL; + } } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; $Stop="stop";