Browse Source

clean-up of log files

use-env-var-docker
kenshin-samourai 5 years ago
parent
commit
cfd2c33b64
  1. 2
      docker/my-dojo/dojo.sh
  2. 48
      docker/my-dojo/install/upgrade-scripts.sh

2
docker/my-dojo/dojo.sh

@ -322,6 +322,8 @@ upgrade() {
fi
# Start Dojo
docker_up --remove-orphans
# Post start clean-up
post_start_cleanup
# Update the database
update_dojo_db
# Display the logs

48
docker/my-dojo/install/upgrade-scripts.sh

@ -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
}
Loading…
Cancel
Save