Use standard functions

This commit is contained in:
Jamie Cameron
2022-06-27 22:44:40 -07:00
parent 1095ef4308
commit 6e8351b0ed

View File

@@ -1516,7 +1516,7 @@ sub before_save
{
if ($config{'check_config'} && !defined($save_file)) {
$save_file = &transname();
&execute_command("cp $config{'postfix_config_file'} $save_file");
&copy_source_dest($config{'postfix_config_file'}, $save_file);
}
}
@@ -1525,11 +1525,12 @@ sub after_save
if (defined($save_file)) {
local $err = &check_postfix();
if ($err) {
&execute_command("mv $save_file $config{'postfix_config_file'}");
&copy_source_dest($save_file, $config{'postfix_config_file'});
&unlink_file($save_file);
&error(&text('after_err', "<pre>$err</pre>"));
}
else {
unlink($save_file);
&unlink_file($save_file);
$save_file = undef;
}
}