diff --git a/rootfs/standard/etc/nginx/sites-available/default b/rootfs/standard/etc/nginx/sites-available/default new file mode 100644 index 00000000..e69de29b diff --git a/rootfs/standard/usr/bin/mynode_post_upgrade.sh b/rootfs/standard/usr/bin/mynode_post_upgrade.sh index aaddf285..9f1b81c8 100755 --- a/rootfs/standard/usr/bin/mynode_post_upgrade.sh +++ b/rootfs/standard/usr/bin/mynode_post_upgrade.sh @@ -72,6 +72,13 @@ apt-get -y purge ntp # (conflicts with systemd-timedatectl) apt-get -y purge chrony # (conflicts with systemd-timedatectl) +# Install nginx +mkdir -p /var/log/nginx || true +$TORIFY apt-get -y install nginx || true +# Install may fail, so we need to edit the default config file and reconfigure +echo "" > /etc/nginx/sites-available/default +dpkg --configure -a + # Install any pip software pip2 install tzupdate virtualenv pysocks --no-cache-dir @@ -401,7 +408,7 @@ fi # Upgrade RTL -RTL_VERSION="v0.8.2" +RTL_VERSION="v0.8.3" RTL_UPGRADE_URL=https://github.com/Ride-The-Lightning/RTL/archive/$RTL_VERSION.tar.gz RTL_UPGRADE_ASC_URL=https://github.com/Ride-The-Lightning/RTL/releases/download/$RTL_VERSION/$RTL_VERSION.tar.gz.asc RTL_UPGRADE_URL_FILE=/home/bitcoin/.mynode/.rtl_url diff --git a/rootfs/standard/usr/bin/mynode_startup.sh b/rootfs/standard/usr/bin/mynode_startup.sh index 3ac42062..d2697b5d 100755 --- a/rootfs/standard/usr/bin/mynode_startup.sh +++ b/rootfs/standard/usr/bin/mynode_startup.sh @@ -458,6 +458,7 @@ chmod +x /usr/bin/electrs || true # Once, a device didn't have the execute bit s timedatectl set-ntp True || true # Make sure NTP is enabled for Tor and Bitcoin rm -f /var/swap || true # Remove old swap file to save SD card space systemctl enable check_in || true +mkdir -p /var/log/nginx || true # Check for new versions torify wget $LATEST_VERSION_URL -O /usr/share/mynode/latest_version || true diff --git a/rootfs/standard/var/www/mynode/settings.py b/rootfs/standard/var/www/mynode/settings.py index f1a519ff..690a0a81 100644 --- a/rootfs/standard/var/www/mynode/settings.py +++ b/rootfs/standard/var/www/mynode/settings.py @@ -257,6 +257,9 @@ def page_status(): "caravan_status_log": get_journalctl_log("caravan"), "caravan_status": get_service_status_basic_text("caravan"), "caravan_status_color": get_service_status_color("caravan"), + "nginx_status_log": get_journalctl_log("nginx"), + "nginx_status": get_service_status_basic_text("nginx"), + "nginx_status_color": get_service_status_color("nginx"), "firewall_status_log": get_journalctl_log("ufw"), "firewall_status": get_service_status_basic_text("ufw"), "firewall_status_color": get_service_status_color("ufw"), diff --git a/rootfs/standard/var/www/mynode/templates/status.html b/rootfs/standard/var/www/mynode/templates/status.html index 0d84b2c0..ed441588 100644 --- a/rootfs/standard/var/www/mynode/templates/status.html +++ b/rootfs/standard/var/www/mynode/templates/status.html @@ -106,6 +106,11 @@ $("#upgrade_status_beta").show(); }); + $("#show_nginx_status").on("click", function() { + $("#show_nginx_status").hide(0); + $("#nginx_status").show(); + }); + $("#show_firewall_status").on("click", function() { $("#show_firewall_status").hide(0); $("#firewall_status").show(); @@ -447,6 +452,15 @@ {% endif %} +
NGINX Status
+
+
+ {{ nginx_status }} +
+ + +
+
Firewall Status
diff --git a/setup/setup_device.sh b/setup/setup_device.sh index 316f4b1f..4b755298 100755 --- a/setup/setup_device.sh +++ b/setup/setup_device.sh @@ -144,6 +144,15 @@ apt-get -y purge chrony # (conflicts with systemd-timedatectl) # Install other things without recommendation apt-get -y install --no-install-recommends expect + +# Install nginx +mkdir -p /var/log/nginx +$TORIFY apt-get -y install nginx || true +# Install may fail, so we need to edit the default config file and reconfigure +echo "" > /etc/nginx/sites-available/default +dpkg --configure -a + + # Add bitcoin users useradd -m -s /bin/bash bitcoin || true usermod -a -G debian-tor bitcoin @@ -505,7 +514,7 @@ fi # Install RTL -RTL_VERSION="v0.8.2" +RTL_VERSION="v0.8.3" RTL_UPGRADE_URL=https://github.com/Ride-The-Lightning/RTL/archive/$RTL_VERSION.tar.gz RTL_UPGRADE_ASC_URL=https://github.com/Ride-The-Lightning/RTL/releases/download/$RTL_VERSION/$RTL_VERSION.tar.gz.asc RTL_UPGRADE_URL_FILE=/home/bitcoin/.mynode/.rtl_url