openvpn: proper daemonize instead of background job #3223

This commit is contained in:
Franco Fichtner 2019-02-14 18:37:36 +01:00
parent f10b710a58
commit c217bee6f2

View File

@ -1008,7 +1008,7 @@ function openvpn_restart($mode, $settings)
/* start the new process */
$fpath = "/var/etc/openvpn/{$mode_id}.conf";
openvpn_clear_route($mode, $settings);
mwexec_bg("/usr/local/sbin/openvpn --config " . escapeshellarg($fpath));
mwexecf('/usr/local/sbin/openvpn --config %s --daemon', $fpath);
if (!file_exists("/var/run/booting")) {
configd_run("filter reload");