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.
4
4
set -u # Treat unset variables as an error.
5
5
6
6
echo ' SELECT 1' | mysql & > /dev/null
7
- # [ -f /config/mysql/.initialized ] && echo 'SELECT 1' | mysql &> /dev/null
8
7
9
8
# 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.
6
6
mkdir -p /run/mysqld
7
7
chown $USER_ID :$GROUP_ID /run/mysqld
8
8
9
+ MYSQLD_CMD=" /usr/bin/mysqld --datadir /config/mysql --tmpdir /tmp/"
10
+
9
11
echo " [$( 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
11
19
12
20
# vim:ft=sh:ts=4:sw=4:et:sts=4
You can’t perform that action at this time.
0 commit comments