跟資策會、國網開會的時候
資策會有提到一個很黑的程式 “Daemontools” 可以保證服務一直持續進行
當發現服務掛掉了,會自動重新啟動一個新的服務起來
上網酷狗了一下,找到了資策會用的 supervise
原本以為宜大會是第一個要跟supervise對決的學校 ( 結果後來因為種種因素重灌比較快 )
所以都還沒有直接接觸到
把找到的資訊先輩分一下以便以後使用
參考網址: http://untroubled.org/supervise-scripts/
以下是主要可能會用到的部分
Create a new service directory somewhere other than under /service. Set
up a “run” script, and a “log” directory with its own “run” script if
appropriate.
Use “svc-add” to add the new service into /service for the first time.
Add the “-d” option if you don’t want it to run right away (this is the
equivalent of doing “chkconfig –add” on SysVinit systems).
Use “svc-start” to start the service the first time. If you reboot, it
will be automatically restarted without any need for intervention.
Use “svc-stop” if you need to stop the service (for maintenance). If
you reboot after doing this, the service will not be restarted.
Use “svc-remove” before uninstalling the software.
🙂 學長越來越威了
並沒有啊….