diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 12:47:21 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 12:47:21 +0000 |
commit | 1ac4a2050c8076eb96e07e83721ebc9db864db94 (patch) | |
tree | da9b32212bf99154450a7668f61a75f65617a9fa /test/docker/docker-entrypoint-initdb.d/icinga.sh | |
parent | Initial commit. (diff) | |
download | icingaweb2-module-toplevelview-1ac4a2050c8076eb96e07e83721ebc9db864db94.tar.xz icingaweb2-module-toplevelview-1ac4a2050c8076eb96e07e83721ebc9db864db94.zip |
Adding upstream version 0.3.3.upstream/0.3.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/docker/docker-entrypoint-initdb.d/icinga.sh')
-rw-r--r-- | test/docker/docker-entrypoint-initdb.d/icinga.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/docker/docker-entrypoint-initdb.d/icinga.sh b/test/docker/docker-entrypoint-initdb.d/icinga.sh new file mode 100644 index 0000000..b0538d4 --- /dev/null +++ b/test/docker/docker-entrypoint-initdb.d/icinga.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +set -ex + +: ${MYSQL_ROOT_PASSWORD:=} +: ${MYSQL_USER:=} + +export MYSQL_PWD="${MYSQL_ROOT_PASSWORD}" + +mysql -e "DROP DATABASE IF EXISTS icinga" +mysql -e "CREATE DATABASE icinga" +mysql -e "GRANT ALL ON icinga.* TO '${MYSQL_USER}'@'%'" +mysql -e "DROP DATABASE IF EXISTS icinga_legacy" +mysql -e "CREATE DATABASE icinga_legacy" +mysql -e "GRANT ALL ON icinga_legacy.* TO '${MYSQL_USER}'@'%'" +mysql icinga < /docker-entrypoint-initdb.d/icinga/ido-mysql.sql +mysql icinga < /docker-entrypoint-initdb.d/icinga/ido-data.sql +mysql icinga_legacy < /docker-entrypoint-initdb.d/icinga/ido-mysql.sql +mysql icinga_legacy < /docker-entrypoint-initdb.d/icinga/ido-legacy-data.sql |