Skip to content

Commit

Permalink
refactor: 💡 docker and empty pub keys exit
Browse files Browse the repository at this point in the history
  • Loading branch information
heldrida committed Oct 20, 2023
1 parent 3fc359e commit 9af0d94
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/node_details
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ echo
if [[ -f "$defaultLightningSystemdServicePathForDocker" ]] && grep -q 'docker run' "$defaultLightningSystemdServicePathForDocker"; then
echo "✅ Docker Lightning CLI found!"

sleep 5

# if [[ $(sudo docker container inspect -f '{{.State.Running}}' "$defaultDockerContainerName") = "false" ]]; then
# read -rp "🤖 The Docker $defaultDockerContainerName isn't running and is going to be started. Presse ENTER to continue..."

Expand Down Expand Up @@ -179,6 +181,13 @@ hasStake=$(curl -sX POST \
-H 'Content-Type: application/json' \
-d "{\"id\":1,\"jsonrpc\":\"2.0\",\"method\":\"flk_get_node_info\",\"params\":[\"$nodePubKey\"]}" | grep -Eo '"staked"[^,]*' | grep -Eo '[^:]*$' | cut -d "\"" -f 2)

if [[ "$nodePubKey" -eq "" || "$consensusPubKey" -eq "" ]]; then
echo "👹 Oops! Failed to get the public keys. Try again later!"
echo "⚠️ WARNING: If this issue persists, report to us via our discord. Thank you!"

exit 1
fi

echo
echo
echo "🤖 Your server details are the following"
Expand Down

0 comments on commit 9af0d94

Please sign in to comment.