Blame SOURCES/mysql@.service.in

bdf724
# It's not recommended to modify this file in-place, because it will be
bdf724
# overwritten during package upgrades.  If you want to customize, the
bdf724
# best way is to create a file "/etc/systemd/system/@DAEMON_NAME@.service",
bdf724
# containing
bdf724
#	.include /usr/lib/systemd/system/@DAEMON_NAME@.service
bdf724
#	...make your changes here...
bdf724
# or create a file "/etc/systemd/system/@DAEMON_NAME@.service.d/foo.conf",
bdf724
# which doesn't need to include ".include" call and which will be parsed
bdf724
# after the file @DAEMON_NAME@.service itself is parsed.
bdf724
#
bdf724
# For more info about custom unit files, see systemd.unit(5) or
bdf724
# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F
bdf724
bdf724
# For example, if you want to increase mysql's open-files-limit to 10000,
bdf724
# you need to increase systemd's LimitNOFILE setting, so create a file named
bdf724
# "/etc/systemd/system/@DAEMON_NAME@.service.d/limits.conf" containing:
bdf724
#	[Service]
bdf724
#	LimitNOFILE=10000
bdf724
bdf724
# Or if you require to execute pre and post scripts in the unit file as root, set
bdf724
#       PermissionsStartOnly=true
bdf724
bdf724
# Note: /usr/lib/... is recommended in the .include line though /lib/...
bdf724
# still works.
bdf724
# Don't forget to reload systemd daemon after you change unit configuration:
bdf724
# root> systemctl --system daemon-reload
bdf724
bdf724
[Unit]
bdf724
Description=@NICE_PROJECT_NAME@ @MAJOR_VERSION@.@MINOR_VERSION@ database server
bdf724
After=syslog.target
bdf724
After=network.target
bdf724
bdf724
[Service]
bdf724
Type=forking
bdf724
User=mysql
bdf724
Group=mysql
bdf724
bdf724
ExecStartPre=@libexecdir@/mysql-check-socket --defaults-group-suffix=.%I
bdf724
ExecStartPre=@libexecdir@/mysql-prepare-db-dir --defaults-group-suffix=.%I %n
bdf724
# Note: we set --basedir to prevent probes that might trigger SELinux alarms,
bdf724
# per bug #547485
bdf724
ExecStart=@libexecdir@/mysqld --defaults-group-suffix=.%I --daemonize --basedir=@prefix@ --pid-file=@PID_FILE_DIR@/@DAEMON_NO_PREFIX@.pid
bdf724
ExecStartPost=@libexecdir@/mysql-check-upgrade --defaults-group-suffix=.%I
bdf724
ExecStopPost=@libexecdir@/mysql-wait-stop --defaults-group-suffix=.%I
bdf724
bdf724
# Give a reasonable amount of time for the server to start up/shut down
bdf724
TimeoutSec=300
bdf724
bdf724
# Place temp files in a secure directory, not /tmp
bdf724
PrivateTmp=true
bdf724
bdf724
Restart=on-failure
bdf724
bdf724
RestartPreventExitStatus=1
bdf724
bdf724
[Install]
bdf724
WantedBy=multi-user.target