From ee9239d0fb835a4d69aff127c59a11a33dd8ef92 Mon Sep 17 00:00:00 2001 From: Florian Zirker Date: Sat, 9 Jan 2021 22:08:39 +0100 Subject: [PATCH] loop it! --- pull-all.sh | 22 +++------------------- start-all.sh | 22 +++------------------- stop-all.sh | 22 +++------------------- 3 files changed, 9 insertions(+), 57 deletions(-) diff --git a/pull-all.sh b/pull-all.sh index 885c99a..369015c 100755 --- a/pull-all.sh +++ b/pull-all.sh @@ -1,21 +1,5 @@ #/bin/bash/ -cd proxy/ -docker-compose pull -cd .. - -cd heimdall/ -docker-compose pull -cd .. - -cd portainer/ -docker-compose pull -cd .. - -cd smartHome/ -docker-compose pull -cd .. - -cd monitoring/ -docker-compose pull -cd .. +for dir in ./*/ ; do + (cd "$dir" && echo "[$dir]" && docker-compose pull); +done diff --git a/start-all.sh b/start-all.sh index 3302ade..3dcbdd6 100755 --- a/start-all.sh +++ b/start-all.sh @@ -1,21 +1,5 @@ #/bin/bash/ -cd proxy/ -docker-compose up -d -cd .. - -cd heimdall/ -docker-compose up -d -cd .. - -cd portainer/ -docker-compose up -d -cd .. - -cd smartHome/ -docker-compose up -d -cd .. - -cd monitoring/ -docker-compose up -d -cd .. +for dir in ./*/ ; do + (cd "$dir" && echo "[$dir]" && docker-compose up -d); +done diff --git a/stop-all.sh b/stop-all.sh index 198643c..55db3d8 100755 --- a/stop-all.sh +++ b/stop-all.sh @@ -1,21 +1,5 @@ #/bin/bash/ -cd proxy/ -docker-compose down -cd .. - -cd heimdall/ -docker-compose down -cd .. - -cd portainer/ -docker-compose down -cd .. - -cd smartHome/ -docker-compose down -cd .. - -cd monitoring/ -docker-compose down -cd .. +for dir in ./*/ ; do + (cd "$dir" && echo "[$dir]" && docker-compose down); +done