summaryrefslogtreecommitdiff
path: root/support-files
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2019-10-30 09:50:52 +0100
committerSergei Golubchik <serg@mariadb.org>2019-10-30 16:46:08 +0100
commit8fce180765b2ede9fb9f0f7ee6ffcda3386050bf (patch)
treeab257bee22f3f7d6c9855eeff9981ebb61e2ef9c /support-files
parentd03a59c6ff3c07deff8b3067a97e8f126e294b6d (diff)
downloadmariadb-git-8fce180765b2ede9fb9f0f7ee6ffcda3386050bf.tar.gz
MDEV-19432 Systemd service does not get re-enabled after upgrade
following Fedora recommendations (see %systemd_post macro in FC29) let's do `systemctl preset` on the first installation of the server
Diffstat (limited to 'support-files')
-rw-r--r--support-files/rpm/server-postin.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/support-files/rpm/server-postin.sh b/support-files/rpm/server-postin.sh
index deb27c98ac1..71518423687 100644
--- a/support-files/rpm/server-postin.sh
+++ b/support-files/rpm/server-postin.sh
@@ -16,7 +16,8 @@ fi
# Make MySQL start/shutdown automatically when the machine does it.
if [ $1 = 1 ] ; then
if [ -x /usr/bin/systemctl ] ; then
- /usr/bin/systemctl daemon-reload >/dev/null 2>&1
+ /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+ /usr/bin/systemctl preset mariadb.service >/dev/null 2>&1 || :
elif [ -x /sbin/chkconfig ] ; then
/sbin/chkconfig --add mysql
fi