From cff4f221c636cdb2a98be5cb7a9445c82329f387 Mon Sep 17 00:00:00 2001 From: Thord Johansson Date: Tue, 26 Mar 2024 01:26:00 +0100 Subject: [PATCH] Updated .gitignore to include .sh files and added helper scripts --- .gitignore | 3 ++- naspi/startall.sh | 10 ++++++++++ thinkcentre/startall.sh | 10 ++++++++++ thinkcentre/update.sh | 3 +++ 4 files changed, 25 insertions(+), 1 deletion(-) create mode 100755 naspi/startall.sh create mode 100755 thinkcentre/startall.sh create mode 100755 thinkcentre/update.sh diff --git a/.gitignore b/.gitignore index 334586a..36e8614 100644 --- a/.gitignore +++ b/.gitignore @@ -8,8 +8,9 @@ volumes/ */*/*/* -# only allow .yml files +# only allow .yml and .sh files !*.yml +!*.sh !*.md !.gitignore diff --git a/naspi/startall.sh b/naspi/startall.sh new file mode 100755 index 0000000..64eef51 --- /dev/null +++ b/naspi/startall.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +if [ $(basename $PWD) != $(hostname) ]; then + echo "Incorrect directory for host" + exit 1 +fi + +# will skip folders with a leading "_" (indicating not used) + +for d in ./[^_]*/ ; do (cd $d && docker-compose up -d && cd ..); done diff --git a/thinkcentre/startall.sh b/thinkcentre/startall.sh new file mode 100755 index 0000000..64eef51 --- /dev/null +++ b/thinkcentre/startall.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +if [ $(basename $PWD) != $(hostname) ]; then + echo "Incorrect directory for host" + exit 1 +fi + +# will skip folders with a leading "_" (indicating not used) + +for d in ./[^_]*/ ; do (cd $d && docker-compose up -d && cd ..); done diff --git a/thinkcentre/update.sh b/thinkcentre/update.sh new file mode 100755 index 0000000..a231576 --- /dev/null +++ b/thinkcentre/update.sh @@ -0,0 +1,3 @@ +#!/bin/bash +docker pull containrrr/watchtower +docker run -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --run-once