mirror of
https://github.com/bitnami/containers.git
synced 2026-03-21 15:29:05 +08:00
Add pineapple and mariadb
This commit is contained in:
19
bitnami/mariadb/entrypoint.sh
Executable file
19
bitnami/mariadb/entrypoint.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
# if command starts with an option, prepend mysqld
|
||||
if [ "${1:0:1}" = '-' ]; then
|
||||
EXTRA_OPTIONS=" $@"
|
||||
set -- mysqld.bin
|
||||
fi
|
||||
|
||||
|
||||
if [ "$1" = 'mysqld.bin' ]; then
|
||||
set -- "$@" --defaults-file=/opt/bitnami/mysql/my.cnf --basedir=/opt/bitnami/mysql --datadir=/opt/bitnami/mysql/data --plugin-dir=/opt/bitnami/mysql/lib/plugin --user=mysql --socket=/opt/bitnami/mysql/tmp/mysql.sock$EXTRA_OPTIONS
|
||||
|
||||
if [ ! "$(ls -A /data)" ]; then
|
||||
su mysql -c "sh /opt/bitnami/mysql/scripts/myscript.sh /opt/bitnami/mysql bitnami"
|
||||
/opt/bitnami/mysql/scripts/ctl.sh stop mysql > /dev/null
|
||||
fi
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user