Skip to content

Commit 4f22879

Browse files
authored
Fix shutdown of mariadb
1 parent 8b65943 commit 4f22879

File tree

1 file changed

+11
-2
lines changed
  • root/etc/services.d/mariadb

1 file changed

+11
-2
lines changed

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)