Simplify start command

This commit is contained in:
bergware
2022-08-13 10:28:36 +02:00
parent 8e5b70e68b
commit fca75c7296
3 changed files with 2 additions and 5 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ case 'delete':
case 'diag':
if (!validpath($file)) break;
$anon = empty($_POST['anonymize']) ? '' : escapeshellarg($_POST['anonymize']);
exec("$docroot/webGui/scripts/start_command diagnostics $anon ".escapeshellarg("$docroot/$file"));
exec("nohup diagnostics $anon ".escapeshellarg("$docroot/$file")." 1>/dev/null 2>&1");
echo "/$file";
break;
case 'unlink':
+1 -1
View File
@@ -39,7 +39,7 @@ if ($command && strncmp($name,$path,strlen($path))===0) {
$pid = pgrep($name);
} elseif ($start or !pgrep($name)) {
// start command in background and return pid
$pid = exec("$docroot/webGui/scripts/start_command $name $args");
$pid = exec("nohup $name $args 1>/dev/null 2>&1 & echo \$!");
}
}
echo $pid;
-3
View File
@@ -1,3 +0,0 @@
#!/bin/bash
nohup $* 1>/dev/null 2>&1 &
echo $!