File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
rootfs/etc/services.d/mysqld Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,5 @@ set -e # Exit immediately if a command exits with a non-zero status.
44set -u # Treat unset variables as an error.
55
66echo ' SELECT 1' | mysql & > /dev/null
7- # [ -f /config/mysql/.initialized ] && echo 'SELECT 1' | mysql &> /dev/null
87
98# vim:ft=sh:ts=4:sw=4:et:sts=4
Original file line number Diff line number Diff line change @@ -6,7 +6,15 @@ set -u # Treat unset variables as an error.
66mkdir -p /run/mysqld
77chown $USER_ID :$GROUP_ID /run/mysqld
88
9+ MYSQLD_CMD=" /usr/bin/mysqld --datadir /config/mysql --tmpdir /tmp/"
10+
911echo " [$( basename " $( pwd) " ) ] starting..."
10- exec s6-applyuidgid -u $USER_ID -g $GROUP_ID -G ${SUP_GROUP_IDS:- $GROUP_ID } /usr/bin/mysqld --datadir /config/mysql --tmpdir /tmp/
12+ if [ -d /var/run/s6/services/mysqld ]; then
13+ # Supervisor is running.
14+ exec /bin/s6-notifyoncheck s6-applyuidgid -u $USER_ID -g $GROUP_ID -G ${SUP_GROUP_IDS:- $GROUP_ID } $MYSQLD_CMD
15+ else
16+ # Supervisor is not running: we are starting the db from the init script.
17+ exec s6-applyuidgid -u $USER_ID -g $GROUP_ID -G ${SUP_GROUP_IDS:- $GROUP_ID } $MYSQLD_CMD
18+ fi
1119
1220# vim:ft=sh:ts=4:sw=4:et:sts=4
You can’t perform that action at this time.
0 commit comments