From 2d05f74d46a5b82a46c7830bd5b1df8de1c674c4 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Mon, 18 Mar 2019 19:22:14 -0400 Subject: [PATCH 01/89] 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(); + } } } From 48efbfd4af4d708db356989bac1e0e675f8afa80 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Mon, 18 Mar 2019 19:26:07 -0400 Subject: [PATCH 02/89] reformatting and comment --- includes/functions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 6a15519..f62053c 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -600,7 +600,7 @@ function SaveTORAndVPNConfig(){ } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; exec( 'lokinet', $return ); - location.reload(); +// location.reload(); } } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; @@ -610,12 +610,12 @@ function SaveTORAndVPNConfig(){ } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; exec( 'lokinet -g', $return ); - location.reload(); + // location.reload(); } } elseif( isset($_POST['ReGenerateLokinet']) ) { echo "Attempting to regenerate Lokinet"; exec( 'lokinet -g', $return ); - location.reload(); + // location.reload(); } } } From 5b982dc5897858d8829bde7601992d08c34cd016 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Mon, 18 Mar 2019 19:29:28 -0400 Subject: [PATCH 03/89] comment out --- includes/functions.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index f62053c..5b4db83 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -597,7 +597,7 @@ function SaveTORAndVPNConfig(){ foreach( $return as $line ) { echo htmlspecialchars($line, ENT_QUOTES).'
' , PHP_EOL; } - } elseif( isset($_POST['StartLokinet']) ) { +/* } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; exec( 'lokinet', $return ); // location.reload(); @@ -615,7 +615,8 @@ function SaveTORAndVPNConfig(){ } elseif( isset($_POST['ReGenerateLokinet']) ) { echo "Attempting to regenerate Lokinet"; exec( 'lokinet -g', $return ); - // location.reload(); + // location.reload(); } + */ } } From efdbbf57039fcaed9c9451e97ccc5e87b189f3be Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Mon, 18 Mar 2019 19:39:33 -0400 Subject: [PATCH 04/89] start lokinet --- includes/functions.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 5b4db83..145af88 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -597,12 +597,12 @@ function SaveTORAndVPNConfig(){ foreach( $return as $line ) { echo htmlspecialchars($line, ENT_QUOTES).'
' , PHP_EOL; } -/* } elseif( isset($_POST['StartLokinet']) ) { + } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( 'lokinet', $return ); -// location.reload(); - } - } elseif( isset($_POST['StopLokinet']) ) { + exec( 'lokinet' ); + location.reload(); + } +/* } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; exec( 'pkill lokinet', $return ); location.reload(); @@ -615,7 +615,7 @@ function SaveTORAndVPNConfig(){ } elseif( isset($_POST['ReGenerateLokinet']) ) { echo "Attempting to regenerate Lokinet"; exec( 'lokinet -g', $return ); - // location.reload(); + // location.reload(); } */ } From aea069481fc59e11488c5af13e4250cf5bced752 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Mon, 18 Mar 2019 19:40:48 -0400 Subject: [PATCH 05/89] provide path --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index 145af88..e561668 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,7 +599,7 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( 'lokinet' ); + exec( '/home/pi/loki-network/lokinet' ); location.reload(); } /* } elseif( isset($_POST['StopLokinet']) ) { From d649609a47cd82fee57aa3f2c2e62acd8c725f91 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Mon, 18 Mar 2019 19:52:48 -0400 Subject: [PATCH 06/89] /usr/local/bin/lokinet --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index e561668..cf200af 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,7 +599,7 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( '/home/pi/loki-network/lokinet' ); + exec( '/usr/local/bin/lokinet' ); location.reload(); } /* } elseif( isset($_POST['StopLokinet']) ) { From 883682870610f060fdeea24351182d298d8bd90f Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Mon, 18 Mar 2019 19:54:10 -0400 Subject: [PATCH 07/89] .exe --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index cf200af..b79063a 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,7 +599,7 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( '/usr/local/bin/lokinet' ); + exec( '/usr/local/bin/lokinet.exe' ); location.reload(); } /* } elseif( isset($_POST['StopLokinet']) ) { From 114bd614a8c2677f83bd26e1188fa30bdfdc9907 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Mon, 18 Mar 2019 19:55:30 -0400 Subject: [PATCH 08/89] //comment out location.reload() --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index b79063a..d522160 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -600,7 +600,7 @@ function SaveTORAndVPNConfig(){ } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; exec( '/usr/local/bin/lokinet.exe' ); - location.reload(); +// location.reload(); } /* } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; From 1e9d0f528386a165568ad1ddcff99d1d0e049ece Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Mon, 18 Mar 2019 19:57:13 -0400 Subject: [PATCH 09/89] change execution --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index d522160..40140b3 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,7 +599,7 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( '/usr/local/bin/lokinet.exe' ); + exec( '/usr/local/bin/lokinet' ); // location.reload(); } /* } elseif( isset($_POST['StopLokinet']) ) { From 3bcf9c637791b1419fe7c0c544d68a03d629ca3d Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Mon, 18 Mar 2019 19:59:04 -0400 Subject: [PATCH 10/89] test know function --- includes/functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index 40140b3..47b2940 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,8 +599,9 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( '/usr/local/bin/lokinet' ); + exec( 'sudo /etc/init.d/tor stop' ); // location.reload(); +///usr/local/bin/lokinet } /* } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; From b26fc17c6ea826b770382fefe4e447dcd2018023 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Mon, 18 Mar 2019 20:07:47 -0400 Subject: [PATCH 11/89] add $return --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index 47b2940..ae6f6cb 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,7 +599,7 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( 'sudo /etc/init.d/tor stop' ); + exec( 'sudo /etc/init.d/tor stop', $return ); // location.reload(); ///usr/local/bin/lokinet } From 6b64db01513f853e200f25fcb3061c9a0973d2e9 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Mon, 18 Mar 2019 20:11:46 -0400 Subject: [PATCH 12/89] remove brace --- includes/functions.php | 1 - 1 file changed, 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index ae6f6cb..f3888ad 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -602,7 +602,6 @@ function SaveTORAndVPNConfig(){ exec( 'sudo /etc/init.d/tor stop', $return ); // location.reload(); ///usr/local/bin/lokinet - } /* } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; exec( 'pkill lokinet', $return ); From 4ad67974f9d0bec6482be25a86e868c8260c1051 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Mon, 18 Mar 2019 20:12:47 -0400 Subject: [PATCH 13/89] location.reload() test --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index f3888ad..012f764 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -600,7 +600,7 @@ function SaveTORAndVPNConfig(){ } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; exec( 'sudo /etc/init.d/tor stop', $return ); -// location.reload(); + location.reload(); ///usr/local/bin/lokinet /* } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; From b0ad5817250b77e32c5e667dd3571b682b2a39ce Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Mon, 18 Mar 2019 20:24:44 -0400 Subject: [PATCH 14/89] all lokinet start stop functions --- includes/functions.php | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 012f764..d255b8d 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,24 +599,19 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( 'sudo /etc/init.d/tor stop', $return ); - location.reload(); -///usr/local/bin/lokinet -/* } elseif( isset($_POST['StopLokinet']) ) { + exec( '/usr/local/bin/lokinet', $return ); + location.reload(); + } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; exec( 'pkill lokinet', $return ); - location.reload(); - } + location.reload(); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; exec( 'lokinet -g', $return ); - // location.reload(); - } + location.reload(); } elseif( isset($_POST['ReGenerateLokinet']) ) { echo "Attempting to regenerate Lokinet"; exec( 'lokinet -g', $return ); - // location.reload(); + location.reload(); } - */ } -} From 4681a365fcb967b666c2fe637466d5f70dfd3470 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Mon, 18 Mar 2019 20:31:50 -0400 Subject: [PATCH 15/89] run as sudo --- includes/functions.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index d255b8d..acd8898 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,19 +599,19 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( '/usr/local/bin/lokinet', $return ); + exec( 'sudo /usr/local/bin/lokinet', $return ); location.reload(); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; - exec( 'pkill lokinet', $return ); + exec( 'sudo pkill lokinet', $return ); location.reload(); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; - exec( 'lokinet -g', $return ); + exec( 'sudo lokinet -g', $return ); location.reload(); } elseif( isset($_POST['ReGenerateLokinet']) ) { echo "Attempting to regenerate Lokinet"; - exec( 'lokinet -g', $return ); + exec( 'sudo lokinet -g', $return ); location.reload(); } } From de3cd098e21a818f224b5967518dcf82c9b24fd5 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Mon, 18 Mar 2019 21:08:55 -0400 Subject: [PATCH 16/89] ./ invoke --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index acd8898..92c76f1 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,7 +599,7 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( 'sudo /usr/local/bin/lokinet', $return ); + exec( '/usr/local/bin/./lokinet', $return ); location.reload(); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; From 99e84afa18caa4ff5fa7103a1d57bbf18324dcb8 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Mon, 18 Mar 2019 21:21:22 -0400 Subject: [PATCH 17/89] shell_exe --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index 92c76f1..606268d 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,7 +599,7 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( '/usr/local/bin/./lokinet', $return ); + shell_exec( '/usr/local/bin/lokinet', $return ); location.reload(); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; From 64703d38f03aa14628887af9ba14b2d12d6ec39b Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Mon, 18 Mar 2019 21:33:38 -0400 Subject: [PATCH 18/89] get current working directory --- includes/functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index 606268d..86fb70c 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,7 +599,8 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - shell_exec( '/usr/local/bin/lokinet', $return ); + echo getcwd() . "\n"; + // exec( '/usr/local/bin/lokinet', $return ); location.reload(); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; From 95341ffacf292acd81bbdc627c72d2d45abb74f7 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Mon, 18 Mar 2019 21:42:40 -0400 Subject: [PATCH 19/89] absolute path --- includes/functions.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 86fb70c..d574a64 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,8 +599,7 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - echo getcwd() . "\n"; - // exec( '/usr/local/bin/lokinet', $return ); + exec( '/home/pi/loki-network/lokinet', $return ); location.reload(); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; From 3a6603876848da38a0dfb8b2b756d548c017f075 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Mon, 18 Mar 2019 21:43:45 -0400 Subject: [PATCH 20/89] run as sudo --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index d574a64..3e45c95 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,7 +599,7 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( '/home/pi/loki-network/lokinet', $return ); + exec( 'sudo /home/pi/loki-network/lokinet', $return ); location.reload(); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; From dc893a30526522a1d4e4bdb7335e29ab2cf0c649 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Mon, 18 Mar 2019 22:20:47 -0400 Subject: [PATCH 21/89] functions changed --- includes/functions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 3e45c95..e8c4101 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,7 +599,7 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( 'sudo /home/pi/loki-network/lokinet', $return ); + exec( '/home/pi/loki-network/lokinet', $return ); location.reload(); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; @@ -607,11 +607,11 @@ function SaveTORAndVPNConfig(){ location.reload(); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; - exec( 'sudo lokinet -g', $return ); + exec( '/home/pi/loki-network/lokinet -g', $return ); location.reload(); } elseif( isset($_POST['ReGenerateLokinet']) ) { echo "Attempting to regenerate Lokinet"; - exec( 'sudo lokinet -g', $return ); + exec( '/home/pi/loki-network/lokinet -g', $return ); location.reload(); } } From 975f178435da4be4751fe14f94949038d095f183 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Mon, 18 Mar 2019 22:30:13 -0400 Subject: [PATCH 22/89] start --- includes/functions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index e8c4101..37c3108 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,7 +599,7 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( '/home/pi/loki-network/lokinet', $return ); + exec( '/home/pi/loki-network/lokinet start', $return ); location.reload(); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; @@ -607,11 +607,11 @@ function SaveTORAndVPNConfig(){ location.reload(); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; - exec( '/home/pi/loki-network/lokinet -g', $return ); + exec( '/home/pi/loki-network/lokinet -g start', $return ); location.reload(); } elseif( isset($_POST['ReGenerateLokinet']) ) { echo "Attempting to regenerate Lokinet"; - exec( '/home/pi/loki-network/lokinet -g', $return ); + exec( '/home/pi/loki-network/lokinet -g start', $return ); location.reload(); } } From 7401cefcfdf22568b3ed563bb217e9521648fa21 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Mon, 18 Mar 2019 22:38:59 -0400 Subject: [PATCH 23/89] start shell --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index 37c3108..64e1f3e 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,7 +599,7 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( '/home/pi/loki-network/lokinet start', $return ); + exec( '/home/pi/loki-network/lokinet.sh', $return ); location.reload(); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; From f7d559657da3ef0df0269e78a00383c393928ebc Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Mon, 18 Mar 2019 22:40:11 -0400 Subject: [PATCH 24/89] add start --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index 64e1f3e..8f440c5 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,7 +599,7 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( '/home/pi/loki-network/lokinet.sh', $return ); + exec( '/home/pi/loki-network/lokinet.sh start', $return ); location.reload(); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; From e63eb94e6267627626bf86e7944fd699180ee09b Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Mon, 18 Mar 2019 22:42:45 -0400 Subject: [PATCH 25/89] attempt sudo shell --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index 8f440c5..2001680 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,7 +599,7 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( '/home/pi/loki-network/lokinet.sh start', $return ); + exec( 'sudo /home/pi/loki-network/lokinet.sh start', $return ); location.reload(); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; From 42ab1dfbb09f631447b7beeb6e36ed3d730c3300 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Mon, 18 Mar 2019 22:44:48 -0400 Subject: [PATCH 26/89] remove return --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index 2001680..e38aaef 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,7 +599,7 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( 'sudo /home/pi/loki-network/lokinet.sh start', $return ); + exec( 'sudo /home/pi/loki-network/lokinet.sh start' ); location.reload(); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; From 6fa582a04d47a4af5537dd2d9cdbc2861c8ec59a Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Mon, 18 Mar 2019 23:30:24 -0400 Subject: [PATCH 27/89] start/stop systemctl --- includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index e38aaef..31f3010 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,11 +599,11 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( 'sudo /home/pi/loki-network/lokinet.sh start' ); + exec('sudo systemctl start lokinet'); location.reload(); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; - exec( 'sudo pkill lokinet', $return ); + exec('sudo systemctl stop lokinet'); location.reload(); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; From a741722c2758e145bab5a8dc3c20e644f696bc4b Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Tue, 19 Mar 2019 21:04:48 -0400 Subject: [PATCH 28/89] Double quotes --- includes/functions.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 31f3010..88055e9 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,19 +599,19 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec('sudo systemctl start lokinet'); + exec("sudo systemctl start lokinet"); location.reload(); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; - exec('sudo systemctl stop lokinet'); + exec("sudo systemctl stop lokinet"); location.reload(); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; - exec( '/home/pi/loki-network/lokinet -g start', $return ); + exec( "/home/pi/loki-network/lokinet -g start", $return ); location.reload(); } elseif( isset($_POST['ReGenerateLokinet']) ) { echo "Attempting to regenerate Lokinet"; - exec( '/home/pi/loki-network/lokinet -g start', $return ); + exec( "/home/pi/loki-network/lokinet -g start", $return ); location.reload(); } } From e5b39d1557bb217f5b97511bdb6e9ac5ef0fcec2 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Tue, 19 Mar 2019 21:07:29 -0400 Subject: [PATCH 29/89] run command --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index 88055e9..0767ab3 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,7 +599,7 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec("sudo systemctl start lokinet"); + exec("/home/pi/loki-network/lokinet"); location.reload(); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; From 340411c968ebaa142312d60cfadc881a5ab5361b Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Tue, 19 Mar 2019 21:49:08 -0400 Subject: [PATCH 30/89] sudo start --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index 0767ab3..8c905da 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,7 +599,7 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec("/home/pi/loki-network/lokinet"); + exec( 'sudo /home/pi/loki-network/lokinet' ); location.reload(); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; From 061700aaf11b6cc5694dcddbb8b37dddba289636 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Tue, 19 Mar 2019 22:03:34 -0400 Subject: [PATCH 31/89] system control --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index 8c905da..4234cf5 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,7 +599,7 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( 'sudo /home/pi/loki-network/lokinet' ); + exec( 'sudo systemctl start lokinet', $return ); location.reload(); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; From 947d6a96f4cfc65b5626dc7e47fbe1d93458ec99 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Tue, 19 Mar 2019 22:05:47 -0400 Subject: [PATCH 32/89] single quotes --- includes/functions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 4234cf5..e46e0e1 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -602,16 +602,16 @@ function SaveTORAndVPNConfig(){ exec( 'sudo systemctl start lokinet', $return ); location.reload(); } elseif( isset($_POST['StopLokinet']) ) { - echo "Attempting to stop Lokinet"; + echo 'Attempting to stop Lokinet', $return ; exec("sudo systemctl stop lokinet"); location.reload(); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; - exec( "/home/pi/loki-network/lokinet -g start", $return ); + exec( '/home/pi/loki-network/lokinet -g start', $return ); location.reload(); } elseif( isset($_POST['ReGenerateLokinet']) ) { echo "Attempting to regenerate Lokinet"; - exec( "/home/pi/loki-network/lokinet -g start", $return ); + exec( '/home/pi/loki-network/lokinet -g start', $return ); location.reload(); } } From f9410ecc82d0afc36f85ca4d3537bb45df15a82f Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Tue, 19 Mar 2019 22:18:25 -0400 Subject: [PATCH 33/89] run from directory --- includes/functions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index e46e0e1..64825e3 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,11 +599,11 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( 'sudo systemctl start lokinet', $return ); + exec( 'sudo /home/pi/loki-network/lokinet', $return ); location.reload(); } elseif( isset($_POST['StopLokinet']) ) { - echo 'Attempting to stop Lokinet', $return ; - exec("sudo systemctl stop lokinet"); + echo "Attempting to stop Lokinet"; + exec( 'sudo pkill lokinet', $return ); location.reload(); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; From 7528c70ad223a757b348b0bb880d94add70588d3 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Tue, 19 Mar 2019 23:09:44 -0400 Subject: [PATCH 34/89] comment out location.reload() --- includes/functions.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 64825e3..ff689bd 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -600,18 +600,18 @@ function SaveTORAndVPNConfig(){ } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; exec( 'sudo /home/pi/loki-network/lokinet', $return ); - location.reload(); +// location.reload(); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; exec( 'sudo pkill lokinet', $return ); - location.reload(); +// location.reload(); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; exec( '/home/pi/loki-network/lokinet -g start', $return ); - location.reload(); +// location.reload(); } elseif( isset($_POST['ReGenerateLokinet']) ) { echo "Attempting to regenerate Lokinet"; exec( '/home/pi/loki-network/lokinet -g start', $return ); - location.reload(); +// location.reload(); } } From 8a2f85bdfd6010a487a6d9acc36420d5b0f2feb5 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Tue, 19 Mar 2019 23:14:35 -0400 Subject: [PATCH 35/89] fix --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index ff689bd..f1079fd 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -612,6 +612,6 @@ function SaveTORAndVPNConfig(){ } elseif( isset($_POST['ReGenerateLokinet']) ) { echo "Attempting to regenerate Lokinet"; exec( '/home/pi/loki-network/lokinet -g start', $return ); -// location.reload(); +// //location.reload(); } } From cc9457b01e99a0ace5e9fd93bd412858f6fb03dc Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Tue, 19 Mar 2019 23:43:38 -0400 Subject: [PATCH 36/89] start with screen --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index f1079fd..f4acfbc 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,7 +599,7 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( 'sudo /home/pi/loki-network/lokinet', $return ); + exec( 'sudo screem -S lokinet /home/pi/loki-network/lokinet', $return ); // location.reload(); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; From b087940a6331eae2dc0c832b36eb31e4b8638ee2 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Tue, 19 Mar 2019 23:45:41 -0400 Subject: [PATCH 37/89] correct typo --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index f4acfbc..64cbaba 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,7 +599,7 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( 'sudo screem -S lokinet /home/pi/loki-network/lokinet', $return ); + exec( 'sudo screen -S lokinet /home/pi/loki-network/lokinet', $return ); // location.reload(); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; From 19c677121b9ed1d5916dfdf696913ebdaaaacf82 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 00:01:57 -0400 Subject: [PATCH 38/89] output --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index 64cbaba..3dc6130 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,7 +599,7 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( 'sudo screen -S lokinet /home/pi/loki-network/lokinet', $return ); + exec( 'sudo screen -S lokinet /home/pi/loki-network/lokinet', $output ); // location.reload(); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; From 1af7e9fadb44ccdc69c1ac31a24ef8494114c7d9 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 00:06:25 -0400 Subject: [PATCH 39/89] push output --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index 3dc6130..583cf7d 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,7 +599,7 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( 'sudo screen -S lokinet /home/pi/loki-network/lokinet', $output ); + exec( 'sudo /home/pi/loki-network/lokinet', $output ); // location.reload(); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; From ed7ed0b86f786d026794b1450efe45968f238fc0 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 00:11:39 -0400 Subject: [PATCH 40/89] > /dev/null & --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index 583cf7d..f160034 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,7 +599,7 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( 'sudo /home/pi/loki-network/lokinet', $output ); + exec( 'sudo /home/pi/loki-network/lokinet > /dev/null &' ); // location.reload(); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; From 9d33f21c0eb342d03094ac94ead0794bdf096f03 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 00:24:35 -0400 Subject: [PATCH 41/89] systmectl stop --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index f160034..65306bc 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -603,7 +603,7 @@ function SaveTORAndVPNConfig(){ // location.reload(); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; - exec( 'sudo pkill lokinet', $return ); + exec( 'sudo systemctl lokinet stop > /dev/null $' ); // location.reload(); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; From 6c06658212a0bd9c3977b069dd81d9ca31e4cf7f Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 00:28:54 -0400 Subject: [PATCH 42/89] location reload --- includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 65306bc..bd916ec 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -600,10 +600,10 @@ function SaveTORAndVPNConfig(){ } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; exec( 'sudo /home/pi/loki-network/lokinet > /dev/null &' ); -// location.reload(); + location.reload(); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; - exec( 'sudo systemctl lokinet stop > /dev/null $' ); + exec( 'sudo systemctl stop lokinet > /dev/null $' ); // location.reload(); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; From bf35b46c6c0ac6af8409584de01662a072fac043 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 00:33:11 -0400 Subject: [PATCH 43/89] Reload function --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index bd916ec..318584f 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -600,7 +600,7 @@ function SaveTORAndVPNConfig(){ } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; exec( 'sudo /home/pi/loki-network/lokinet > /dev/null &' ); - location.reload(); + DisplayLokinetConfig(); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; exec( 'sudo systemctl stop lokinet > /dev/null $' ); From 88068023ef6c6d3cb4fb38b00da116452585c958 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 00:40:24 -0400 Subject: [PATCH 44/89] refresh --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index 318584f..8961839 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -600,7 +600,7 @@ function SaveTORAndVPNConfig(){ } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; exec( 'sudo /home/pi/loki-network/lokinet > /dev/null &' ); - DisplayLokinetConfig(); + header("Refresh:0"); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; exec( 'sudo systemctl stop lokinet > /dev/null $' ); From 2c4e3ca7e2986bbb8d15f5786919f15016836a31 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 01:20:19 -0400 Subject: [PATCH 45/89] return --- includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 8961839..96a57c8 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,8 +599,8 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( 'sudo /home/pi/loki-network/lokinet > /dev/null &' ); - header("Refresh:0"); + exec( 'sudo /home/pi/loki-network/lokinet > /dev/null &', $return ); +// header("Refresh:0"); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; exec( 'sudo systemctl stop lokinet > /dev/null $' ); From c9c4cc29786cd1759d692d178b429e4d628fd8b8 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 01:25:49 -0400 Subject: [PATCH 46/89] kill -9 --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index 96a57c8..2b816aa 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -603,7 +603,7 @@ function SaveTORAndVPNConfig(){ // header("Refresh:0"); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; - exec( 'sudo systemctl stop lokinet > /dev/null $' ); + exec( 'kill -9 lokinet ); // location.reload(); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; From 6416568ed6f33216eb921fea2f20842227c5d126 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 01:26:36 -0400 Subject: [PATCH 47/89] cooma --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index 2b816aa..24e756a 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -603,7 +603,7 @@ function SaveTORAndVPNConfig(){ // header("Refresh:0"); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; - exec( 'kill -9 lokinet ); + exec( 'kill -9 lokinet' ); // location.reload(); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; From 34950c63eb7fecf66329621661ba97318623fb5b Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 01:27:35 -0400 Subject: [PATCH 48/89] sudo kill --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index 24e756a..2a31f66 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -603,7 +603,7 @@ function SaveTORAndVPNConfig(){ // header("Refresh:0"); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; - exec( 'kill -9 lokinet' ); + exec( 'sudo kill -9 lokinet' ); // location.reload(); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; From 3a998739ff5013f2098d0882c48cbb80f00c616a Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 11:15:44 -0400 Subject: [PATCH 49/89] systemctl thorough script --- includes/functions.php | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 2a31f66..88ba3fe 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,19 +599,37 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( 'sudo /home/pi/loki-network/lokinet > /dev/null &', $return ); -// header("Refresh:0"); + exec( 'sudo systemctl start lokinet' ); + + /* 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]; + } + } +*/ + } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; - exec( 'sudo kill -9 lokinet' ); + exec( 'sudo sytemclt stop lokinet' ); // location.reload(); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; - exec( '/home/pi/loki-network/lokinet -g start', $return ); + exec( 'sudo /home/pi/loki-network/lokinet -g > /dev/null &', $return ); // location.reload(); } elseif( isset($_POST['ReGenerateLokinet']) ) { echo "Attempting to regenerate Lokinet"; - exec( '/home/pi/loki-network/lokinet -g start', $return ); + exec( 'sudo /home/pi/loki-network/lokinet -g > /dev/null &', $return ); // //location.reload(); } } From 09ee07f402c35d41b47cd72240cf4278f97e3f89 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 11:33:40 -0400 Subject: [PATCH 50/89] start batch directly --- includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 88ba3fe..2dd9fcc 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,7 +599,7 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( 'sudo systemctl start lokinet' ); + exec( 'sudo lokicontrol.sh > /dev/null &' ); /* exec( 'pidof lokinet | wc -l', $lokinetstatus); @@ -621,7 +621,7 @@ function SaveTORAndVPNConfig(){ } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; - exec( 'sudo sytemclt stop lokinet' ); + exec( 'sudo systemctl stop lokinet' ); // location.reload(); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; From 3a6d3821149643636bbc44445ae6d8689136880e Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 11:35:11 -0400 Subject: [PATCH 51/89] add path --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index 2dd9fcc..21bc646 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,7 +599,7 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( 'sudo lokicontrol.sh > /dev/null &' ); + exec( 'sudo /home/pi/loki-network/lokicontrol.sh > /dev/null &' ); /* exec( 'pidof lokinet | wc -l', $lokinetstatus); From 1e9fc835b7c8d81b54b3167b520682858d896122 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 11:37:50 -0400 Subject: [PATCH 52/89] return status --- includes/functions.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 21bc646..858498d 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -601,7 +601,7 @@ function SaveTORAndVPNConfig(){ echo "Attempting to start Lokinet"; exec( 'sudo /home/pi/loki-network/lokicontrol.sh > /dev/null &' ); - /* exec( 'pidof lokinet | wc -l', $lokinetstatus); + exec( 'pidof lokinet | wc -l', $lokinetstatus); if( $lokinetstatus[0] == 0 ) { $status = '
Lokinet daemon is not running @@ -617,7 +617,6 @@ function SaveTORAndVPNConfig(){ $arrConfig[$arrLine[0]]=$arrLine[1]; } } -*/ } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; From 5eac4175476ce7538e0b9aada0024d49bfcc5267 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 12:30:36 -0400 Subject: [PATCH 53/89] bash start stop --- includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 858498d..cfd5c44 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,7 +599,7 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( 'sudo /home/pi/loki-network/lokicontrol.sh > /dev/null &' ); + exec( 'sudo /home/pi/loki-network/lokicontrol.sh start > /dev/null &' ); exec( 'pidof lokinet | wc -l', $lokinetstatus); @@ -620,7 +620,7 @@ function SaveTORAndVPNConfig(){ } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; - exec( 'sudo systemctl stop lokinet' ); + exec( 'sudo /home/pi/loki-network/lokicontrol.sh stop > /dev/null &' ); // location.reload(); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; From 96729552866b3a7a294145a8d7f78c092fcab2fa Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 12:34:34 -0400 Subject: [PATCH 54/89] ./ --- includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index cfd5c44..008111e 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,7 +599,7 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( 'sudo /home/pi/loki-network/lokicontrol.sh start > /dev/null &' ); + exec( 'sudo /home/pi/loki-network/./lokicontrol.sh start > /dev/null &' ); exec( 'pidof lokinet | wc -l', $lokinetstatus); @@ -620,7 +620,7 @@ function SaveTORAndVPNConfig(){ } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; - exec( 'sudo /home/pi/loki-network/lokicontrol.sh stop > /dev/null &' ); + exec( 'sudo /home/pi/loki-network/./lokicontrol.sh stop > /dev/null &' ); // location.reload(); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; From a200a98dbb1f8534df02746c4ba5132e862c1896 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 12:40:44 -0400 Subject: [PATCH 55/89] pass string --- includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 008111e..3ab2899 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,7 +599,7 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( 'sudo /home/pi/loki-network/./lokicontrol.sh start > /dev/null &' ); + exec( 'sudo /home/pi/loki-network/lokicontrol.sh "start" > /dev/null &' ); exec( 'pidof lokinet | wc -l', $lokinetstatus); @@ -620,7 +620,7 @@ function SaveTORAndVPNConfig(){ } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; - exec( 'sudo /home/pi/loki-network/./lokicontrol.sh stop > /dev/null &' ); + exec( 'sudo /home/pi/loki-network/lokicontrol.sh "stop" > /dev/null &' ); // location.reload(); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; From 0dae15e121a9f6482c44ddb5769441c462f23cca Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 12:47:57 -0400 Subject: [PATCH 56/89] pass string --- includes/functions.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 3ab2899..fd225cc 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,7 +599,8 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( 'sudo /home/pi/loki-network/lokicontrol.sh "start" > /dev/null &' ); + $Start="start"; + exec( 'sudo /home/pi/loki-network/lokicontrol.sh "$Start" > /dev/null &' ); exec( 'pidof lokinet | wc -l', $lokinetstatus); @@ -620,7 +621,8 @@ function SaveTORAndVPNConfig(){ } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; - exec( 'sudo /home/pi/loki-network/lokicontrol.sh "stop" > /dev/null &' ); + $Stop="stop"; + exec( 'sudo /home/pi/loki-network/lokicontrol.sh "$Stop" > /dev/null &' ); // location.reload(); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; From cf569ae347a435ec6e064cd28f091a7ab2484ecc Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 12:51:00 -0400 Subject: [PATCH 57/89] remove quotations --- includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index fd225cc..6f05e67 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -600,7 +600,7 @@ 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( 'sudo /home/pi/loki-network/lokicontrol.sh $Start > /dev/null &' ); exec( 'pidof lokinet | wc -l', $lokinetstatus); @@ -622,7 +622,7 @@ function SaveTORAndVPNConfig(){ } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; $Stop="stop"; - exec( 'sudo /home/pi/loki-network/lokicontrol.sh "$Stop" > /dev/null &' ); + exec( 'sudo /home/pi/loki-network/lokicontrol.sh $Stop > /dev/null &' ); // location.reload(); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; From ecefc77e6e46fc77fff797091b553f4aae85cabc Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 12:52:17 -0400 Subject: [PATCH 58/89] no quotes --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index 6f05e67..4fd624a 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -600,7 +600,7 @@ 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( 'sudo /home/pi/loki-network/lokicontrol.sh start > /dev/null &' ); exec( 'pidof lokinet | wc -l', $lokinetstatus); From 5a08845a1001d73c9311cd4e8c536ce48bfd5072 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 12:53:07 -0400 Subject: [PATCH 59/89] quotes --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index 4fd624a..10bd29d 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -600,7 +600,7 @@ 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( 'sudo /home/pi/loki-network/lokicontrol.sh "start" > /dev/null &' ); exec( 'pidof lokinet | wc -l', $lokinetstatus); From c621d9052c2e7ccb221d9b63ab3808a108beaa82 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 12:54:17 -0400 Subject: [PATCH 60/89] stop added --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index 10bd29d..716668a 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -622,7 +622,7 @@ function SaveTORAndVPNConfig(){ } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; $Stop="stop"; - exec( 'sudo /home/pi/loki-network/lokicontrol.sh $Stop > /dev/null &' ); + exec( 'sudo /home/pi/loki-network/lokicontrol.sh "stop" > /dev/null &' ); // location.reload(); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; From 83eb63542b2d0415523d75491e93e12f2cbc7701 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 13:08:48 -0400 Subject: [PATCH 61/89] 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"; From 848a326bbb6231496035cb5d9c9fe411cef3956b Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 13:10:53 -0400 Subject: [PATCH 62/89] non sudo script --- includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index fd07b00..a565dd8 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -600,14 +600,14 @@ function SaveTORAndVPNConfig(){ } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; $Start="start"; - exec( 'sudo /home/pi/loki-network/lokicontrol.sh "start" > /dev/null &', $return ); + exec( '/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"; - exec( 'sudo /home/pi/loki-network/lokicontrol.sh "stop" > /dev/null &' ); + exec( '/home/pi/loki-network/lokicontrol.sh "stop" > /dev/null &' ); // location.reload(); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; From 5b9bec51ff62e237bda4982c06a3a3515d3491ea Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 13:13:43 -0400 Subject: [PATCH 63/89] run as sudo --- includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index a565dd8..fd07b00 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -600,14 +600,14 @@ function SaveTORAndVPNConfig(){ } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; $Start="start"; - exec( '/home/pi/loki-network/lokicontrol.sh "start" > /dev/null &', $return ); + 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"; - exec( '/home/pi/loki-network/lokicontrol.sh "stop" > /dev/null &' ); + exec( 'sudo /home/pi/loki-network/lokicontrol.sh "stop" > /dev/null &' ); // location.reload(); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; From 12f9b251b72c5f999864a752138aaabac688e1bb Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 13:31:03 -0400 Subject: [PATCH 64/89] really stop --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index fd07b00..f3fcadf 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -607,7 +607,7 @@ function SaveTORAndVPNConfig(){ } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; $Stop="stop"; - exec( 'sudo /home/pi/loki-network/lokicontrol.sh "stop" > /dev/null &' ); + exec( 'sudo /home/pi/loki-network/./lokicontrol.sh "stop" > /dev/null &' ); // location.reload(); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; From e42ac7885517221ba5b1226a5daba129a7a7f15b Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 14:10:05 -0400 Subject: [PATCH 65/89] by script --- includes/functions.php | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index f3fcadf..cbf8a59 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,23 +599,15 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - $Start="start"; - exec( 'sudo /home/pi/loki-network/lokicontrol.sh "start" > /dev/null &', $return ); - foreach( $return as $line ) { - echo htmlspecialchars($line, ENT_QUOTES).'
' , PHP_EOL; - } + exec( 'sudo /home/pi/loki-network/lokicontrol.sh start' ); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; - $Stop="stop"; - exec( 'sudo /home/pi/loki-network/./lokicontrol.sh "stop" > /dev/null &' ); -// location.reload(); + exec( 'sudo /home/pi/loki-network/lokicontrol.sh stop' ); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; exec( 'sudo /home/pi/loki-network/lokinet -g > /dev/null &', $return ); -// location.reload(); } elseif( isset($_POST['ReGenerateLokinet']) ) { echo "Attempting to regenerate Lokinet"; exec( 'sudo /home/pi/loki-network/lokinet -g > /dev/null &', $return ); -// //location.reload(); - } } +} From 1171b28ed4af1c60135f4cb3e4c885550d43df77 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 14:17:15 -0400 Subject: [PATCH 66/89] add quotes to arguments --- includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index cbf8a59..76adbca 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,10 +599,10 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( 'sudo /home/pi/loki-network/lokicontrol.sh start' ); + exec( 'sudo /home/pi/loki-network/lokicontrol.sh "start"' ); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; - exec( 'sudo /home/pi/loki-network/lokicontrol.sh stop' ); + exec( 'sudo /home/pi/loki-network/lokicontrol.sh "stop"' ); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; exec( 'sudo /home/pi/loki-network/lokinet -g > /dev/null &', $return ); From b11b6d3455acf3bde01445494dbcf80b76b61d06 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 14:23:40 -0400 Subject: [PATCH 67/89] shell --- includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 76adbca..9be59fe 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,10 +599,10 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( 'sudo /home/pi/loki-network/lokicontrol.sh "start"' ); + exec( 'sudo ./home/pi/loki-network/lokicontrol.sh "start"' ); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; - exec( 'sudo /home/pi/loki-network/lokicontrol.sh "stop"' ); + exec( 'sudo ./home/pi/loki-network/lokicontrol.sh "stop"' ); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; exec( 'sudo /home/pi/loki-network/lokinet -g > /dev/null &', $return ); From d60b963b766972b52318202c87531f4202732abe Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 14:25:11 -0400 Subject: [PATCH 68/89] full shell --- includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 9be59fe..1dd59ef 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,10 +599,10 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( 'sudo ./home/pi/loki-network/lokicontrol.sh "start"' ); + exec( 'sudo ./home/pi/loki-network/lokicontrol.sh start' ); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; - exec( 'sudo ./home/pi/loki-network/lokicontrol.sh "stop"' ); + exec( 'sudo ./home/pi/loki-network/lokicontrol.sh stop' ); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; exec( 'sudo /home/pi/loki-network/lokinet -g > /dev/null &', $return ); From 0c9e08e42ea79ba15e1ab005c11fe50b2c4ea7c8 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 14:31:57 -0400 Subject: [PATCH 69/89] shell --- includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 1dd59ef..ce60a9b 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,10 +599,10 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( 'sudo ./home/pi/loki-network/lokicontrol.sh start' ); + shell_exec( 'sudo ./home/pi/loki-network/lokicontrol.sh start' ); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; - exec( 'sudo ./home/pi/loki-network/lokicontrol.sh stop' ); + shell_exec( 'sudo ./home/pi/loki-network/lokicontrol.sh stop' ); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; exec( 'sudo /home/pi/loki-network/lokinet -g > /dev/null &', $return ); From 49e29c2554d4b0fbc560389921029e9a9d9c6b66 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 14:32:55 -0400 Subject: [PATCH 70/89] outside shell --- includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index ce60a9b..825bded 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,10 +599,10 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - shell_exec( 'sudo ./home/pi/loki-network/lokicontrol.sh start' ); + shell_exec( 'sudo /home/pi/loki-network/lokicontrol.sh start' ); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; - shell_exec( 'sudo ./home/pi/loki-network/lokicontrol.sh stop' ); + shell_exec( 'sudo /home/pi/loki-network/lokicontrol.sh stop' ); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; exec( 'sudo /home/pi/loki-network/lokinet -g > /dev/null &', $return ); From aa3607a14f88b8e54daf0706d6218fa7bfaa2f80 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 14:35:25 -0400 Subject: [PATCH 71/89] quotes --- includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 825bded..76adbca 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,10 +599,10 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - shell_exec( 'sudo /home/pi/loki-network/lokicontrol.sh start' ); + exec( 'sudo /home/pi/loki-network/lokicontrol.sh "start"' ); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; - shell_exec( 'sudo /home/pi/loki-network/lokicontrol.sh stop' ); + exec( 'sudo /home/pi/loki-network/lokicontrol.sh "stop"' ); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; exec( 'sudo /home/pi/loki-network/lokinet -g > /dev/null &', $return ); From 4c89c674d3a5ae9ad1fa849197b8b83d2fbd81a3 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 14:40:20 -0400 Subject: [PATCH 72/89] quotes removed --- includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 76adbca..cbf8a59 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,10 +599,10 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( 'sudo /home/pi/loki-network/lokicontrol.sh "start"' ); + exec( 'sudo /home/pi/loki-network/lokicontrol.sh start' ); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; - exec( 'sudo /home/pi/loki-network/lokicontrol.sh "stop"' ); + exec( 'sudo /home/pi/loki-network/lokicontrol.sh stop' ); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; exec( 'sudo /home/pi/loki-network/lokinet -g > /dev/null &', $return ); From ab5074a40d3e07a7e82f241087df950cdb76762a Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 14:44:18 -0400 Subject: [PATCH 73/89] throw output to trash --- includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index cbf8a59..92f02e0 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,10 +599,10 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( 'sudo /home/pi/loki-network/lokicontrol.sh start' ); + exec( 'sudo /home/pi/loki-network/lokicontrol.sh "start" > /dev/null &', $return ); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; - exec( 'sudo /home/pi/loki-network/lokicontrol.sh stop' ); + exec( 'sudo /home/pi/loki-network/lokicontrol.sh "stop" > /dev/null &', $return ); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; exec( 'sudo /home/pi/loki-network/lokinet -g > /dev/null &', $return ); From ed2b487cf21c2565db032f19d235ef0371fb6af4 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 14:53:55 -0400 Subject: [PATCH 74/89] add sbutdown --- includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 92f02e0..d9238f8 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,10 +599,10 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( 'sudo /home/pi/loki-network/lokicontrol.sh "start" > /dev/null &', $return ); + exec( 'sudo /home/pi/loki-network/lokicontrol.sh > /dev/null &', $return ); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; - exec( 'sudo /home/pi/loki-network/lokicontrol.sh "stop" > /dev/null &', $return ); + exec( 'sudo /home/pi/loki-network/lokishutdown.sh > /dev/null &', $return ); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; exec( 'sudo /home/pi/loki-network/lokinet -g > /dev/null &', $return ); From cce818801ba0bc2dfafa3b43f02c58ba72f25bae Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 15:13:06 -0400 Subject: [PATCH 75/89] remove else --- includes/functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index d9238f8..c15b50e 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -600,7 +600,8 @@ function SaveTORAndVPNConfig(){ } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; exec( 'sudo /home/pi/loki-network/lokicontrol.sh > /dev/null &', $return ); - } elseif( isset($_POST['StopLokinet']) ) { + + if( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; exec( 'sudo /home/pi/loki-network/lokishutdown.sh > /dev/null &', $return ); } elseif( isset($_POST['GenerateLokinet']) ) { From 875a13f3f6104163dd260c53613d46922cd11a67 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 15:17:50 -0400 Subject: [PATCH 76/89] correction --- includes/functions.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index c15b50e..432c853 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -380,7 +380,7 @@ function DisplayLokinetConfig(){ if( $lokinetstatus[0] == 0 ) { echo '' , PHP_EOL; } else { - echo '' , PHP_EOL; + echo '' , PHP_EOL; }; $filename = '/home/pi/.lokinet/lokinet.ini'; if (!file_exists($filename)) { @@ -600,8 +600,7 @@ function SaveTORAndVPNConfig(){ } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; exec( 'sudo /home/pi/loki-network/lokicontrol.sh > /dev/null &', $return ); - - if( isset($_POST['StopLokinet']) ) { + } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; exec( 'sudo /home/pi/loki-network/lokishutdown.sh > /dev/null &', $return ); } elseif( isset($_POST['GenerateLokinet']) ) { From cc9b4d3c141a5269db3a7d5519e2b99ba8ea161e Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 15:45:55 -0400 Subject: [PATCH 77/89] launch --- includes/functions.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 432c853..c653920 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,15 +599,15 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( 'sudo /home/pi/loki-network/lokicontrol.sh > /dev/null &', $return ); + exec( 'sudo /home/pi/loki-network/lokilaunch.sh start > /dev/null &', $return ); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; - exec( 'sudo /home/pi/loki-network/lokishutdown.sh > /dev/null &', $return ); + exec( 'sudo /home/pi/loki-network/lokilaunch.sh stop > /dev/null &', $return ); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; - exec( 'sudo /home/pi/loki-network/lokinet -g > /dev/null &', $return ); + exec( 'sudo /home/pi/loki-network/lokilaunch -g > /dev/null &', $return ); } elseif( isset($_POST['ReGenerateLokinet']) ) { echo "Attempting to regenerate Lokinet"; - exec( 'sudo /home/pi/loki-network/lokinet -g > /dev/null &', $return ); + exec( 'sudo /home/pi/loki-network/lokilaunch -g > /dev/null &', $return ); } } From 541d69247f79cd02a9c22eadaa2c216fb5c7d435 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Wed, 20 Mar 2019 15:48:01 -0400 Subject: [PATCH 78/89] quotes --- includes/functions.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index c653920..a56a87a 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,15 +599,15 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { echo "Attempting to start Lokinet"; - exec( 'sudo /home/pi/loki-network/lokilaunch.sh start > /dev/null &', $return ); + exec( 'sudo /home/pi/loki-network/lokilaunch.sh "start" > /dev/null &', $return ); } elseif( isset($_POST['StopLokinet']) ) { echo "Attempting to stop Lokinet"; - exec( 'sudo /home/pi/loki-network/lokilaunch.sh stop > /dev/null &', $return ); + exec( 'sudo /home/pi/loki-network/lokilaunch.sh "stop" > /dev/null &', $return ); } elseif( isset($_POST['GenerateLokinet']) ) { echo "Attempting to generate Lokinet"; - exec( 'sudo /home/pi/loki-network/lokilaunch -g > /dev/null &', $return ); + exec( 'sudo /home/pi/loki-network/lokilaunch "-g" > /dev/null &', $return ); } elseif( isset($_POST['ReGenerateLokinet']) ) { echo "Attempting to regenerate Lokinet"; - exec( 'sudo /home/pi/loki-network/lokilaunch -g > /dev/null &', $return ); + exec( 'sudo /home/pi/loki-network/lokilaunch "-g" > /dev/null &', $return ); } } From 19952d81fb5e8a3ff86076f7bd44d1b9fbe57cce Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Thu, 21 Mar 2019 00:55:32 -0400 Subject: [PATCH 79/89] -g to gen --- includes/functions.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index a56a87a..7164522 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -598,16 +598,16 @@ function SaveTORAndVPNConfig(){ echo htmlspecialchars($line, ENT_QUOTES).'
' , PHP_EOL; } } elseif( isset($_POST['StartLokinet']) ) { - echo "Attempting to start Lokinet"; + //echo "Attempting to start Lokinet"; exec( 'sudo /home/pi/loki-network/lokilaunch.sh "start" > /dev/null &', $return ); } elseif( isset($_POST['StopLokinet']) ) { - echo "Attempting to stop Lokinet"; + //echo "Attempting to stop Lokinet"; exec( 'sudo /home/pi/loki-network/lokilaunch.sh "stop" > /dev/null &', $return ); } elseif( isset($_POST['GenerateLokinet']) ) { - echo "Attempting to generate Lokinet"; - exec( 'sudo /home/pi/loki-network/lokilaunch "-g" > /dev/null &', $return ); + //echo "Attempting to generate Lokinet"; + exec( 'sudo /home/pi/loki-network/lokilaunch "gen" > /dev/null &', $return ); } elseif( isset($_POST['ReGenerateLokinet']) ) { - echo "Attempting to regenerate Lokinet"; - exec( 'sudo /home/pi/loki-network/lokilaunch "-g" > /dev/null &', $return ); + // echo "Attempting to regenerate Lokinet"; + exec( 'sudo /home/pi/loki-network/lokilaunch "gen" > /dev/null &', $return ); } } From a1ddf7031927a1e0023f3f60ec80fb9864fbd142 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Thu, 21 Mar 2019 01:06:42 -0400 Subject: [PATCH 80/89] make .sh --- includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 7164522..6973d27 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -605,9 +605,9 @@ function SaveTORAndVPNConfig(){ exec( 'sudo /home/pi/loki-network/lokilaunch.sh "stop" > /dev/null &', $return ); } elseif( isset($_POST['GenerateLokinet']) ) { //echo "Attempting to generate Lokinet"; - exec( 'sudo /home/pi/loki-network/lokilaunch "gen" > /dev/null &', $return ); + exec( 'sudo /home/pi/loki-network/lokilaunch.sh "gen" > /dev/null &', $return ); } elseif( isset($_POST['ReGenerateLokinet']) ) { // echo "Attempting to regenerate Lokinet"; - exec( 'sudo /home/pi/loki-network/lokilaunch "gen" > /dev/null &', $return ); + exec( 'sudo /home/pi/loki-network/lokilaunch.sh "gen" > /dev/null &', $return ); } } From ad15e7ae28d4e861e12e9166986d6ce14b653a8b Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Thu, 21 Mar 2019 01:24:38 -0400 Subject: [PATCH 81/89] rooot/.lokinet/lokinet.ini --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index 6973d27..817068a 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -382,7 +382,7 @@ function DisplayLokinetConfig(){ } else { echo '' , PHP_EOL; }; - $filename = '/home/pi/.lokinet/lokinet.ini'; + $filename = '/root/.lokinet/lokinet.ini'; if (!file_exists($filename)) { echo '' , PHP_EOL; } else { From 15fd093a5efa63f22c735c3492e3b2e281388027 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Thu, 21 Mar 2019 01:31:59 -0400 Subject: [PATCH 82/89] attempt start without sudo --- includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 817068a..d9498da 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -382,7 +382,7 @@ function DisplayLokinetConfig(){ } else { echo '' , PHP_EOL; }; - $filename = '/root/.lokinet/lokinet.ini'; + $filename = '/home/pi/.lokinet/lokinet.ini'; if (!file_exists($filename)) { echo '' , PHP_EOL; } else { @@ -599,7 +599,7 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { //echo "Attempting to start Lokinet"; - exec( 'sudo /home/pi/loki-network/lokilaunch.sh "start" > /dev/null &', $return ); + exec( '/home/pi/loki-network/lokilaunch.sh "start" > /dev/null &', $return ); } elseif( isset($_POST['StopLokinet']) ) { //echo "Attempting to stop Lokinet"; exec( 'sudo /home/pi/loki-network/lokilaunch.sh "stop" > /dev/null &', $return ); From 64ff83e56e22f2d3466a9752c83886a94f203ca6 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Thu, 21 Mar 2019 01:33:42 -0400 Subject: [PATCH 83/89] sudo added back. Did not run without --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index d9498da..6973d27 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -599,7 +599,7 @@ function SaveTORAndVPNConfig(){ } } elseif( isset($_POST['StartLokinet']) ) { //echo "Attempting to start Lokinet"; - exec( '/home/pi/loki-network/lokilaunch.sh "start" > /dev/null &', $return ); + exec( 'sudo /home/pi/loki-network/lokilaunch.sh "start" > /dev/null &', $return ); } elseif( isset($_POST['StopLokinet']) ) { //echo "Attempting to stop Lokinet"; exec( 'sudo /home/pi/loki-network/lokilaunch.sh "stop" > /dev/null &', $return ); From bcc61ef72e777bf0b198b10c915fc18f904faaaf Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Thu, 21 Mar 2019 01:38:43 -0400 Subject: [PATCH 84/89] refersh page --- includes/functions.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/functions.php b/includes/functions.php index 6973d27..4caeafa 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -610,4 +610,6 @@ function SaveTORAndVPNConfig(){ // echo "Attempting to regenerate Lokinet"; exec( 'sudo /home/pi/loki-network/lokilaunch.sh "gen" > /dev/null &', $return ); } + DisplayLokinetConfig(); + break; } From 5435a11dfcce60aa155888185c59faeed6718b64 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Thu, 21 Mar 2019 01:40:49 -0400 Subject: [PATCH 85/89] refresh below function --- includes/functions.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/functions.php b/includes/functions.php index 4caeafa..6303cee 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -600,6 +600,8 @@ function SaveTORAndVPNConfig(){ } elseif( isset($_POST['StartLokinet']) ) { //echo "Attempting to start Lokinet"; exec( 'sudo /home/pi/loki-network/lokilaunch.sh "start" > /dev/null &', $return ); + DisplayLokinetConfig(); + break; } elseif( isset($_POST['StopLokinet']) ) { //echo "Attempting to stop Lokinet"; exec( 'sudo /home/pi/loki-network/lokilaunch.sh "stop" > /dev/null &', $return ); From 70bccd63caf556f7fed84392b7195d45a6399743 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Thu, 21 Mar 2019 01:42:21 -0400 Subject: [PATCH 86/89] single refresh --- includes/functions.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 6303cee..4caeafa 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -600,8 +600,6 @@ function SaveTORAndVPNConfig(){ } elseif( isset($_POST['StartLokinet']) ) { //echo "Attempting to start Lokinet"; exec( 'sudo /home/pi/loki-network/lokilaunch.sh "start" > /dev/null &', $return ); - DisplayLokinetConfig(); - break; } elseif( isset($_POST['StopLokinet']) ) { //echo "Attempting to stop Lokinet"; exec( 'sudo /home/pi/loki-network/lokilaunch.sh "stop" > /dev/null &', $return ); From db69730c5358dd392da17bc40544cfd142a41493 Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Thu, 21 Mar 2019 01:43:08 -0400 Subject: [PATCH 87/89] patch broken code --- includes/functions.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 4caeafa..6973d27 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -610,6 +610,4 @@ function SaveTORAndVPNConfig(){ // echo "Attempting to regenerate Lokinet"; exec( 'sudo /home/pi/loki-network/lokilaunch.sh "gen" > /dev/null &', $return ); } - DisplayLokinetConfig(); - break; } From 472131745222bdccd2bd0d4a12b49fd57e65387f Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Thu, 21 Mar 2019 01:52:37 -0400 Subject: [PATCH 88/89] return to php --- includes/functions.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/functions.php b/includes/functions.php index 6973d27..1d0d710 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -611,3 +611,4 @@ function SaveTORAndVPNConfig(){ exec( 'sudo /home/pi/loki-network/lokilaunch.sh "gen" > /dev/null &', $return ); } } +?> From f00fe0d768e2d060e0ed445420425375e4d42f6b Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Thu, 21 Mar 2019 01:56:10 -0400 Subject: [PATCH 89/89] last else refresh with function --- includes/functions.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/functions.php b/includes/functions.php index 1d0d710..a466b9b 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -609,6 +609,8 @@ function SaveTORAndVPNConfig(){ } elseif( isset($_POST['ReGenerateLokinet']) ) { // echo "Attempting to regenerate Lokinet"; exec( 'sudo /home/pi/loki-network/lokilaunch.sh "gen" > /dev/null &', $return ); + } else { + DisplayLokinetConfig(); } } ?>