mariadb/mariadb-check-socket

17 lines
486 B
Bash

#!/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.
source ./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