Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'ncp-web/ncp-launcher.php')
-rw-r--r--ncp-web/ncp-launcher.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/ncp-web/ncp-launcher.php b/ncp-web/ncp-launcher.php
index 032b01ef..efb24761 100644
--- a/ncp-web/ncp-launcher.php
+++ b/ncp-web/ncp-launcher.php
@@ -11,6 +11,7 @@
include ('csrf.php');
session_start();
+ignore_user_abort( true );
if ( $_POST['action'] == "cfgreq" )
{
@@ -97,9 +98,11 @@ else if ( $_POST['action'] == "launch" && $_POST['config'] )
// Get new token
echo '{ "token": "' . getCSRFToken() . '",';
- echo ' "output": ';
+ echo ' "output": "" , ';
+ echo ' "ret": ';
- echo json_encode( shell_exec( 'bash -c "sudo /home/www/ncp-launcher.sh ' . $file . '"' ) ) . ' }';
+ exec( 'bash -c "sudo /home/www/ncp-launcher.sh ' . $file . '"' , $output , $ret );
+ echo '"' . $ret . '" }';
}
else if ( $_POST['action'] == "poweroff" )