Restart CLI when required.