Skip to content

Commit 4379c92

Browse files
authored
Merge pull request #88 from yriveiro/initdb-fix
Fix permission error on initdb.d scripts
2 parents 7484bea + 1f5ed12 commit 4379c92

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

root/etc/cont-init.d/40-initialise-db

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,17 @@ GRANT ALL ON *.* TO 'root'@'%' WITH GRANT OPTION ;
7373
DROP DATABASE IF EXISTS test ;
7474
$MYSQL_DB_SETUP
7575
EONEWSQL
76-
chown -R abc:abc "${tempSqlFile}"
76+
7777
echo "Setting Up Initial Databases"
7878

7979
# add all sql from a user defined directory on first init
8080
if [ -e "/config/initdb.d" ] && [ -n "$(/bin/ls -A /config/initdb.d/*.sql 2>/dev/null)" ]; then
8181
cat /config/initdb.d/*.sql >> "${tempSqlFile}"
8282
fi
8383

84+
chown -R abc:abc "${tempSqlFile}"
85+
86+
8487
# ingest remote sql if REMOTE_SQL is set
8588
if [ -n "${REMOTE_SQL+set}" ]; then
8689
IFS=, read -ra URLS <<< "${REMOTE_SQL}"

0 commit comments

Comments
 (0)