script to promote a passive master and repoint all slaves