diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2015-09-28 15:08:09 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2015-10-12 17:51:49 +0200 |
commit | 6346d1de2fdaa8a8359082871eac49402cb0e472 (patch) | |
tree | 62a057a2b8ab0b24bc242461522017e333fe741f /support-files/mariadb@.service.in | |
parent | 20c2ae39db3dd0ec4c337a9b0bd2bf4481b61e49 (diff) | |
download | mariadb-git-6346d1de2fdaa8a8359082871eac49402cb0e472.tar.gz |
MDEV-427/MDEV-5713 Add systemd script with notify functionality
After review/QA fixes.
Diffstat (limited to 'support-files/mariadb@.service.in')
-rw-r--r-- | support-files/mariadb@.service.in | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/support-files/mariadb@.service.in b/support-files/mariadb@.service.in index bfcc71a8d40..b8ef969cf32 100644 --- a/support-files/mariadb@.service.in +++ b/support-files/mariadb@.service.in @@ -39,6 +39,7 @@ Alias=mysqld.service Type=notify # Setting this to true can break replication and the Type=notify settings +# See also bind-address mysqld option. PrivateNetwork=false ############################################################################## @@ -46,6 +47,7 @@ PrivateNetwork=false ## User=mysql +Group=mysql # Execute pre and post scripts as root, otherwise it does it as User= # PermissionsStartOnly=true @@ -54,16 +56,16 @@ User=mysql # ExecStartPre=/usr/bin/mysql_install_db # Start main service -# EXTRA_ARGS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf -# Use the [service] section and Environment="EXTRA_ARGS=...". +# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf +# Use the [service] section and Environment="MYSQLD_OPTS=...". # This isn't a replacement for my.cnf. ExecStart= -ExecStart=/usr/sbin/mysqld $EXTRA_ARGS --defaults-file=@INSTALL_SYSCONF2DIR@/my%I.cnf +ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS --defaults-file=@INSTALL_SYSCONF2DIR@/my%I.cnf # Alternate: (remove ConditionPathExists above) # use [mysqld.INSTANCENAME] as sections in my.cnf # -# ExecStart=/usr/sbin/mysqld $EXTRA_ARGS --defaults-group-suffix=%I +# ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS --defaults-group-suffix=%I KillMode=process KillSignal=SIGTERM @@ -71,14 +73,12 @@ KillSignal=SIGTERM # Don't want to see an automated SIGKILL ever SendSIGKILL=no -# Exit status 1 is a fatal config error. Restarting won't help. -RestartPreventExitStatus=1 -Restart=on-failure +# Restart crashed server only, on-failure would also restart, for example, when +# my.cnf contains unknown option +Restart=on-abort RestartSec=5s -PrivateDevices=true - -UMask=077 +UMask=007 ############################################################################## ## USERs can override @@ -91,10 +91,10 @@ UMask=077 # Kernels like killing mysqld when out of memory because its big. # Lets temper that preference a little. -OOMScoreAdjust=-600 +# OOMScoreAdjust=-600 # Explicitly start with high IO priority -BlockIOWeight=1000 +# BlockIOWeight=1000 # If you don't use the /tmp directory for SELECT ... OUTFILE and # LOAD DATA INFILE you can enable PrivateTmp=true for a little more security. @@ -107,7 +107,7 @@ PrivateTmp=false ## # Number of files limit. previously [mysqld_safe] open-file-limit -LimitNOFILE=16364 +# LimitNOFILE=16364 # Maximium core size. previously [mysqld_safe] core-file-size # LimitCore= |