2014-03-19 46 views
1

如果發生災難性事件,我試圖讓服務器重新啓動服務器,這是爲了處理一些與docker相關的非常實驗性的事情。理想我想能夠做到監控:健康檢查失敗時重新啓動服務器

then exec "reboot now" 

then exec "/var/reboot_now_script" 

,但他們無法正常工作。是否有可能用monit重啓服務器?

回答

2

是的,我們使用這個格式,它爲我們工作:

then exec "/sbin/shutdown -r now"