Blame SOURCES/mysql@.service.in

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