From a31a0fefebcf854ef33d2df6c90cd3611594a1a1 Mon Sep 17 00:00:00 2001 From: Taylor Helsper Date: Sat, 13 Feb 2021 00:07:49 -0600 Subject: [PATCH] Update Sphinx Relay naming --- .../standard/etc/systemd/system/dojo.service | 2 +- ...hinx-relay.service => sphinxrelay.service} | 8 ++-- .../standard/usr/bin/mynode_post_upgrade.sh | 18 +++---- .../standard/usr/bin/mynode_reinstall_app.sh | 4 +- rootfs/standard/usr/bin/mynode_startup.sh | 35 +++++++------- .../usr/bin/mynode_stop_critical_services.sh | 8 ++++ .../usr/share/mynode/mynode_app_versions.sh | 6 +-- .../{sphinx_app.json => sphinxrelay_app.json} | 1 + ...nx_config.json => sphinxrelay_config.json} | 2 +- .../www/mynode/enable_disable_functions.py | 10 ++-- rootfs/standard/var/www/mynode/mynode.py | 2 + rootfs/standard/var/www/mynode/settings.py | 6 +++ rootfs/standard/var/www/mynode/sphinxrelay.py | 32 +++++++++++++ .../var/www/mynode/static/css/mynode.css | 6 +-- .../www/mynode/templates/includes/apps.html | 22 ++++++++- .../var/www/mynode/templates/sphinxrelay.html | 48 +++++++++++++++++++ .../var/www/mynode/templates/status.html | 30 ++++++++++++ scripts/check_app_versions.py | 2 +- setup/setup_device.sh | 18 +++---- 19 files changed, 203 insertions(+), 57 deletions(-) rename rootfs/standard/etc/systemd/system/{sphinx-relay.service => sphinxrelay.service} (73%) rename rootfs/standard/usr/share/mynode/{sphinx_app.json => sphinxrelay_app.json} (97%) rename rootfs/standard/usr/share/mynode/{sphinx_config.json => sphinxrelay_config.json} (85%) create mode 100644 rootfs/standard/var/www/mynode/sphinxrelay.py create mode 100644 rootfs/standard/var/www/mynode/templates/sphinxrelay.html diff --git a/rootfs/standard/etc/systemd/system/dojo.service b/rootfs/standard/etc/systemd/system/dojo.service index 5e69e1d1..26b63eed 100644 --- a/rootfs/standard/etc/systemd/system/dojo.service +++ b/rootfs/standard/etc/systemd/system/dojo.service @@ -17,7 +17,7 @@ ExecStop=/mnt/hdd/mynode/dojo/docker/my-dojo/dojo.sh stop User=root Group=root KillMode=control-group -TimeoutSec=900 +TimeoutSec=180 Restart=always RestartSec=60 diff --git a/rootfs/standard/etc/systemd/system/sphinx-relay.service b/rootfs/standard/etc/systemd/system/sphinxrelay.service similarity index 73% rename from rootfs/standard/etc/systemd/system/sphinx-relay.service rename to rootfs/standard/etc/systemd/system/sphinxrelay.service index 70db3519..9d9402a3 100644 --- a/rootfs/standard/etc/systemd/system/sphinx-relay.service +++ b/rootfs/standard/etc/systemd/system/sphinxrelay.service @@ -1,5 +1,5 @@ -# sphinx-relay service -# /etc/systemd/system/sphinx-relay.service +# sphinxrelay service +# /etc/systemd/system/sphinxrelay.service [Unit] Description=Sphinx Relay @@ -9,7 +9,7 @@ After=lnd.service [Service] ExecStartPre=/usr/bin/is_not_shutting_down.sh ExecStartPre=/usr/bin/wait_on_lnd.sh -WorkingDirectory=/opt/mynode/sphinx-relay +WorkingDirectory=/opt/mynode/sphinxrelay ExecStart=npm run prod User=bitcoin @@ -21,7 +21,7 @@ Restart=always RestartSec=60 StandardOutput=syslog StandardError=syslog -SyslogIdentifier=sphinx-relay +SyslogIdentifier=sphinxrelay [Install] WantedBy=multi-user.target diff --git a/rootfs/standard/usr/bin/mynode_post_upgrade.sh b/rootfs/standard/usr/bin/mynode_post_upgrade.sh index 0107d8b3..1b1ac32e 100755 --- a/rootfs/standard/usr/bin/mynode_post_upgrade.sh +++ b/rootfs/standard/usr/bin/mynode_post_upgrade.sh @@ -703,23 +703,23 @@ fi # Upgrade Sphinx Relay -SPHINX_RELAY_UPGRADE_URL=https://github.com/stakwork/sphinx-relay/archive/$SPHINX_RELAY_VERSION.tar.gz +SPHINXRELAY_UPGRADE_URL=https://github.com/stakwork/sphinx-relay/archive/$SPHINXRELAY_VERSION.tar.gz CURRENT="" -if [ -f $SPHINX_RELAY_VERSION_FILE ]; then - CURRENT=$(cat $SPHINX_RELAY_VERSION_FILE) +if [ -f $SPHINXRELAY_VERSION_FILE ]; then + CURRENT=$(cat $SPHINXRELAY_VERSION_FILE) fi -if [ "$CURRENT" != "$SPHINX_RELAY_VERSION" ]; then +if [ "$CURRENT" != "$SPHINXRELAY_VERSION" ]; then cd /opt/mynode - rm -rf sphinx-relay - sudo -u bitcoin wget $SPHINX_RELAY_UPGRADE_URL -O sphinx-relay.tar.gz + rm -rf sphinxrelay + sudo -u bitcoin wget $SPHINXRELAY_UPGRADE_URL -O sphinx-relay.tar.gz sudo -u bitcoin tar -xvf sphinx-relay.tar.gz sudo -u bitcoin rm sphinx-relay.tar.gz - sudo -u bitcoin mv sphinx-relay-* sphinx-relay - cd sphinx-relay + sudo -u bitcoin mv sphinx-relay-* sphinxrelay + cd sphinxrelay sudo -u bitcoin npm install - echo $SPHINX_RELAY_VERSION > $SPHINX_RELAY_VERSION_FILE + echo $SPHINXRELAY_VERSION > $SPHINXRELAY_VERSION_FILE fi diff --git a/rootfs/standard/usr/bin/mynode_reinstall_app.sh b/rootfs/standard/usr/bin/mynode_reinstall_app.sh index d67454af..df67f3bf 100755 --- a/rootfs/standard/usr/bin/mynode_reinstall_app.sh +++ b/rootfs/standard/usr/bin/mynode_reinstall_app.sh @@ -57,8 +57,8 @@ elif [ "$APP" = "thunderhub" ]; then rm -f $THUNDERHUB_VERSION_FILE elif [ "$APP" = "ckbunker" ]; then rm -f $CKBUNKER_VERSION_FILE -elif [ "$APP" = "sphinx-relay" ]; then - rm -f $SPHINX_RELAY_VERSION_FILE +elif [ "$APP" = "sphinxrelay" ]; then + rm -f $SPHINXRELAY_VERSION_FILE elif [ "$APP" = "tor" ]; then apt-get remove -y tor apt-get install -y tor diff --git a/rootfs/standard/usr/bin/mynode_startup.sh b/rootfs/standard/usr/bin/mynode_startup.sh index 97c854d7..36888fb1 100755 --- a/rootfs/standard/usr/bin/mynode_startup.sh +++ b/rootfs/standard/usr/bin/mynode_startup.sh @@ -157,7 +157,7 @@ mkdir -p /mnt/hdd/mynode/whirlpool mkdir -p /mnt/hdd/mynode/lnbits mkdir -p /mnt/hdd/mynode/specter mkdir -p /mnt/hdd/mynode/ckbunker -mkdir -p /mnt/hdd/mynode/sphinx-relay +mkdir -p /mnt/hdd/mynode/sphinxrelay mkdir -p /tmp/flask_uploads echo "drive_mounted" > $MYNODE_STATUS_FILE chmod 777 $MYNODE_STATUS_FILE @@ -364,22 +364,21 @@ if [ ! -f /mnt/hdd/mynode/ckbunker/update_settings_$CKBUNKER_CONFIG_UPDATE_NUM ] fi # Setup Sphinx Relay -SPHINX_RELAY_CONFIG_UPDATE_NUM=1 -if [ ! -f /mnt/hdd/mynode/sphinx-relay/update_settings_$SPHINX_RELAY_CONFIG_UPDATE_NUM ]; then - cp -f /usr/share/mynode/sphinx_app.json /mnt/hdd/mynode/sphinx-relay/app.json - cp -f /usr/share/mynode/sphinx_config.json /mnt/hdd/mynode/sphinx-relay/config.json - chown -R bitcoin:bitcoin /opt/mynode/sphinx-relay/config/* - chown -R bitcoin:bitcoin /mnt/hdd/mynode/sphinx-relay +SPHINXRELAY_CONFIG_UPDATE_NUM=1 +if [ ! -f /mnt/hdd/mynode/sphinxrelay/update_settings_$SPHINXRELAY_CONFIG_UPDATE_NUM ]; then + cp -f /usr/share/mynode/sphinxrelay_app.json /mnt/hdd/mynode/sphinxrelay/app.json + cp -f /usr/share/mynode/sphinxrelay_config.json /mnt/hdd/mynode/sphinxrelay/config.json + chown -R bitcoin:bitcoin /mnt/hdd/mynode/sphinxrelay - touch /mnt/hdd/mynode/sphinx-relay/update_settings_$SPHINX_RELAY_CONFIG_UPDATE_NUM + touch /mnt/hdd/mynode/sphinxrelay/update_settings_$SPHINXRELAY_CONFIG_UPDATE_NUM fi -if [ -d /opt/mynode/sphinx-relay/config ]; then - if [ ! -L /opt/mynode/sphinx-relay/config/app.json ] || [ ! -L /opt/mynode/sphinx-relay/config/config.json ]; then - rm -f /opt/mynode/sphinx-relay/config/app.json - rm -f /opt/mynode/sphinx-relay/config/config.json - sudo -u bitcoin ln -s /mnt/hdd/mynode/sphinx-relay/app.json /opt/mynode/sphinx-relay/config/app.json - sudo -u bitcoin ln -s /mnt/hdd/mynode/sphinx-relay/config.json /opt/mynode/sphinx-relay/config/config.json - chown -R bitcoin:bitcoin /opt/mynode/sphinx-relay/config/* +if [ -d /opt/mynode/sphinxrelay/config ]; then + if [ ! -L /opt/mynode/sphinxrelay/config/app.json ] || [ ! -L /opt/mynode/sphinxrelay/config/config.json ]; then + rm -f /opt/mynode/sphinxrelay/config/app.json + rm -f /opt/mynode/sphinxrelay/config/config.json + sudo -u bitcoin ln -s /mnt/hdd/mynode/sphinxrelay/app.json /opt/mynode/sphinxrelay/config/app.json + sudo -u bitcoin ln -s /mnt/hdd/mynode/sphinxrelay/config.json /opt/mynode/sphinxrelay/config/config.json + chown -R bitcoin:bitcoin /opt/mynode/sphinxrelay/config/* fi fi @@ -470,9 +469,9 @@ USER=$(stat -c '%U' /mnt/hdd/mynode/ckbunker) if [ "$USER" != "bitcoin" ]; then chown -R bitcoin:bitcoin /mnt/hdd/mynode/ckbunker fi -USER=$(stat -c '%U' /mnt/hdd/mynode/sphinx-relay) +USER=$(stat -c '%U' /mnt/hdd/mynode/sphinxrelay) if [ "$USER" != "bitcoin" ]; then - chown -R bitcoin:bitcoin /mnt/hdd/mynode/sphinx-relay + chown -R bitcoin:bitcoin /mnt/hdd/mynode/sphinxrelay fi USER=$(stat -c '%U' /mnt/hdd/mynode/redis) if [ "$USER" != "redis" ]; then @@ -592,7 +591,7 @@ echo $SPECTER_VERSION > $SPECTER_LATEST_VERSION_FILE echo $THUNDERHUB_VERSION > $THUNDERHUB_LATEST_VERSION_FILE echo $LNDCONNECT_VERSION > $LNDCONNECT_LATEST_VERSION_FILE echo $CKBUNKER_VERSION > $CKBUNKER_LATEST_VERSION_FILE -echo $SPHINX_RELAY_VERSION > $SPHINX_RELAY_LATEST_VERSION_FILE +echo $SPHINXRELAY_VERSION > $SPHINXRELAY_LATEST_VERSION_FILE # Weird hacks diff --git a/rootfs/standard/usr/bin/mynode_stop_critical_services.sh b/rootfs/standard/usr/bin/mynode_stop_critical_services.sh index e3bab2d6..e292c85d 100755 --- a/rootfs/standard/usr/bin/mynode_stop_critical_services.sh +++ b/rootfs/standard/usr/bin/mynode_stop_critical_services.sh @@ -8,9 +8,13 @@ touch /tmp/shutting_down # Stop additional services +date systemctl stop glances lndhub netdata rtl webssh2 whirlpool dojo +date systemctl stop btcpayserver btc_rpc_explorer specter caravan lnbits +date systemctl stop thunderhub mempoolspace +date # Manually stop services (backup) @@ -20,8 +24,12 @@ fi # Stop core services +date systemctl stop electrs loopd lnd quicksync bitcoind +date # Sync filesystem sync + +echo "Done stopping services." \ No newline at end of file diff --git a/rootfs/standard/usr/share/mynode/mynode_app_versions.sh b/rootfs/standard/usr/share/mynode/mynode_app_versions.sh index 811e7a23..37b75a8a 100644 --- a/rootfs/standard/usr/share/mynode/mynode_app_versions.sh +++ b/rootfs/standard/usr/share/mynode/mynode_app_versions.sh @@ -70,6 +70,6 @@ CKBUNKER_VERSION="v0.9" CKBUNKER_VERSION_FILE=/home/bitcoin/.mynode/ckbunker_version CKBUNKER_LATEST_VERSION_FILE=/home/bitcoin/.mynode/ckbunker_version_latest -SPHINX_RELAY_VERSION="v1.3.8" -SPHINX_RELAY_VERSION_FILE=/home/bitcoin/.mynode/sphinx_relay_version -SPHINX_RELAY_LATEST_VERSION_FILE=/home/bitcoin/.mynode/sphinx_relay_version_latest +SPHINXRELAY_VERSION="v1.3.8" +SPHINXRELAY_VERSION_FILE=/home/bitcoin/.mynode/sphinxrelay_version +SPHINXRELAY_LATEST_VERSION_FILE=/home/bitcoin/.mynode/sphinxrelay_version_latest diff --git a/rootfs/standard/usr/share/mynode/sphinx_app.json b/rootfs/standard/usr/share/mynode/sphinxrelay_app.json similarity index 97% rename from rootfs/standard/usr/share/mynode/sphinx_app.json rename to rootfs/standard/usr/share/mynode/sphinxrelay_app.json index 6c153c70..c4ef70ea 100644 --- a/rootfs/standard/usr/share/mynode/sphinx_app.json +++ b/rootfs/standard/usr/share/mynode/sphinxrelay_app.json @@ -27,6 +27,7 @@ "macaroon_location": "/home/bitcoin/.lnd/data/chain/bitcoin/mainnet/admin.macaroon", "tls_location": "/home/bitcoin/.lnd/tls.cert", "lnd_log_location": "/home/bitcoin/.lnd/logs/bitcoin/mainnet/lnd.log", + "lncli_location": "/home/bitcoin/go/bin", "node_ip": "localhost", "lnd_ip": "localhost", "node_http_protocol": "http", diff --git a/rootfs/standard/usr/share/mynode/sphinx_config.json b/rootfs/standard/usr/share/mynode/sphinxrelay_config.json similarity index 85% rename from rootfs/standard/usr/share/mynode/sphinx_config.json rename to rootfs/standard/usr/share/mynode/sphinxrelay_config.json index 62448ff6..d336b0b6 100644 --- a/rootfs/standard/usr/share/mynode/sphinx_config.json +++ b/rootfs/standard/usr/share/mynode/sphinxrelay_config.json @@ -13,6 +13,6 @@ }, "production": { "dialect": "sqlite", - "storage": "/mnt/hdd/mynode/sphinx-relay/sphinx.db" + "storage": "/mnt/hdd/mynode/sphinxrelay/sphinx.db" } } \ No newline at end of file diff --git a/rootfs/standard/var/www/mynode/enable_disable_functions.py b/rootfs/standard/var/www/mynode/enable_disable_functions.py index 75ef27f2..ce5b2fd5 100644 --- a/rootfs/standard/var/www/mynode/enable_disable_functions.py +++ b/rootfs/standard/var/www/mynode/enable_disable_functions.py @@ -82,13 +82,13 @@ def disable_ckbunker(): def is_sphinxrelay_enabled(): - return is_service_enabled("thunderhub") + return is_service_enabled("sphinxrelay") def enable_sphinxrelay(): - os.system("systemctl enable sphinx-relay --no-pager") - os.system("systemctl start sphinx-relay --no-pager") + os.system("systemctl enable sphinxrelay --no-pager") + os.system("systemctl start sphinxrelay --no-pager") def disable_sphinxrelay(): - os.system("systemctl stop sphinx-relay --no-pager") - os.system("systemctl disable sphinx-relay --no-pager") + os.system("systemctl stop sphinxrelay --no-pager") + os.system("systemctl disable sphinxrelay --no-pager") def is_btcrpcexplorer_enabled(): diff --git a/rootfs/standard/var/www/mynode/mynode.py b/rootfs/standard/var/www/mynode/mynode.py index 8f1b37d8..f88dc707 100644 --- a/rootfs/standard/var/www/mynode/mynode.py +++ b/rootfs/standard/var/www/mynode/mynode.py @@ -7,6 +7,7 @@ from bitcoind import mynode_bitcoind from whirlpool import mynode_whirlpool, get_whirlpool_status from dojo import mynode_dojo, get_dojo_status from caravan import mynode_caravan +from sphinxrelay import mynode_sphinxrelay from manage_apps import mynode_manage_apps from tor import mynode_tor from vpn import mynode_vpn @@ -77,6 +78,7 @@ app.register_blueprint(mynode_api) app.register_blueprint(mynode_whirlpool) app.register_blueprint(mynode_dojo) app.register_blueprint(mynode_caravan) +app.register_blueprint(mynode_sphinxrelay) app.register_blueprint(mynode_manage_apps) app.register_blueprint(mynode_tor) app.register_blueprint(mynode_electrum_server) diff --git a/rootfs/standard/var/www/mynode/settings.py b/rootfs/standard/var/www/mynode/settings.py index 21645619..454e424b 100644 --- a/rootfs/standard/var/www/mynode/settings.py +++ b/rootfs/standard/var/www/mynode/settings.py @@ -241,6 +241,12 @@ def page_status(): "thunderhub_status_log": thunderhub_status_log, "thunderhub_status": get_service_status_basic_text("thunderhub"), "thunderhub_status_color": get_service_status_color("thunderhub"), + "ckbunker_status_log": ckbunker_status_log, + "ckbunker_status": get_service_status_basic_text("ckbunker"), + "ckbunker_status_color": get_service_status_color("ckbunker"), + "sphinxrelay_status_log": sphinxrelay_status_log, + "sphinxrelay_status": get_service_status_basic_text("sphinxrelay"), + "sphinxrelay_status_color": get_service_status_color("sphinxrelay"), "docker_status_log": docker_status_log, "docker_status": get_service_status_basic_text("docker"), "docker_status_color": get_service_status_color("docker"), diff --git a/rootfs/standard/var/www/mynode/sphinxrelay.py b/rootfs/standard/var/www/mynode/sphinxrelay.py new file mode 100644 index 00000000..49040381 --- /dev/null +++ b/rootfs/standard/var/www/mynode/sphinxrelay.py @@ -0,0 +1,32 @@ +from flask import Blueprint, render_template, redirect +from user_management import check_logged_in +from device_info import read_ui_settings, get_file_contents +from systemctl_info import * +import subprocess +import os + +mynode_sphinxrelay = Blueprint('mynode_sphinxrelay',__name__) + +### Functions +def get_connection_string(): + s = get_file_contents("/opt/mynode/sphinxrelay/connection_string.txt") + return s + + +### Page functions +@mynode_sphinxrelay.route("/sphinxrelay") +def sphinxrelay_page(): + check_logged_in() + + sphinxrelay_status = "Error" + if get_service_status_code("sphinxrelay") == 0: + sphinxrelay_status = "Running" + + # Load page + templateData = { + "title": "myNode Sphinx Relay", + "ui_settings": read_ui_settings(), + "sphinxrelay_status": sphinxrelay_status, + "sphinxrelay_connection_string": get_connection_string(), + } + return render_template('sphinxrelay.html', **templateData) diff --git a/rootfs/standard/var/www/mynode/static/css/mynode.css b/rootfs/standard/var/www/mynode/static/css/mynode.css index 2440b361..3478da1f 100644 --- a/rootfs/standard/var/www/mynode/static/css/mynode.css +++ b/rootfs/standard/var/www/mynode/static/css/mynode.css @@ -309,10 +309,10 @@ td { line-height: 130%; } .app_beta_tag_image { - width: 40px; - height: 40px; + width: 50px; + height: 50px; position: absolute; - left: 110px; + left: 100px; top: 0px; } .app_contents { diff --git a/rootfs/standard/var/www/mynode/templates/includes/apps.html b/rootfs/standard/var/www/mynode/templates/includes/apps.html index 5e73570d..0ed31043 100644 --- a/rootfs/standard/var/www/mynode/templates/includes/apps.html +++ b/rootfs/standard/var/www/mynode/templates/includes/apps.html @@ -228,7 +228,6 @@
-
CKBunker
{{ ckbunker_status }}
@@ -244,6 +243,27 @@ {% endif %}
+ diff --git a/rootfs/standard/var/www/mynode/templates/sphinxrelay.html b/rootfs/standard/var/www/mynode/templates/sphinxrelay.html new file mode 100644 index 00000000..a5ba68dd --- /dev/null +++ b/rootfs/standard/var/www/mynode/templates/sphinxrelay.html @@ -0,0 +1,48 @@ + + + {{ title }} + {% include 'includes/head.html' %} + + + {% include 'includes/logo_header.html' %} +
+ home  +
+ +
Sphinx Relay
+
+ +
+
+
Status
+
{{sphinxrelay_status}}
+
+
+
+
+
Connection String
+
{{sphinxrelay_connection_string}}
+
+
+ +
+
Instructions to setup Sphinx Relay
+
    +
  1. Ensure that Sphinx Relay is enabled and you see "Running" on the status tile.
  2. +
  3. Download and install Sphinx from sphinx.chat.
  4. +
  5. ...
  6. +
  7. ...
  8. +
  9. ...
  10. +
  11. ...
  12. +
  13. ...
  14. +
  15. ...
  16. +
  17. ...
  18. +
  19. ...
  20. +
  21. Enjoy!
  22. +
