Browse Source

add new config properrty BITCOIND_SHUTDOWN_DELAY

use-env-var-docker
kenshin-samourai 5 years ago
parent
commit
f9a528ab49
  1. 11
      docker/my-dojo/conf/docker-bitcoind.conf.tpl
  2. 5
      docker/my-dojo/dojo.sh

11
docker/my-dojo/conf/docker-bitcoind.conf.tpl

@ -105,3 +105,14 @@ BITCOIND_ZMQ_RAWTXS=9501
# Set value to 9502 if BITCOIND_INSTALL is set to 'on'
# Type: integer
BITCOIND_ZMQ_BLK_HASH=9502
#
# SHUTDOWN
#
# Max delay for bitcoind shutdown (expressed in seconds)
# Defines how long Dojo waits for a clean shutdown of bitcoind before shutting down the bitcoind container
# This parameter is inactive if BITCOIND_INSTALL is set to 'off'
# Type: integer
BITCOIND_SHUTDOWN_DELAY=180

5
docker/my-dojo/dojo.sh

@ -96,7 +96,8 @@ stop() {
# Check if the bitcoin daemon is still up
# wait 3mn max
i="0"
while [ $i -lt 18 ]
nbIters=$(( $BITCOIND_SHUTDOWN_DELAY / 10 ))
while [ $i -lt $nbIters ]
do
echo "Waiting for shutdown of Bitcoin server."
# Check if bitcoind rpc api is responding
@ -115,7 +116,7 @@ stop() {
done
# Bitcoin daemon is still up
# => force close
if [ $i -eq 18 ]; then
if [ $i -eq $nbIters ]; then
echo "Force shutdown of Bitcoin server."
fi
fi

Loading…
Cancel
Save