diff --git a/cluster_cron.pl b/cluster_cron.pl index f17d7ea..3c7d132 100755 --- a/cluster_cron.pl +++ b/cluster_cron.pl @@ -213,6 +213,10 @@ sub run { # If we have an active shared cronfile, we should also have an old shared # See if I am the one if (is_active(get_nodes) ){ + if(compare($cronfile, $passivesharedcronfile)) == 0) { + print "There has been a failover, switching to active cronfile\n"; + copy($activesharedcronfile, $cronfile); + } my $tempfile = tmpnam(); my $compare = cron_compare($cronfile, $activesharedcronfile, $oldactivesharedcronfile ); # The other node has changed the file