5
0
mirror of git://git.proxmox.com/git/pve-zsync.git synced 2025-03-10 16:58:41 +03:00

avoid odd post-if style for die

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2021-05-04 12:13:34 +02:00
parent d4775ec3e9
commit ee8772ead8

View File

@ -438,10 +438,10 @@ sub update_cron {
my $new_fh = IO::File->new("> ${CRONJOBS}.new");
die "Could not open file ${CRONJOBS}.new: $!\n" if !$new_fh;
die "can't write to $CRONJOBS.new\n" if !print($new_fh $text);
print $new_fh $text or die "can't write to $CRONJOBS.new: $!\n";
close ($new_fh);
die "can't move $CRONJOBS.new: $!\n" if !rename "${CRONJOBS}.new", $CRONJOBS;
rename "${CRONJOBS}.new", $CRONJOBS or die "can't move $CRONJOBS.new: $!\n";
}
sub format_job {