From 254d1a1ba2beb8b61d6c86f74ee5ecb378fbd5d6 Mon Sep 17 00:00:00 2001 From: Taylor Helsper Date: Tue, 27 Apr 2021 23:10:54 -0500 Subject: [PATCH] Use proper electrs binary on RP4 ARM vs ARM64 --- rootfs/standard/etc/systemd/system/electrs.service | 1 - rootfs/standard/usr/bin/mynode_startup.sh | 9 +++++++++ rootfs/standard/var/www/mynode/application_info.py | 3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/rootfs/standard/etc/systemd/system/electrs.service b/rootfs/standard/etc/systemd/system/electrs.service index 2de905ac..973af5f8 100644 --- a/rootfs/standard/etc/systemd/system/electrs.service +++ b/rootfs/standard/etc/systemd/system/electrs.service @@ -9,7 +9,6 @@ After=bitcoin.service [Service] Type=simple KillMode=process -EnvironmentFile=/mnt/hdd/mynode/settings/.btcrpc_environment ExecStartPre=/usr/bin/is_not_shutting_down.sh ExecStartPre=/usr/bin/wait_on_bitcoin.sh ExecStart=/usr/bin/electrs --conf=/mnt/hdd/mynode/electrs/electrs.toml -vvvv diff --git a/rootfs/standard/usr/bin/mynode_startup.sh b/rootfs/standard/usr/bin/mynode_startup.sh index 8df6ca08..00d2e9ee 100755 --- a/rootfs/standard/usr/bin/mynode_startup.sh +++ b/rootfs/standard/usr/bin/mynode_startup.sh @@ -338,6 +338,15 @@ if [ -f /mnt/hdd/mynode/settings/.testnet_enabled ]; then else sed -i "s/testnet/bitcoin/g" /mnt/hdd/mynode/electrs/electrs.toml || true fi +if [ $IS_RASPI4_ARM64 -eq 1 ]; then + if [ -f /usr/bin/electrs ] && [ -f /usr/bin/electrs_arm64 ]; then + MD5_1=$(md5sum /usr/bin/electrs | cut -d' ' -f 1) + MD5_2=$(md5sum /usr/bin/electrs_arm64 | cut -d' ' -f 1) + if [ "${MD5_1}" != "{$MD5_2}" ]; then + cp -f /usr/bin/electrs_arm64 /usr/bin/electrs + fi + fi +fi # RTL config sudo -u bitcoin mkdir -p /opt/mynode/RTL diff --git a/rootfs/standard/var/www/mynode/application_info.py b/rootfs/standard/var/www/mynode/application_info.py index 2106e8e8..66e7b087 100644 --- a/rootfs/standard/var/www/mynode/application_info.py +++ b/rootfs/standard/var/www/mynode/application_info.py @@ -272,7 +272,8 @@ def initialize_applications(): short_name="sphinxrelay", app_tile_button_text="Info", app_tile_button_href="/sphinxrelay", - app_tile_default_status_text="Chat", + app_tile_default_status_text="Sphinx Chat Backend", + app_tile_running_status_text="Running", requires_lightning=True, show_on_homepage=True, homepage_order=34,