From 5c2bdcb954e7a43722cc595dae77b1c995057228 Mon Sep 17 00:00:00 2001 From: steepdawn974 Date: Sat, 4 Jan 2025 00:06:49 +0100 Subject: [PATCH] fix: add qrencode dependency check to cl-plugin.clnrest.sh Adds automatic check and installation of qrencode package if missing to prevent 'command not found' errors when generating QR codes. --- home.admin/config.scripts/cl-plugin.clnrest.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/home.admin/config.scripts/cl-plugin.clnrest.sh b/home.admin/config.scripts/cl-plugin.clnrest.sh index d8014d760..d6f945a0f 100644 --- a/home.admin/config.scripts/cl-plugin.clnrest.sh +++ b/home.admin/config.scripts/cl-plugin.clnrest.sh @@ -11,6 +11,12 @@ fi # check and load raspiblitz config to know which network is running source /mnt/hdd/raspiblitz.conf +# check and install qrencode if not present +if [ $(dpkg-query -l | grep "ii qrencode" | wc -l) = 0 ]; then + echo "# Installing qrencode..." + sudo apt-get install -y qrencode >/dev/null 2>&1 +fi + echo "# Running: 'cl-plugin.clnrest.sh $*'" source <(/home/admin/config.scripts/network.aliases.sh getvars cl $2)