better close the file handle too

This commit is contained in:
Mikael Nordin 2017-01-17 10:42:16 +01:00 committed by GitHub
parent 474937e74c
commit ed7c7159ae

View file

@ -224,6 +224,7 @@ sub run {
$is_empty = 0;
}
}
close $fh;
unless($is_empty) {
print "There has been a failover, switching to active cronfile\n";
copy($activesharedcronfile, $cronfile);