Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
open-source
docker-pxc
Commits
febe9a87
Commit
febe9a87
authored
Feb 27, 2018
by
Fabio Montefuscolo
Browse files
give up bootstrap zoneinfo
parent
ca7afc3a
Pipeline
#3153
passed with stage
in 21 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
13 deletions
+5
-13
entrypoint/bootstrap.sh
entrypoint/bootstrap.sh
+5
-13
No files found.
entrypoint/bootstrap.sh
View file @
febe9a87
#!/bin/bash
bootstrap_sql_timezone
()
{
mysql_tzinfo_to_sql /usr/share/zoneinfo 2>&-
\
|
sed
's/Local time zone must be set--see zic manual page/FCTY/'
}
bootstrap_sql_root_user
()
{
cat
<<-
EOSQL
-- What's done in this file shouldn't be replicated
...
...
@@ -40,25 +34,23 @@ bootstrap_database () {
sql_file
=
"
${
PXC_HOME
}
/bootstrap.sql"
echo
'USE mysql;'
>
$sql_file
bootstrap_sql_root_user
|
tee
-a
"
$sql_file
"
bootstrap_sql_root_user
>>
"
$sql_file
"
if
[
-n
"
$MYSQL_DATABASE
"
]
;
then
bootstrap_sql_database
|
tee
-a
"
$sql_file
"
bootstrap_sql_database
>>
"
$sql_file
"
fi
if
[
-n
"
$MYSQL_USER
"
]
&&
[
-n
"
$MYSQL_PASSWORD
"
]
;
then
bootstrap_sql_user
|
tee
-a
$sql_file
bootstrap_sql_user
>>
$sql_file
if
[
-n
"
$MYSQL_DATABASE
"
]
;
then
bootstrap_sql_grant_user
|
tee
-a
"
$sql_file
"
bootstrap_sql_grant_user
>>
"
$sql_file
"
fi
fi
bootstrap_sql_timezone |
tee
-a
"
$sql_file
"
mysqld
\
--defaults-file
=
/etc/mysql/my.cnf
\
--user
=
mysql
\
...
...
@@ -67,5 +59,5 @@ bootstrap_database () {
--datadir
=
$PXC_DATA
\
--basedir
=
/usr
#
rm "$sql_file"
rm
"
$sql_file
"
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment