|
|
ebd438 |
# It's not recommended to modify this file in-place, because it will be
|
|
|
ebd438 |
# overwritten during package upgrades. If you want to customize, the
|
|
|
ebd438 |
# best way is to:
|
|
|
ebd438 |
#
|
|
|
ebd438 |
# root> systemctl edit @DAEMON_NAME@.service
|
|
|
ebd438 |
#
|
|
|
ebd438 |
# Then add additonal directives under a section (probably [Service]).
|
|
|
ebd438 |
#
|
|
|
ebd438 |
# For more info about custom unit files, see systemd.unit(5) or
|
|
|
ebd438 |
# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F
|
|
|
ebd438 |
#
|
|
|
ebd438 |
# For example, if you want to increase MariaDB's open-files-limit to 10000,
|
|
|
ebd438 |
# you need to increase systemd's LimitNOFILE setting, use the contents below:
|
|
|
ebd438 |
#
|
|
|
ebd438 |
# [Service]
|
|
|
ebd438 |
# LimitNOFILE=10000
|
|
|
ebd438 |
#
|
|
|
ebd438 |
|
|
|
ebd438 |
[Unit]
|
|
|
ebd438 |
Description=@NICE_PROJECT_NAME@ @MAJOR_VERSION@.@MINOR_VERSION@ database server
|
|
|
ebd438 |
Documentation=man:mariadbd(8)
|
|
|
ebd438 |
Documentation=https://mariadb.com/kb/en/library/systemd/
|
|
|
ebd438 |
After=network.target
|
|
|
ebd438 |
|
|
|
ebd438 |
[Install]
|
|
|
ebd438 |
WantedBy=multi-user.target
|
|
|
ebd438 |
Alias=mysql.service
|
|
|
ebd438 |
Alias=mysqld.service
|
|
|
ebd438 |
|
|
|
ebd438 |
[Service]
|
|
|
ebd438 |
Type=notify
|
|
|
ebd438 |
User=mysql
|
|
|
ebd438 |
Group=mysql
|
|
|
ebd438 |
|
|
|
ebd438 |
ExecStartPre=@libexecdir@/mariadb-check-socket
|
|
|
ebd438 |
# '%n' expands to 'Full unit name'; man systemd.unit
|
|
|
ebd438 |
ExecStartPre=@libexecdir@/mariadb-prepare-db-dir %n
|
|
|
ebd438 |
# MYSQLD_OPTS here is for users to set in /etc/systemd/system/@DAEMON_NAME@@.service.d/MY_SPECIAL.conf
|
|
|
ebd438 |
# Note: we set --basedir to prevent probes that might trigger SELinux alarms,
|
|
|
ebd438 |
# per bug #547485
|
|
|
ebd438 |
ExecStart=@libexecdir@/mariadbd --basedir=@prefix@ $MYSQLD_OPTS $_WSREP_NEW_CLUSTER
|
|
|
ebd438 |
ExecStartPost=@libexecdir@/mariadb-check-upgrade
|
|
|
ebd438 |
|
|
|
ebd438 |
# Setting this to true can break replication and the Type=notify settings
|
|
|
ebd438 |
# See also bind-address MariaDB option.
|
|
|
ebd438 |
PrivateNetwork=false
|
|
|
ebd438 |
|
|
|
ebd438 |
KillSignal=SIGTERM
|
|
|
ebd438 |
|
|
|
ebd438 |
# Don't want to see an automated SIGKILL ever
|
|
|
ebd438 |
SendSIGKILL=no
|
|
|
ebd438 |
|
|
|
ebd438 |
# Restart crashed server only, on-failure would also restart, for example, when
|
|
|
ebd438 |
# my.cnf contains unknown option
|
|
|
ebd438 |
Restart=on-abort
|
|
|
ebd438 |
RestartSec=5s
|
|
|
ebd438 |
|
|
|
ebd438 |
UMask=007
|
|
|
ebd438 |
|
|
|
ebd438 |
# Give a reasonable amount of time for the server to start up/shut down
|
|
|
ebd438 |
TimeoutSec=300
|
|
|
ebd438 |
|
|
|
ebd438 |
# Place temp files in a secure directory, not /tmp
|
|
|
ebd438 |
PrivateTmp=true
|