diff --git a/rootfs/standard/etc/logrotate.d/rsyslog b/rootfs/standard/etc/logrotate.d/rsyslog index 27861c8b..3aaf0b3e 100644 --- a/rootfs/standard/etc/logrotate.d/rsyslog +++ b/rootfs/standard/etc/logrotate.d/rsyslog @@ -12,6 +12,7 @@ /var/log/www.log /var/log/bitcoind.log /var/log/unlock_lnd.log +/var/log/mynode_docker_images.log { rotate 2 daily diff --git a/rootfs/standard/etc/rsyslog.d/docker_images.conf b/rootfs/standard/etc/rsyslog.d/docker_images.conf new file mode 100644 index 00000000..5170c539 --- /dev/null +++ b/rootfs/standard/etc/rsyslog.d/docker_images.conf @@ -0,0 +1,2 @@ +if $programname == 'mynode_docker_images' then /var/log/mynode_docker_images.log +& stop \ No newline at end of file diff --git a/rootfs/standard/usr/bin/mynode_docker_images.sh b/rootfs/standard/usr/bin/mynode_docker_images.sh index 60eefdd6..4fe3f5cb 100755 --- a/rootfs/standard/usr/bin/mynode_docker_images.sh +++ b/rootfs/standard/usr/bin/mynode_docker_images.sh @@ -5,15 +5,19 @@ set -x source /usr/share/mynode/mynode_config.sh +echo "Starting mynode_docker_images.sh ..." + # Drive should be mounted, let's still wait a bit sleep 60s # Loop and check every 1 day while [ 1 ]; do + echo "Checking for building new docker images..." touch /tmp/installing_docker_images # Upgrade WebSSH2 + echo "Checking for new webssh2..." WEBSSH2_UPGRADE_URL=https://github.com/billchurch/webssh2/archive/v0.2.10-0.tar.gz WEBSSH2_UPGRADE_URL_FILE=/mnt/hdd/mynode/settings/webssh2_url CURRENT="" @@ -35,6 +39,7 @@ while [ 1 ]; do fi # Upgrade mempool.space + echo "Checking for new mempool.space..." if [ $IS_PREMIUM -eq 1 ]; then MEMPOOLSPACE_UPGRADE_URL=https://github.com/mempool-space/mempool.space/archive/master.zip MEMPOOLSPACE_UPGRADE_URL_FILE=/mnt/hdd/mynode/settings/mempoolspace_url @@ -59,5 +64,6 @@ while [ 1 ]; do rm -f /tmp/installing_docker_images # Check again in a day + echo "Waiting a day..." sleep 24h done diff --git a/rootfs/standard/var/www/mynode/mynode.py b/rootfs/standard/var/www/mynode/mynode.py index bf081fbe..2ffc4868 100644 --- a/rootfs/standard/var/www/mynode/mynode.py +++ b/rootfs/standard/var/www/mynode/mynode.py @@ -239,15 +239,15 @@ def index(): } return render_template('state.html', **templateData) - if is_installing_docker_images(): - message = "
{}".format( get_message(include_funny=True) ) - templateData = { - "title": "myNode Status", - "header_text": "Starting...", - "subheader_text": Markup("Building Docker Images...{}".format(message)), - "ui_settings": read_ui_settings() - } - return render_template('state.html', **templateData) + # if is_installing_docker_images(): + # message = "
{}".format( get_message(include_funny=True) ) + # templateData = { + # "title": "myNode Status", + # "header_text": "Starting...", + # "subheader_text": Markup("Building Docker Images...{}".format(message)), + # "ui_settings": read_ui_settings() + # } + # return render_template('state.html', **templateData) # Display sync info if not synced if not is_bitcoind_synced(): diff --git a/rootfs/standard/var/www/mynode/settings.py b/rootfs/standard/var/www/mynode/settings.py index d8696efc..53d7746a 100644 --- a/rootfs/standard/var/www/mynode/settings.py +++ b/rootfs/standard/var/www/mynode/settings.py @@ -95,24 +95,31 @@ def page_settings(): # Get LND Status lnd_status = "" try: - lnd_status = subprocess.check_output("journalctl --unit=lnd --no-pager | tail -n 100", shell=True).decode("utf8") + lnd_status = subprocess.check_output("journalctl --unit=lnd --no-pager | tail -n 200", shell=True).decode("utf8") except: lnd_status = "ERROR" # Get Tor Status tor_status = "" try: - tor_status = subprocess.check_output("journalctl --unit=tor@default --no-pager | tail -n 100", shell=True).decode("utf8") + tor_status = subprocess.check_output("journalctl --unit=tor@default --no-pager | tail -n 200", shell=True).decode("utf8") except: tor_status = "ERROR" # Get Electrs Status electrs_status = "" try: - electrs_status = subprocess.check_output("journalctl --unit=electrs --no-pager | tail -n 100", shell=True).decode("utf8") + electrs_status = subprocess.check_output("journalctl --unit=electrs --no-pager | tail -n 200", shell=True).decode("utf8") except: electrs_status = "ERROR" + # Get Docker Image Build Status + docker_image_build_status = "" + try: + docker_image_build_status = subprocess.check_output("journalctl --unit=docker_images --no-pager | tail -n 200", shell=True).decode("utf8") + except: + docker_image_build_status = "ERROR" + # Get QuickSync Rates upload_rate = 100 download_rate = 100 @@ -141,6 +148,7 @@ def page_settings(): "lnd_status": lnd_status, "tor_status": tor_status, "electrs_status": electrs_status, + "docker_image_build_status": docker_image_build_status, "is_quicksync_disabled": not is_quicksync_enabled(), "is_netdata_enabled": is_netdata_enabled(), "is_uploader_device": is_uploader(), diff --git a/rootfs/standard/var/www/mynode/templates/settings.html b/rootfs/standard/var/www/mynode/templates/settings.html index 5472274c..a49a8dd7 100644 --- a/rootfs/standard/var/www/mynode/templates/settings.html +++ b/rootfs/standard/var/www/mynode/templates/settings.html @@ -199,6 +199,11 @@ $("#electrs_status").show(); }); + $("#show_docker_image_build_status").on("click", function() { + $("#show_docker_image_build_status").hide(0); + $("#docker_image_build_status").show(); + }); + $("#show_mynode_changelog").on("click", function() { if (showChangelog) { @@ -472,6 +477,11 @@
Electrum Server Status
+
+ +
Docker Image Build Status
+ +