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