From e0fedaf4a53eddf146b7615aba8266028a12a85e Mon Sep 17 00:00:00 2001 From: root Date: Mon, 26 Feb 2024 18:40:31 +0000 Subject: [PATCH] Added start all and stop all to skip if service not installed --- bin/start | 3 +++ bin/stop | 3 +++ 2 files changed, 6 insertions(+) diff --git a/bin/start b/bin/start index 09d3cc5..853056c 100755 --- a/bin/start +++ b/bin/start @@ -66,6 +66,9 @@ startservice() { } startservice_all() { for SERVICE in "${SERVICES[@]}"; do + # If app isn't installed then skip + [ ! -d "/federated/apps/$SERVICE" ] && echo "* $SERVICE not installed, skipping." && continue + FAILED="no" if [ "$SERVICE" = "jitsi" ]; then if [ "$(docker container inspect -f '{{.State.Status}}' jitsi_web_1 2>/dev/null)" = "running" ]; then diff --git a/bin/stop b/bin/stop index 07fa42f..5b56e8f 100755 --- a/bin/stop +++ b/bin/stop @@ -14,6 +14,9 @@ stopservice() { } stopservice_all() { for i in "${SERVICES[@]}"; do + # If app isn't installed then skip + [ ! -d "/federated/apps/$i" ] && echo "* $i not installed, skipping." && continue + echo "* Stopping $i.." cd /federated/apps/$i && docker-compose -f docker-compose.yml -p $i down done