Blame SOURCES/mysql@.service.in

47f670
# It's not recommended to modify this file in-place, because it will be
47f670
# overwritten during package upgrades.  If you want to customize, the
47f670
# best way is to use systemctl edit:
47f670
#
47f670
# $ systemctl edit @DAEMON_NAME@.service
47f670
#
47f670
# this will create file
47f670
#
47f670
#  /etc/systemd/system/@DAEMON_NAME@.service.d/override.conf
47f670
#
47f670
# which be parsed after the file @DAEMON_NAME@.service itself is parsed.
47f670
#
47f670
# For example, if you want to increase mysql's open-files-limit to 20000
47f670
# add following when editing with command above:
47f670
#
47f670
#	[Service]
47f670
#	LimitNOFILE=20000
47f670
#
47f670
# Or if you require to execute pre and post scripts in the unit file as root, set
47f670
#       PermissionsStartOnly=true
47f670
#
47f670
# For more info about custom unit files, see systemd.unit(5) or
47f670
# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F
47f670
#
47f670
# Don't forget to reload systemd daemon after you change unit configuration:
47f670
# root> systemctl --system daemon-reload
47f670
47f670
[Unit]
47f670
Description=@NICE_PROJECT_NAME@ @MAJOR_VERSION@.@MINOR_VERSION@ database server
47f670
After=syslog.target
47f670
After=network.target
47f670
47f670
[Service]
47f670
Type=notify
47f670
User=mysql
47f670
Group=mysql
47f670
47f670
ExecStartPre=@libexecdir@/mysql-check-socket --defaults-group-suffix=.%I
47f670
ExecStartPre=@libexecdir@/mysql-prepare-db-dir --defaults-group-suffix=.%I %n
47f670
# Note: we set --basedir to prevent probes that might trigger SELinux alarms,
47f670
# per bug #547485
47f670
ExecStart=@libexecdir@/mysqld --defaults-group-suffix=.%I --basedir=@prefix@
47f670
ExecStartPost=@libexecdir@/mysql-check-upgrade --defaults-group-suffix=.%I
47f670
ExecStopPost=@libexecdir@/mysql-wait-stop --defaults-group-suffix=.%I
47f670
47f670
# Give a reasonable amount of time for the server to start up/shut down
47f670
TimeoutSec=300
47f670
47f670
# Place temp files in a secure directory, not /tmp
47f670
PrivateTmp=true
47f670
47f670
Restart=on-failure
47f670
47f670
RestartPreventExitStatus=1
47f670
47f670
# Sets open_files_limit
47f670
LimitNOFILE = 10000
47f670
47f670
# Set enviroment variable MYSQLD_PARENT_PID. This is required for SQL restart command.
47f670
Environment=MYSQLD_PARENT_PID=1
47f670
47f670
[Install]
47f670
WantedBy=multi-user.target