Blame SOURCES/mysql@.service.in

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