mariadb/mariadb-check-socket

17 lines
514 B
Plaintext
Raw Normal View History

#!/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"
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