mirror of
https://github.com/YunoHost-Apps/duniter_ynh.git
synced 2024-09-03 18:26:35 +02:00
Checking node availability.
This commit is contained in:
parent
c92162d5d8
commit
752856dc78
1 changed files with 8 additions and 0 deletions
|
@ -24,6 +24,14 @@ if [[ ! $? -eq 0 ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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
|
# Open port on firewall
|
||||||
sudo yunohost firewall allow TCP $port > /dev/null 2>&1
|
sudo yunohost firewall allow TCP $port > /dev/null 2>&1
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue