failover shell script