Skip to content

Commit 4f5c82f

Browse files
nicbusshesek
authored andcommitted
longer bitcoin shutdown wait (5 minutes)
1 parent fda606d commit 4f5c82f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

contrib/runit_boot.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ shutdown() {
99
# next shut down electrs (avoid long wait + losing blocks in bitcoind)
1010
sv -w "$SVWAIT" force-stop electrs
1111

12+
# next shut down bitcoin (longer timeout to allow for a clean shutdown)
13+
sv -w "$BCWAIT" force-stop bitcoin
14+
1215
# then shutdown any other service started by runit
1316
for _srv in $(ls -1 /etc/service); do
1417
sv -w "$SVWAIT" force-stop "$_srv"
@@ -33,6 +36,7 @@ export > /etc/envvars
3336

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

3741
# run all scripts in the run_once folder
3842
/bin/run-parts /etc/run_once

0 commit comments

Comments
 (0)