From 5cc219803ca59f7a4d646a81e632945d39394024 Mon Sep 17 00:00:00 2001 From: Moul Date: Tue, 29 Dec 2015 08:03:44 -0500 Subject: [PATCH] Checking node availability. --- scripts/install | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/install b/scripts/install index 87de45a..10561ed 100755 --- a/scripts/install +++ b/scripts/install @@ -24,6 +24,14 @@ if [[ ! $? -eq 0 ]]; then exit 1 fi +# Check node availability +if curl --output /dev/null --silent --head --fail "$sync_node:$sync_port/node/summary"; then + echo "Node available." +else + echo "Node $sync_node:$sync_port not available" + exit 1 +fi + # Open port on firewall sudo yunohost firewall allow TCP $port > /dev/null 2>&1