Check if socket file is not being used by another process at a time of starting the service
Related: #1045435
This commit is contained in:
parent
36b8db2178
commit
96e337e120
@ -50,6 +50,16 @@ chown "$myuser:$mygroup" "$errlogfile"
|
||||
chmod 0640 "$errlogfile"
|
||||
[ -x /sbin/restorecon ] && /sbin/restorecon "$errlogfile"
|
||||
|
||||
# We check if there is already a process using the socket file,
|
||||
# since otherwise this systemd service file could report false
|
||||
# positive result when starting and mysqld_safe could remove
|
||||
# a socket file, which actually uses a different daemon.
|
||||
if fuser "$socketfile" &>/dev/null ; then
|
||||
echo "Socket file $socketfile exists." >&2
|
||||
echo "Is another MySQL daemon already running with the same unix socket?" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Make the data directory
|
||||
if [ ! -d "$datadir/mysql" ] ; then
|
||||
# First, make sure $datadir is there with correct permissions
|
||||
|
@ -801,6 +801,9 @@ fi
|
||||
Related: #1044565
|
||||
- Use upstream's layout for symbols version in client library
|
||||
Related: #1045013
|
||||
- Check if socket file is not being used by another process at a time
|
||||
of starting the service
|
||||
Related: #1045435
|
||||
|
||||
* Wed Nov 27 2013 Honza Horak <hhorak@redhat.com> 1:5.5.34-2
|
||||
- Fix mariadb-wait-ready script
|
||||
|
Loading…
Reference in New Issue
Block a user