From c24e2d0cac18f1c362d1be519733e2337bf8a3a0 Mon Sep 17 00:00:00 2001 From: tlindi Date: Tue, 28 Oct 2025 21:56:28 +0200 Subject: [PATCH] Update albyhub.service to support phoenixd Enable use of phoenixd config by creating following empty flag file: /mnt/hdd/mynode/settings/albyhub_conf_phoenixd --- .../share/mynode_apps/albyhub/albyhub.service | 46 +++++++++++++------ 1 file changed, 31 insertions(+), 15 deletions(-) diff --git a/rootfs/standard/usr/share/mynode_apps/albyhub/albyhub.service b/rootfs/standard/usr/share/mynode_apps/albyhub/albyhub.service index fdef4dc6f..c9c79b0de 100644 --- a/rootfs/standard/usr/share/mynode_apps/albyhub/albyhub.service +++ b/rootfs/standard/usr/share/mynode_apps/albyhub/albyhub.service @@ -11,20 +11,36 @@ WorkingDirectory=/opt/mynode/albyhub ExecStartPre=/usr/bin/is_not_shutting_down.sh ExecStartPre=/bin/bash -c 'if [ -f /usr/bin/service_scripts/pre_albyhub.sh ]; then /bin/bash /usr/bin/service_scripts/pre_albyhub.sh; fi' -ExecStart=docker run --rm \ - --name albyhub \ - --publish 3040:8080 \ - --add-host=host.docker.internal:host-gateway \ - --volume /mnt/hdd/mynode/albyhub:/data \ - --volume /mnt/hdd/mynode/lnd/tls.cert:/lnd/tls.cert \ - --volume /mnt/hdd/mynode/lnd/data/chain/bitcoin/mainnet/admin.macaroon:/lnd/admin.macaroon \ - --env WORK_DIR="/data" \ - --env LN_BACKEND_TYPE="LND" \ - --env LND_ADDRESS="host.docker.internal:10009" \ - --env LND_CERT_FILE="/lnd/tls.cert" \ - --env LND_MACAROON_FILE="/lnd/admin.macaroon" \ - --env ENABLE_ADVANCED_SETUP=false \ - albyhub + +ExecStart=/bin/bash -c 'if [ ! -f /mnt/hdd/mynode/settings/albyhub_conf_phoenixd ]; then \ + docker run --rm \ + --name albyhub \ + --publish 3040:8080 \ + --add-host=host.docker.internal:host-gateway \ + --volume /mnt/hdd/mynode/albyhub:/data \ + --volume /mnt/hdd/mynode/lnd/tls.cert:/lnd/tls.cert \ + --volume /mnt/hdd/mynode/lnd/data/chain/bitcoin/mainnet/admin.macaroon:/lnd/admin.macaroon \ + --env WORK_DIR="/data" \ + --env LN_BACKEND_TYPE=LND \ + --env LND_ADDRESS="host.docker.internal:10009" \ + --env LND_CERT_FILE="/lnd/tls.cert" \ + --env LND_MACAROON_FILE="/lnd/admin.macaroon" \ + --env ENABLE_ADVANCED_SETUP=false \ + albyhub; \ + else \ + docker run --rm \ + --name albyhub \ + --publish 3040:8080 \ + --add-host=host.docker.internal:host-gateway \ + --volume /mnt/hdd/mynode/albyhub:/data \ + --env WORK_DIR="/data" \ + --env LN_BACKEND_TYPE=PHOENIX \ + --env PHOENIXD_ADDRESS="http://172.17.0.1:9740" \ + --env PHOENIXD_AUTHORIZATION=$(grep -E "^http-password=" /mnt/hdd/mynode/phoenixd/phoenix.conf | cut -d"=" -f2) \ + --env ENABLE_ADVANCED_SETUP=false \ + albyhub; \ + fi' + ExecStartPost=/bin/bash -c 'if [ -f /usr/bin/service_scripts/post_albyhub.sh ]; then /bin/bash /usr/bin/service_scripts/post_albyhub.sh; fi' ExecStop=docker stop -t 2 albyhub @@ -37,4 +53,4 @@ RestartSec=60 SyslogIdentifier=albyhub [Install] -WantedBy=multi-user.target +WantedBy=multi-user.target \ No newline at end of file