2014-02-25 14:56:53 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# We check if there is already a process using the socket file,
|
|
|
|
# since otherwise the systemd service file could report false
|
|
|
|
# positive result when starting and mysqld_safe could remove
|
|
|
|
# a socket file, which is actually being used by a different daemon.
|
|
|
|
|
2014-03-13 12:25:10 +00:00
|
|
|
source "`dirname ${BASH_SOURCE[0]}`/mariadb-scripts-common"
|
2014-02-25 14:56:53 +00:00
|
|
|
|
|
|
|
if fuser "$socketfile" &>/dev/null ; then
|
|
|
|
echo "Socket file $socketfile exists." >&2
|
|
|
|
echo "Is another MySQL daemon running with the same unix socket?" >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
exit 0
|