fix(docker): generate PNG QR code for Zeus scanning
Terminal QR codes can be hard to scan. Generate a PNG file instead and open it with the default image viewer. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
8a3b38f352
commit
b46b415b4e
1 changed files with 14 additions and 2 deletions
|
|
@ -580,9 +580,21 @@ cmd_zeus() {
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
if command -v qrencode &> /dev/null; then
|
if command -v qrencode &> /dev/null; then
|
||||||
qrencode -t ANSIUTF8 -m 1 "$lndconnect"
|
local qr_file="$STATE_DIR/zeus-lndconnect.png"
|
||||||
|
qrencode -o "$qr_file" -s 6 -l L "$lndconnect"
|
||||||
|
echo -e "QR code saved to: ${GREEN}$qr_file${NC}"
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${DIM}Scan with Zeus to connect to lnd-3 (funding node)${NC}"
|
|
||||||
|
# Try to open the image
|
||||||
|
if command -v xdg-open &> /dev/null; then
|
||||||
|
xdg-open "$qr_file" 2>/dev/null &
|
||||||
|
echo -e "${DIM}Opening QR code image...${NC}"
|
||||||
|
elif command -v open &> /dev/null; then
|
||||||
|
open "$qr_file" 2>/dev/null &
|
||||||
|
echo -e "${DIM}Opening QR code image...${NC}"
|
||||||
|
else
|
||||||
|
echo -e "${DIM}Open the PNG file to scan with Zeus${NC}"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo -e "${DIM}$lndconnect${NC}"
|
echo -e "${DIM}$lndconnect${NC}"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue