fix(installation): exit of script when docker swarm init fails

This commit is contained in:
Mauricio Siu
2024-10-21 21:50:26 -06:00
parent 76585991ec
commit d7071fba60
4 changed files with 16 additions and 1 deletions
+5
View File
@@ -59,6 +59,11 @@ install_dokploy() {
advertise_addr=$(get_ip)
docker swarm init --advertise-addr $advertise_addr
if [ $? -ne 0 ]; then
echo "Error: Failed to initialize Docker Swarm" >&2
exit 1
fi
echo "Swarm initialized"