Skip to content

Commit

Permalink
longer bitcoin shutdown wait (5 minutes)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicbus authored and shesek committed Nov 12, 2024
1 parent fda606d commit 4f5c82f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions contrib/runit_boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ shutdown() {
# next shut down electrs (avoid long wait + losing blocks in bitcoind)
sv -w "$SVWAIT" force-stop electrs

# next shut down bitcoin (longer timeout to allow for a clean shutdown)
sv -w "$BCWAIT" force-stop bitcoin

# then shutdown any other service started by runit
for _srv in $(ls -1 /etc/service); do
sv -w "$SVWAIT" force-stop "$_srv"
Expand All @@ -33,6 +36,7 @@ export > /etc/envvars

PATH=/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin
SVWAIT=60 # wait process to end up to SVWAIT seconds before sending kill signal
BCWAIT=300 # custom timeout for bitcoind before sending kill signal

# run all scripts in the run_once folder
/bin/run-parts /etc/run_once
Expand Down

0 comments on commit 4f5c82f

Please sign in to comment.