I have two servers I want Forever to monitor. If one restarts, I need to restart the other.
serverOne.on('restart', function(){
serverTwo.restart();
});
Nothing I have tried seems to work, even though reading the code implies it should. I have also tried:
serverTwo.restart();
serverTwo.kill(false);
serverTwo.kill(true);
serverTwo.stop();
amongst others.
I understand I might need to make serverTwo do something when it loses it's connection to serverOne, but since someone else is developing those at the moment I'm looking for a way to make this work for the time being.
I believe I have done it with this line:
serverTwo.child.kill();
though whether that's the best practice I don't know...