Re: [問題] 如何讓shellscript重開機後繼續執行

看板Linux作者 (兩斤阿吉)時間9年前 (2015/01/26 21:53), 編輯推噓0(003)
留言3則, 2人參與, 最新討論串2/2 (看更多)
※ 引述《yavis (yavis)》之銘言: : 如標題所示,小弟寫了一個shell script, : 過程中需要reboot機器, : 想請問有什麼方法能讓機器重啟後, : 繼續執行shellscript尚未執行的部分, : 還請版上前輩多多指教, 謝謝 今天無意間閒晃到一個介紹 CRIU (Checkpoint/Restore In Userspace) 好像可以達到原PO的需求 http://www.criu.org/Main_Page http://en.wikipedia.org/wiki/CRIU You can freeze a running application (or part of it) and checkpoint it to a hard drive as a collection of files. You can then use the files to restore and run the application from the point it was frozen at. 原PO可以玩看看 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.35.172.106 ※ 文章網址: https://www.ptt.cc/bbs/Linux/M.1422280388.A.6C5.html

01/26 22:49, , 1F
CRIU 需要 kernel 開啟特定功能才能使用, 並需要3.11以上
01/26 22:49, 1F

02/14 21:21, , 2F
如果可以分成兩部分寫的話,把重開要跑的部份寫在 /etc/
02/14 21:21, 2F

02/14 21:21, , 3F
rc.local 裡應該也可以?
02/14 21:21, 3F
文章代碼(AID): #1KnaR4R5 (Linux)
文章代碼(AID): #1KnaR4R5 (Linux)