diff options
author | Sergei Golubchik <serg@mariadb.org> | 2019-01-23 10:09:49 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2019-01-23 12:39:17 +0100 |
commit | 949559285efff44ba49b478ee766e0fe0a5a9b79 (patch) | |
tree | b80e97ede5e61ed3624f1c2ac48fb0c784d10b2b /support-files | |
parent | a8da66f8c56211417289b0e40a10faf49e225a54 (diff) | |
download | mariadb-git-949559285efff44ba49b478ee766e0fe0a5a9b79.tar.gz |
MDEV-18059 `support-files/mysql.server.sh stop` must run as root
don't run `su - mysql` is $USER is already mysql
Diffstat (limited to 'support-files')
-rw-r--r-- | support-files/mysql.server.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh index c1d85ba2664..f3990967b87 100644 --- a/support-files/mysql.server.sh +++ b/support-files/mysql.server.sh @@ -187,7 +187,11 @@ fi user='@MYSQLD_USER@' su_kill() { - su - $user -s /bin/sh -c "kill $*" >/dev/null 2>&1 + if test "$USER" = "$user"; then + kill $* >/dev/null 2>&1 + else + su - $user -s /bin/sh -c "kill $*" >/dev/null 2>&1 + fi } # |