403Webshell
Server IP : 188.151.22.197  /  Your IP : 216.73.217.74
Web Server : Apache/2.4.62 (Rocky Linux) OpenSSL/3.5.5
System : Linux wsten.se 5.14.0-687.30.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jul 27 13:09:21 UTC 2026 x86_64
User : apache ( 48)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/libexec/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/libexec/mariadb-check-socket
#!/usr/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 "`dirname ${BASH_SOURCE[0]}`/mariadb-scripts-common"

if test -e "$socketfile" ; then
    echo "Socket file $socketfile exists." >&2

    # no write permissions
    if ! test -w "$socketfile" ; then
        echo "Not enough permission to write to the socket file $socketfile, which is suspicious." >&2
        echo "Please, remove $socketfile manually to start the service." >&2
        exit 1
    fi

    # not a socket file
    if ! test -S "$socketfile" ; then
        echo "The file $socketfile is not a socket file, which is suspicious." >&2
        echo "Please, remove $socketfile manually to start the service." >&2
        exit 1
    fi

    # some process uses the socket file
    response=`/usr/bin/mariadb-admin --no-defaults --socket="$socketfile" --user=UNKNOWN_MYSQL_USER --connect-timeout="${CHECKSOCKETTIMEOUT:-10}" ping 2>&1`
    if [ $? -eq 0 ] || echo "$response" | grep -q "Access denied for user" ; then
        echo "Is another MariaDB daemon already running with the same unix socket?" >&2
        echo "Please, stop the process using the socket $socketfile or remove the file manually to start the service." >&2
        exit 1
    fi

    # socket file is a garbage
    echo "No process is using $socketfile, which means it is a garbage, so it will be removed automatically." >&2
fi

exit 0

Youez - 2016 - github.com/yon3zu
LinuXploit