mirror of
https://github.com/unraid/webgui.git
synced 2026-05-20 05:09:38 -05:00
Simplify start command
This commit is contained in:
@@ -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':
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
nohup $* 1>/dev/null 2>&1 &
|
||||
echo $!
|
||||
Reference in New Issue
Block a user