mirror of
https://github.com/MariaDB/server.git
synced 2025-11-15 10:16:13 +01:00
MDEV-37726 moved wsrep-start-position to INSTALL_RUNDATADIR
and made the latter to be created by systemd-tmpfiles.
Now postin scriptlet has to run systemd-tmpfiles explicitly
to make sure INSTALL_RUNDATADIR exists before restarting
the server.
followup for 649216e70d
15 lines
586 B
Bash
15 lines
586 B
Bash
if [ -r %{restart_flag} ] ; then
|
|
rm %{restart_flag}
|
|
# only restart the server if it was already running
|
|
if [ -x /usr/bin/systemctl ] ; then
|
|
/usr/bin/systemctl daemon-reload > /dev/null 2>&1
|
|
if /usr/bin/systemctl -q is-active mysql; then
|
|
/usr/bin/systemctl restart mysql > /dev/null 2>&1
|
|
else
|
|
/usr/bin/systemctl try-restart mariadb.service > /dev/null 2>&1
|
|
fi
|
|
# not a systemd-enabled environment, use SysV startup script
|
|
elif %{_sysconfdir}/init.d/mysql status > /dev/null 2>&1; then
|
|
%{_sysconfdir}/init.d/mysql restart > /dev/null 2>&1
|
|
fi
|
|
fi
|