cl: dispaly logs if unlock is unsuccessful #2866

This commit is contained in:
openoms 2022-01-16 19:53:31 +00:00
parent 2884a9ffc6
commit d902f4df12
No known key found for this signature in database
GPG Key ID: 5BFB77609B081B65

View File

@ -295,7 +295,13 @@ elif [ "$1" = "unlock" ]; then
# fail
elif [ $attempt -eq 12 ];then
echo "# Failed to unlock the ${netprefix}lightningd wallet - giving up after 1 minute"
echo "# Check: sudo journalctl -u ${netprefix}lightningd"
echo
echo "# The last lines of the ${netprefix}lightningd logs ('sudo tail -n 5 /home/bitcoin/.lightning/${CLNETWORK}/cl.log'):"
sudo tail -n 5 /home/bitcoin/.lightning/${CLNETWORK}/cl.log
echo
echo "# The last lines of the ${netprefix}lightningd journal ('sudo journalctl -u ${netprefix}lightningd'):"
sudo journalctl -n 5 -u ${netprefix}lightningd
echo
exit 1
fi
echo "# Waiting to unlock wallet ... "