|
|
@ -128,6 +128,40 @@ update_dojo_db() { |
|
|
|
|
|
|
|
# Clean-up |
|
|
|
cleanup() { |
|
|
|
################# |
|
|
|
# Clean-up v1.6.0 |
|
|
|
################# |
|
|
|
|
|
|
|
# Remove docker volume my-dojo_data-explorer |
|
|
|
explorerVolumeFound=$(docker volume ls | grep my-dojo_data-explorer | wc -l) |
|
|
|
if [ $explorerVolumeFound -ne 0 ]; then |
|
|
|
explorerContainerFound=$(docker container ls -a | grep explorer | wc -l) |
|
|
|
if [ $explorerContainerFound -ne 0 ]; then |
|
|
|
docker container rm explorer |
|
|
|
fi |
|
|
|
docker volume rm my-dojo_data-explorer |
|
|
|
fi |
|
|
|
|
|
|
|
# Remove docker volume my-dojo_data-nginx |
|
|
|
nginxVolumeFound=$(docker volume ls | grep my-dojo_data-nginx | wc -l) |
|
|
|
if [ $nginxVolumeFound -ne 0 ]; then |
|
|
|
nginxContainerFound=$(docker container ls -a | grep nginx | wc -l) |
|
|
|
if [ $nginxContainerFound -ne 0 ]; then |
|
|
|
docker container rm nginx |
|
|
|
fi |
|
|
|
docker volume rm my-dojo_data-nginx |
|
|
|
fi |
|
|
|
|
|
|
|
# Remove docker volume my-dojo_data-nodejs |
|
|
|
nodeVolumeFound=$(docker volume ls | grep my-dojo_data-nodejs | wc -l) |
|
|
|
if [ $nodeVolumeFound -ne 0 ]; then |
|
|
|
nodeContainerFound=$(docker container ls -a | grep nodejs | wc -l) |
|
|
|
if [ $nodeContainerFound -ne 0 ]; then |
|
|
|
docker container rm nodejs |
|
|
|
fi |
|
|
|
docker volume rm my-dojo_data-nodejs |
|
|
|
fi |
|
|
|
|
|
|
|
################# |
|
|
|
# Clean-up v1.3.0 |
|
|
|
################# |
|
|
@ -147,3 +181,17 @@ cleanup() { |
|
|
|
fi |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
# Post start clean-up |
|
|
|
post_start_cleanup() { |
|
|
|
################# |
|
|
|
# Clean-up v1.6.0 |
|
|
|
################# |
|
|
|
|
|
|
|
# Remove debug.log from bitcoind volume |
|
|
|
if [ "$COMMON_BTC_NETWORK" == "testnet" ]; then |
|
|
|
docker exec -it bitcoind rm /home/bitcoin/.bitcoin/testnet3/debug.log |
|
|
|
else |
|
|
|
docker exec -it bitcoind rm /home/bitcoin/.bitcoin/debug.log |
|
|
|
fi |
|
|
|
} |