ping method for comet, and restart method for bash