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