I have managed to figure out how we can restart the grrrit-wm.
if( text.indexOf('!grrrit-wm-restart') !== -1 && whitelist.indexOf(from) >= 0 || text.indexOf('grrrit-wm: restart') !== -1 && whitelist.indexOf(from) >= 0 ) { console.log(from + ' => ' + to + ' ' + text); logging.info('Connecting to gerrit..'); ircClient.say(to, "re-connecting to gerrit"); conns.end(); logging.info('reconnected to gerrit'); ircClient.say(to, "reconnected to gerrit"); } if(text.indexOf('!grrrit-wm-force-restart') !== -1 && whitelist.indexOf(from) >= 0 || text.indexOf('grrrit-wm: force-restart') !== -1 && whitelist.indexOf(from) >= 0 ) { console.log(from + ' => ' + to + ' ' + text); logging.info('Connecting to gerrit..'); ircClient.say(to, "re-connecting to gerrit"); conns.end(); startRelay(); logging.info('reconnected to gerrit'); ircClient.say(to, "reconnected to gerrit");
^^ that's a test message and will be updated once we finished testing.
For this to happen, production gerrit will need to send logmsgbot a message that grrrit-wm will get to restart.