Skip to content

Commit 6bba352

Browse files
authored
Merge pull request #16 from linuxserver/shutdown
Fix shutdown of mysql
2 parents 8b65943 + c14d1dc commit 6bba352

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ Find custom.cnf in /config for config changes (restart container for them to tak
8989

9090
## Versions
9191

92+
+ **12.09.17:** Gracefully shut down mariadb
9293
+ **27.10.16:** Implement linting suggestions on database init script.
9394
+ **11.10.16:** Rebase to ubuntu xenial, add version labelling.
9495
+ **09.03.16:** Update to mariadb 10.1. Change to use custom.cnf over my.cnf in /config. Restructured init files to change config options on startup, rather than in the dockerfile.

root/etc/services.d/mariadb/run

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
#!/usr/bin/with-contenv bash
2-
exec \
3-
s6-setuidgid abc /usr/bin/mysqld_safe
2+
3+
_term() {
4+
echo "Caught SIGTERM signal!"
5+
kill -TERM "$(cat /var/run/mysqld/mysqld.pid)" 2>/dev/null
6+
}
7+
8+
trap _term SIGTERM
9+
10+
s6-setuidgid abc /usr/bin/mysqld_safe &
11+
12+
wait

0 commit comments

Comments
 (0)