mirror of
https://github.com/opnsense/plugins.git
synced 2026-02-03 20:40:37 -05:00
dns/rfc2136: mwexecf_bg, exec_safe and file_safe
PR: https://github.com/opnsense/core/issues/9325
This commit is contained in:
parent
ad06910687
commit
d2940eb8af
1 changed files with 7 additions and 8 deletions
|
|
@ -198,16 +198,15 @@ function rfc2136_configure_do($verbose = false, $int = null, $updatehost = '', $
|
|||
$upinst .= "\n"; /* mind that trailing newline! */
|
||||
|
||||
if ($need_update) {
|
||||
@file_put_contents("/var/etc/nsupdatecmds{$i}", $upinst);
|
||||
unset($upinst);
|
||||
/* invoke nsupdate */
|
||||
$cmd = "/usr/local/bin/nsupdate -k {$keyfile}";
|
||||
$cmds = "/var/etc/nsupdatecmds{$i}";
|
||||
file_safe($cmds, $upinst);
|
||||
$args = [];
|
||||
$args[] = exec_safe('-k %s', $keyfile);
|
||||
if (isset($dnsupdate['usetcp'])) {
|
||||
$cmd .= " -v";
|
||||
$args[] = '-v';
|
||||
}
|
||||
$cmd .= " /var/etc/nsupdatecmds{$i}";
|
||||
mwexec_bg($cmd);
|
||||
unset($cmd);
|
||||
$args[] = exec_safe('%s', $cmds);
|
||||
mwexecf_bg('/usr/local/bin/nsupdate ' . join(' ', $args));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue