summaryrefslogtreecommitdiffstats
path: root/support-files/rpm/server-posttrans.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
commit3f619478f796eddbba6e39502fe941b285dd97b1 (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /support-files/rpm/server-posttrans.sh
parentInitial commit. (diff)
downloadmariadb-upstream.tar.xz
mariadb-upstream.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'support-files/rpm/server-posttrans.sh')
-rw-r--r--support-files/rpm/server-posttrans.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/support-files/rpm/server-posttrans.sh b/support-files/rpm/server-posttrans.sh
new file mode 100644
index 00000000..d91ff65e
--- /dev/null
+++ b/support-files/rpm/server-posttrans.sh
@@ -0,0 +1,15 @@
+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 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