better output

This commit is contained in:
rootzoll 2018-08-09 15:08:39 +02:00
parent 7590af34af
commit 0197988b8e

View file

@ -57,6 +57,7 @@ echo "COMMAND LINE: "
echo $command echo $command
echo "" echo ""
echo "RESULT:" echo "RESULT:"
sleep 2
# execute command # execute command
result=$($command 2>$_error) result=$($command 2>$_error)
@ -75,10 +76,12 @@ else
echo "WIN" echo "WIN"
echo "******************************" echo "******************************"
echo "${result}" echo "${result}"
echo ""
rhash=$(echo "$result" | grep r_hash | cut -d '"' -f4) rhash=$(echo "$result" | grep r_hash | cut -d '"' -f4)
payReq=$(echo "$result" | grep pay_req | cut -d '"' -f4) payReq=$(echo "$result" | grep pay_req | cut -d '"' -f4)
echo "Give this Invoice/PaymentRequest to someone to pay it:" echo "Give this Invoice/PaymentRequest to someone to pay it:"
echo ${payReq} echo ${payReq}
echo ""
echo "You can use 'lncli lookupinvoice ${rhash}' to check the payment. " echo "You can use 'lncli lookupinvoice ${rhash}' to check the payment. "
# TODO: Offer to go into monitor for incommin payment loop. # TODO: Offer to go into monitor for incommin payment loop.