Code Review
/
oom.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "[CONTRIB] Add requests/limits to EJBCA"
[oom.git]
/
kubernetes
/
so
/
components
/
so-mariadb
/
resources
/
config
/
docker-entrypoint-initdb.d
/
99-create-so-admin.sh
diff --git
a/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/99-create-so-admin.sh
b/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/99-create-so-admin.sh
index
adb28fe
..
5296748
100755
(executable)
--- a/
kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/99-create-so-admin.sh
+++ b/
kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/99-create-so-admin.sh
@@
-1,4
+1,5
@@
#!/bin/sh
#!/bin/sh
+{{/*
#
# ============LICENSE_START==========================================
# ===================================================================
#
# ============LICENSE_START==========================================
# ===================================================================
@@
-20,9
+21,17
@@
# ECOMP and OpenECOMP are trademarks
# and service marks of AT&T Intellectual Property.
#
# ECOMP and OpenECOMP are trademarks
# and service marks of AT&T Intellectual Property.
#
+*/}}
echo "Creating so admin user . . ." 1>/tmp/mariadb-so-admin.log 2>&1
echo "Creating so admin user . . ." 1>/tmp/mariadb-so-admin.log 2>&1
+prepare_password()
+{
+ echo "$1" | sed -e "s/'/\\\\'/g; s/\"/\\\\\"/g"
+}
+
+DB_ADMIN_PASSWORD=`prepare_password $DB_ADMIN_PASSWORD`
+
mysql -uroot -p$MYSQL_ROOT_PASSWORD << EOF || exit 1
DROP USER IF EXISTS '${DB_ADMIN}';
CREATE USER '${DB_ADMIN}';
mysql -uroot -p$MYSQL_ROOT_PASSWORD << EOF || exit 1
DROP USER IF EXISTS '${DB_ADMIN}';
CREATE USER '${DB_ADMIN}';