Commit 3ace0410 authored by Franco Fichtner's avatar Franco Fichtner

firmware: this seems to work pretty well

daemon(8) will completely detach and keep running so maybe that
will be one step closer to reliable firmware upgrades.
parent f9a49ad2
...@@ -54,7 +54,7 @@ if (file_exists($file_pkg_status)) { ...@@ -54,7 +54,7 @@ if (file_exists($file_pkg_status)) {
if($_POST['action'] == 'pkg_upgrade') { if($_POST['action'] == 'pkg_upgrade') {
// execute shell command and collect (only valid) info into named array // execute shell command and collect (only valid) info into named array
$cmd = '/usr/bin/nohup /usr/local/opnsense/scripts/pkg_upgrade.sh ' . $package . ' > /dev/null 2> /dev/null < /dev/null &'; $cmd = '/usr/sbin/daemon -f /usr/local/opnsense/scripts/pkg_upgrade.sh ' . escapeshellarg($package);
$shell->exec($cmd, false, false, $shell_output); $shell->exec($cmd, false, false, $shell_output);
exit; exit;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment