1a9ad16ed8
If systemd is used we should enable support in mariadb and enable "Type=notify" in the mysqld.service unit file "Type=notify" stops systemd from starting services which depend on mariadb until it has notified systemd that it has finished starting up, this helps avoid startup race conditions Signed-off-by: Danny Wood <danny@rotronics.co.uk> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
17 lines
459 B
Desktop File
17 lines
459 B
Desktop File
[Unit]
|
|
Description=MySQL database server
|
|
|
|
[Service]
|
|
ExecStartPre=/bin/sh -c 'test "`ls -1 /var/lib/mysql | wc -l`" != "0" || mysql_install_db --basedir=/usr --datadir=/var/lib/mysql'
|
|
ExecStartPre=!install -d -o mysql -g root -m 0755 /var/log/mysql
|
|
ExecStart=/usr/bin/mysqld_safe --log-error=/var/log/mysql/mysqld.log
|
|
Restart=always
|
|
User=mysql
|
|
RuntimeDirectory=mysql
|
|
RuntimeDirectoryMode=0755
|
|
Type=notify
|
|
NotifyAccess=all
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|