Added start all and stop all to skip if service not installed

This commit is contained in:
root 2024-02-26 18:40:31 +00:00
parent 41c5ba51b7
commit e0fedaf4a5
2 changed files with 6 additions and 0 deletions

View File

@ -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

View File

@ -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