+ +

+ +
+ + diff --git a/rootfs/standard/var/www/mynode/templates/status.html b/rootfs/standard/var/www/mynode/templates/status.html index cc345cc8..cd9295be 100644 --- a/rootfs/standard/var/www/mynode/templates/status.html +++ b/rootfs/standard/var/www/mynode/templates/status.html @@ -106,6 +106,16 @@ $("#caravan_status").show(); }); + $("#show_ckbunker_status").on("click", function() { + $("#show_ckbunker_status").hide(0); + $("#ckbunker_status").show(); + }); + + $("#show_sphinxrelay_status").on("click", function() { + $("#show_sphinxrelay_status").hide(0); + $("#sphinxrelay_status").show(); + }); + $("#show_upgrade_status").on("click", function() { $("#show_upgrade_status").hide(0); $("#upgrade_status").show(); @@ -392,6 +402,26 @@
+
CKBunker Status
+
+
+ {{ ckbunker_status }} +
+ + +
+ + {% if lnd_wallet_exists %} +
Sphinx Relay Status
+
+
+ {{ sphinxrelay_status }} +
+ + +
+ {% endif %} + {% if is_netdata_enabled %}
Netdata Status
diff --git a/scripts/check_app_versions.py b/scripts/check_app_versions.py index 68d5b7b2..1060660b 100755 --- a/scripts/check_app_versions.py +++ b/scripts/check_app_versions.py @@ -18,7 +18,7 @@ apps = [{"name": "bitcoin/bitcoin", "current_version_var {"name": "Coldcard/ckbunker", "current_version_variable": "CKBUNKER_VERSION"}, {"name": "lnbits/lnbits", "current_version": "6cf4881"}, {"name": "apotdevin/thunderhub", "current_version_variable": "THUNDERHUB_VERSION"}, - {"name": "stakwork/sphinx-relay", "current_version_variable": "SPHINX_RELAY_VERSION"}, + {"name": "stakwork/sphinx-relay", "current_version_variable": "SPHINXRELAY_VERSION"}, {"name": "whirlpool/whirlpool-client-cli", "current_version": "v0.10.9"}, {"name": "dojo/samourai-dojo", "current_version": "v1.8.0"}, {"name": "JoinMarket-Org/joinmarket-clientserver", "current_version_variable": "JOINMARKET_VERSION"} diff --git a/setup/setup_device.sh b/setup/setup_device.sh index 3f3883a2..0e0018f2 100755 --- a/setup/setup_device.sh +++ b/setup/setup_device.sh @@ -786,23 +786,23 @@ fi # Upgrade Sphinx Relay -SPHINX_RELAY_UPGRADE_URL=https://github.com/stakwork/sphinx-relay/archive/$SPHINX_RELAY_VERSION.tar.gz +SPHINXRELAY_UPGRADE_URL=https://github.com/stakwork/sphinx-relay/archive/$SPHINXRELAY_VERSION.tar.gz CURRENT="" -if [ -f $SPHINX_RELAY_VERSION_FILE ]; then - CURRENT=$(cat $SPHINX_RELAY_VERSION_FILE) +if [ -f $SPHINXRELAY_VERSION_FILE ]; then + CURRENT=$(cat $SPHINXRELAY_VERSION_FILE) fi -if [ "$CURRENT" != "$SPHINX_RELAY_VERSION" ]; then +if [ "$CURRENT" != "$SPHINXRELAY_VERSION" ]; then cd /opt/mynode - rm -rf sphinx-relay - sudo -u bitcoin wget $SPHINX_RELAY_UPGRADE_URL -O sphinx-relay.tar.gz + rm -rf sphinxrelay + sudo -u bitcoin wget $SPHINXRELAY_UPGRADE_URL -O sphinx-relay.tar.gz sudo -u bitcoin tar -xvf sphinx-relay.tar.gz sudo -u bitcoin rm sphinx-relay.tar.gz - sudo -u bitcoin mv sphinx-relay-* sphinx-relay - cd sphinx-relay + sudo -u bitcoin mv sphinx-relay-* sphinxrelay + cd sphinxrelay sudo -u bitcoin npm install - echo $SPHINX_RELAY_VERSION > $SPHINX_RELAY_VERSION_FILE + echo $SPHINXRELAY_VERSION > $SPHINXRELAY_VERSION_FILE fi