我對bitcoind新貴腳本,它基於本主題中的腳本:https://bitcointalk.org/index.php?topic=25518.0爲bitcoind新貴腳本,重生功能
我強烈需要重生的未來工作:萬一發生什麼事bitcoind自動重新啓動。我試圖模仿這種情況,但暴發戶沒有重新啓動這個過程。
問題:我該如何讓暴發戶(或別的東西)觀看bitcoind,如果發生了什麼不良事件,請重新啓動它?
實際腳本:
description "bitcoind"
start on filesystem
stop on runlevel [!2345]
oom never
expect daemon
respawn
respawn limit 10 60 # 10 times in 60 seconds
script
user=root
home=/root/.bitcoin/
cmd=/usr/bin/bitcoind
pidfile=$home/bitcoind.pid
# Don't change anything below here unless you know what you're doing
[[ -e $pidfile && ! -d "/proc/$(cat $pidfile)" ]] && rm $pidfile
[[ -e $pidfile && "$(cat /proc/$(cat $pidfile)/cmdline)" != $cmd* ]] && rm $pidfile
exec start-stop-daemon --start -c $user --chdir $home --pidfile $pidfile --startas $cmd -b -m
end script
你能解釋一下你怎麼模擬的情況pull請求? – CameronNemo
我試着用-15和-9信號殺死它 –