ganapathi / rpms / mariadb

Forked from rpms/mariadb 4 years ago
Clone
2a2834
# It's not recommended to modify this file in-place, because it will be
2a2834
# overwritten during package upgrades.  If you want to customize, the
2a2834
# best way is to create a file "/etc/systemd/system/mariadb.service",
2a2834
# containing
2a2834
#	.include /lib/systemd/system/mariadb.service
2a2834
#	...make your changes here...
2a2834
# or create a file "/etc/systemd/system/mariadb.service.d/foo.conf",
2a2834
# which doesn't need to include ".include" call and which will be parsed
2a2834
# after the file mariadb.service itself is parsed.
2a2834
#
2a2834
# For more info about custom unit files, see systemd.unit(5) or
2a2834
# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F
2a2834
2a2834
# For example, if you want to increase mariadb's open-files-limit to 10000,
2a2834
# you need to increase systemd's LimitNOFILE setting, so create a file named
2a2834
# "/etc/systemd/system/mariadb.service.d/limits.conf" containing:
2a2834
#	[Service]
2a2834
#	LimitNOFILE=10000
2a2834
2a2834
# Note: /usr/lib/... is recommended in the .include line though /lib/... 
2a2834
# still works.
2a2834
# Don't forget to reload systemd daemon after you change unit configuration:
2a2834
# root> systemctl --system daemon-reload
2a2834
2a2834
[Unit]
2a2834
Description=MariaDB database server
2a2834
After=syslog.target
2a2834
After=network.target
2a2834
2a2834
[Service]
2a2834
Type=simple
2a2834
User=mysql
2a2834
Group=mysql
2a2834
2a2834
ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n
2a2834
# Note: we set --basedir to prevent probes that might trigger SELinux alarms,
2a2834
# per bug #547485
2a2834
ExecStart=/usr/bin/mysqld_safe --basedir=/usr
2a2834
ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID
2a2834
2a2834
# Give a reasonable amount of time for the server to start up/shut down
2a2834
TimeoutSec=300
2a2834
2a2834
# Place temp files in a secure directory, not /tmp
2a2834
PrivateTmp=true
2a2834
2a2834
[Install]
2a2834
WantedBy=multi-user.target