summaryrefslogtreecommitdiff
path: root/support-files/rpm
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-03-31 08:01:03 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2021-03-31 08:01:03 +0300
commitd6d3d9ae2ffb1df8eebfe0c922394bbc7b12e4ed (patch)
tree341f053652cf1e93acf89180a0b072f7d43ef1e1 /support-files/rpm
parent96475b78c55141164ecf2719e000d189e4bcbc3d (diff)
parent99945d77d748470fbb3939be5f7d0e36d24d8097 (diff)
downloadmariadb-git-d6d3d9ae2ffb1df8eebfe0c922394bbc7b12e4ed.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'support-files/rpm')
-rw-r--r--support-files/rpm/server-posttrans.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/support-files/rpm/server-posttrans.sh b/support-files/rpm/server-posttrans.sh
index 1406c78a5f5..1525b592735 100644
--- a/support-files/rpm/server-posttrans.sh
+++ b/support-files/rpm/server-posttrans.sh
@@ -1,10 +1,15 @@
if [ -r %{restart_flag} ] ; then
rm %{restart_flag}
+ # only restart the server if it was alredy running
if [ -x /usr/bin/systemctl ] ; then
/usr/bin/systemctl daemon-reload > /dev/null 2>&1
- /usr/bin/systemctl try-restart mariadb.service > /dev/null 2>&1
+ if [ /usr/bin/systemctl 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
- # only restart the server if it was alredy running
- %{_sysconfdir}/init.d/mysql restart
+ %{_sysconfdir}/init.d/mysql restart > /dev/null 2>&1
fi
fi