diff --git a/rootfs/standard/usr/bin/mynode_docker_images.sh b/rootfs/standard/usr/bin/mynode_docker_images.sh index 06ac0306..5bcde7f8 100755 --- a/rootfs/standard/usr/bin/mynode_docker_images.sh +++ b/rootfs/standard/usr/bin/mynode_docker_images.sh @@ -96,9 +96,9 @@ while true; do # Run Dojo Install or Upgrade cd /opt/mynode/dojo/docker/my-dojo if [ "$INSTALL" = "true" ]; then - echo 'y' | sudo ./dojo.sh install & + yes | sudo ./dojo.sh install & else - echo 'y' | sudo ./dojo.sh upgrade & + yes | sudo ./dojo.sh upgrade & fi #Check for install/upgrade to finish to initialize Dojo mysql db diff --git a/rootfs/standard/usr/bin/mynode_gen_dojo_config.sh b/rootfs/standard/usr/bin/mynode_gen_dojo_config.sh index 30e5e057..6033a015 100755 --- a/rootfs/standard/usr/bin/mynode_gen_dojo_config.sh +++ b/rootfs/standard/usr/bin/mynode_gen_dojo_config.sh @@ -80,6 +80,9 @@ BITCOIND_ZMQ_BLK_HASH=28334 # Turn off explorer for MyNode sed -i 's|EXPLORER_INSTALL=on|EXPLORER_INSTALL=off|' /opt/mynode/dojo/docker/my-dojo/conf/docker-explorer.conf.tpl +# Enable electrs +sed -i 's|INDEXER_IP=.*|INDEXER_IP=172.28.0.1|' /opt/mynode/dojo/docker/my-dojo/conf/docker-indexer.conf.tpl + # check if configuration files have been previously created and skip if yes if [ -f /opt/mynode/dojo/docker/my-dojo/conf/docker-node.conf ]; then echo "File present - skip docker-node.conf" @@ -127,3 +130,6 @@ if [ $IS_ROCK64 = 1 ] || [ $IS_ROCKPRO64 = 1 ]; then sed -i 's|ENV GOLANG_ARCHIVE.*|ENV GOLANG_ARCHIVE go1.13.6.linux-arm64.tar.gz|' /opt/mynode/dojo/docker/my-dojo/tor/Dockerfile sed -i 's|ENV GOLANG_SHA256.*|ENV GOLANG_SHA256 0a18125c4ed80f9c3045cf92384670907c4796b43ed63c4307210fe93e5bbca5|' /opt/mynode/dojo/docker/my-dojo/tor/Dockerfile fi + +# Modify restart policy +sed -i 's|restart:.*|restart: on-failure|' /opt/mynode/dojo/docker/my-dojo/docker-compose.yaml \ No newline at end of file diff --git a/rootfs/standard/usr/bin/mynode_post_dojo.sh b/rootfs/standard/usr/bin/mynode_post_dojo.sh index 962d5851..54c40ecd 100755 --- a/rootfs/standard/usr/bin/mynode_post_dojo.sh +++ b/rootfs/standard/usr/bin/mynode_post_dojo.sh @@ -2,6 +2,8 @@ set -e +source /usr/share/mynode/mynode_config.sh + sleep 30s #dojo needs time to start before passing next line # initalize mysql db (REQUIRED TO START MYSQL) @@ -20,7 +22,9 @@ do isRunning=$(docker inspect --format="{{.State.Running}}" db) if [ "$isRunning" == "true" ]; then sleep 60s - docker exec -i db bash -c "mysql -h db -u root -p$MYSQL_ROOT_PASSWORD $MYSQL_DATABASE"