fix: only check dc when changed

This commit is contained in:
Strix 2023-10-26 17:04:50 +02:00
parent 2a063efcf3
commit 7c455db717
No known key found for this signature in database
GPG key ID: 49B2E37B8915B774
2 changed files with 10 additions and 1 deletions

4
.gitignore vendored
View file

@ -1,2 +1,4 @@
# development
servers/ryuk
servers/ryuk
# tempfiles
.neb/

View file

@ -3,6 +3,13 @@
set -e
for s in servers/*; do
sum="$(cat $s/docker-compose.d/*.yml | sha1sum)"
if [ -f .neb/$s/dc-sum.txt ]; then
[ "$(cat .neb/$s/dc-sum.txt)" = "$sum" ] && continue
else
mkdir -p .neb/$s
fi
echo "checking $s..."
HOSTNAME=$(echo $s | sed 's/servers\///') bash tools/server-docker-compose.sh config -q
echo "$sum" > .neb/$s/dc-sum.txt
done