diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-09-26 20:49:51 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-09-28 16:37:06 +0200 |
commit | 57e0da50bbef8164635317785b67dd468a908327 (patch) | |
tree | 89d1ed179afce8b040c8f2dfcfe179042ff27b2e /support-files | |
parent | 7aba6f8f8853acd18d471793f8b72aa1412b8151 (diff) | |
parent | dcbd51cee628d8d8fec9ff5476a6afc855b007aa (diff) | |
download | mariadb-git-57e0da50bbef8164635317785b67dd468a908327.tar.gz |
Merge branch '10.2' into 10.3
Diffstat (limited to 'support-files')
-rw-r--r-- | support-files/rpm/plugin-postin.sh | 3 | ||||
-rw-r--r-- | support-files/rpm/server-posttrans.sh | 11 | ||||
-rw-r--r-- | support-files/rpm/server-postun.sh | 9 |
3 files changed, 17 insertions, 6 deletions
diff --git a/support-files/rpm/plugin-postin.sh b/support-files/rpm/plugin-postin.sh new file mode 100644 index 00000000000..1844de1b4f2 --- /dev/null +++ b/support-files/rpm/plugin-postin.sh @@ -0,0 +1,3 @@ +# request the server restart +mkdir -p %{restart_flag_dir} +echo > %{restart_flag} diff --git a/support-files/rpm/server-posttrans.sh b/support-files/rpm/server-posttrans.sh new file mode 100644 index 00000000000..0d242596185 --- /dev/null +++ b/support-files/rpm/server-posttrans.sh @@ -0,0 +1,11 @@ +if [ -r %{restart_flag} ] ; then + rm %{restart_flag} + if [ -x /usr/bin/systemctl ] ; then + /usr/bin/systemctl daemon-reload > /dev/null 2>&1 + fi + + # 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 +fi diff --git a/support-files/rpm/server-postun.sh b/support-files/rpm/server-postun.sh index 412c6f4c67b..27e1125b78f 100644 --- a/support-files/rpm/server-postun.sh +++ b/support-files/rpm/server-postun.sh @@ -1,10 +1,7 @@ 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 - fi + # request the server restart + mkdir -p %{restart_flag_dir} + echo > %{restart_flag} fi if [ $1 = 0 ] ; then |