smeserver-mysql/additional/rootscl/usr/lib/systemd/system/mariadb_VER_-mariadb.service

54 lines
2.3 KiB
SYSTEMD
Raw Normal View History

[Unit]
Description=Mariadb !!!VER!!! database server
After=syslog.target
After=network.target
[Service]
Type=simple
User=root
Group=root
PIDFile=/var/run/rh-mariadb!!!VER!!!-mariadb/mariadb.pid
# Load collections set to enabled for this service
EnvironmentFile=/opt/rh/rh-mariadb!!!VER!!!/service-environment
#ours : we need root user as + and ! are not yet supported
ExecStartPre=-/sbin/e-smith/service-status mariadb!!!VER!!!-mariadb
ExecStartPre=-/sbin/e-smith/expand-template /var/lib/mysql/set.password
ExecStartPre=-/sbin/e-smith/expand-template /root/.my.cnf
ExecStartPre=-/sbin/e-smith/expand-template /etc/my.cnf
ExecStartPre=-/sbin/e-smith/expand-template /etc/opt/rh/rh-mariadb!!!VER!!!/my.cnf
ExecStartPre=/sbin/e-smith/systemd/mariadb!!!VER!!!-initialize
# We want to start server only inside "scl enable" invocation
ExecStartPre=/usr/bin/scl enable $RH_MARIADB!!!VER!!!_SCLS_ENABLED -- /usr/bin/scl_enabled rh-mariadb!!!VER!!!
ExecStartPre=/usr/bin/scl enable $RH_MARIADB!!!VER!!!_SCLS_ENABLED -- /opt/rh/rh-mariadb!!!VER!!!/root/usr/libexec/mysql-check-socket
ExecStartPre=/usr/bin/scl enable $RH_MARIADB!!!VER!!!_SCLS_ENABLED -- /opt/rh/rh-mariadb!!!VER!!!/root/usr/libexec/mysql-prepare-db-dir %n
# Note: we set --basedir to prevent probes that might trigger SELinux alarms,
# per bug #547485
ExecStart=/opt/rh/rh-mariadb!!!VER!!!/root/usr/libexec/mysqld_safe-scl-helper enable $RH_MARIADB!!!VER!!!_SCLS_ENABLED -- /opt/rh/rh-mariadb!!!VER!!!/root/usr/libexec/mysqld \
--defaults-file=/etc/my.cnf \
--datadir=/var/opt/rh/rh-mariadb!!!VER!!!/lib/mysql \
--user=mysql \
--basedir=/opt/rh/rh-mariadb!!!VER!!!/root/usr \
--pid-file=/var/run/rh-mariadb!!!VER!!!-mariadb/mariadb.pid
ExecStartPost=/usr/bin/scl enable $RH_MARIADB!!!VER!!!_SCLS_ENABLED -- /opt/rh/rh-mariadb!!!VER!!!/root/usr/libexec/mysql-check-upgrade
ExecStopPost=/usr/bin/scl enable $RH_MARIADB!!!VER!!!_SCLS_ENABLED -- /opt/rh/rh-mariadb!!!VER!!!/root/usr/libexec/mysql-wait-stop
#ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID
# Give a reasonable amount of time for the server to start up/shut down
TimeoutSec=300
# Place temp files in a secure directory, not /tmp
PrivateTmp=true
Restart=on-failure
RestartPreventExitStatus=1
[Install]
WantedBy=sme-server.target