diff options
Diffstat (limited to 'support-files/rpm/server-postun.sh')
-rw-r--r-- | support-files/rpm/server-postun.sh | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/support-files/rpm/server-postun.sh b/support-files/rpm/server-postun.sh index 412c6f4c67b..21468e39e18 100644 --- a/support-files/rpm/server-postun.sh +++ b/support-files/rpm/server-postun.sh @@ -1,9 +1,10 @@ if [ $1 -ge 1 ]; then - if [ -x %{_sysconfdir}/init.d/mysql ] ; then - # only restart the server if it was alredy running - if %{_sysconfdir}/init.d/mysql status > /dev/null 2>&1; then - %{_sysconfdir}/init.d/mysql restart - fi + # 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 + elif %{_sysconfdir}/init.d/mysql status > /dev/null 2>&1; then + %{_sysconfdir}/init.d/mysql restart fi fi |