New services, cleanup, readme

This commit is contained in:
2021-09-03 10:52:44 +02:00
parent 05c8d61e0a
commit a0e3ff6375
5 changed files with 225 additions and 13 deletions

21
hass/wait-for-db.sh Normal file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
# wait-for-db.sh
set -e
host=${WAITDB_HOST}
user=${WAITDB_USER}
pass=${WAITDB_PASS}
echo "$host $user $pass"
if [[ -v host ]]; then
until mysql --host="$host" --user="$user" --password="$pass" -e '\q'; do
>&2 echo "Database unavailable - sleeping"
sleep 1
done
>&2 echo "Database available!"
fi
>&2 echo "Executing command"
exec "$@"