From 3a998ff4cadacd04c58e82cae0db597442da5f9c Mon Sep 17 00:00:00 2001 From: Djuri Baars Date: Mon, 20 Jun 2022 20:06:37 +0200 Subject: [PATCH] Fix Umbrel detection and make it work with 0.5.0 --- igniter.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/igniter.sh b/igniter.sh index efd1c34..6724152 100755 --- a/igniter.sh +++ b/igniter.sh @@ -17,8 +17,14 @@ IFS=, eval 'HOPS="${pub_keys[*]}"' # If an umbrel, use docker, else call lncli directly. Also setup dependencies accordingly. LNCLI="lncli" -if uname -a | grep umbrel > /dev/null; then - LNCLI="docker exec -i lnd lncli" +if [ -d "$HOME/umbrel" ] ; then + # Umbrel < 0.5.x + if [ "docker ps -q -f name=^lnd$" ] ; then + LNCLI="docker exec -i lnd lncli" + # Umbrel >= 0.5.x + else + LNCLI="$HOME/umbrel/scripts/app compose lightning exec lnd lncli" + fi dependencies="cat jq" else dependencies="cat jq lncli"