Commit d4c32d33 authored by kenshin-samourai's avatar kenshin-samourai
Browse files

Merge branch 'feat_mydojo_bitcoind_shutdown' into 'develop'

add new config properrty BITCOIND_SHUTDOWN_DELAY

See merge request dojo/samourai-dojo!157
parents 7d57cb5c f9a528ab
......@@ -104,4 +104,15 @@ BITCOIND_ZMQ_RAWTXS=9501
# Port exposing ZMQ notifications for block hashes
# Set value to 9502 if BITCOIND_INSTALL is set to 'on'
# Type: integer
BITCOIND_ZMQ_BLK_HASH=9502
\ No newline at end of file
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
\ No newline at end of file
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment