Skip to content

Commit

Permalink
rm invoice png/txt
Browse files Browse the repository at this point in the history
  • Loading branch information
nayuta-ueno committed Jul 25, 2019
1 parent 1d3a6d4 commit d47c06d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion get_invoice.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ gpio write ${LED1} ${LED_ON}
exec 9< $0
flock -n 9 || exit 1

sudo rm -f ${PROGDIR}/invoice.png ${PROGDIR}/invoice.txt

DESC=`echo $2 | sed 's/"//g'`
${PTARMDIR}/ptarmcli -i $1 --description="${DESC}" --no-rfield | jq -r '.result.bolt11' | tr -d '\n' > ${PROGDIR}/invoice.txt
qrencode -s 2 -o ${PROGDIR}/invoice.png `cat ${PROGDIR}/invoice.txt`
python3 ${EPAPERDIR}/epaper.py ${PROGDIR}/invoice.png

gpio write ${LED1} ${LED_OFF}

0 comments on commit d47c06d

Please sign in to comment.