| Server IP : 37.9.174.138 / Your IP : 216.73.216.117 Web Server : Apache System : Linux vps6.backend.sk 6.12.100+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.100-1 (2026-07-30) x86_64 User : ftpuser ( 1001) PHP Version : 8.4.24 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/share/wwwconfig-common/ |
Upload File : |
# File: mysql.func
# Changes:
# 20010430 Ola Lundqvist <opal@debian.org>
# 20020125 Ola Lundqvist <opal@debian.org>
# Fixed multiple $tmpwhat matching lines, #115485.
# 20020126 Ola Lundqvist <opal@debian.org>
# Added new variable found so that empty passwords will be
# correctly handled.
# Needs: /etc/mysql/my.cnf
# Description: Get a config value from my.cnf
# Usage: getmysqlopt section option
# Sets: $getmysqlopt = value
found=no
getmysqlopt() {
tmpcfgfile="$3"
tmpwhat="$2"
tmpsect="$1"
if grep -v '^#' $tmpcfgfile | grep "\[$tmpsect\]" >/dev/null 2>&1 ; then
getmysqlopt=$(grep -A 10 "\[$tmpsect\]" $tmpcfgfile | grep "^[[:space:]]*$tmpwhat[[:space:]]*=[[:space:]]*" | head -1 | sed "s|^[[:space:]]*$tmpwhat[[:space:]]*=[[:space:]]*||g; s|[[:space:]][[:space:]]*$||g;")
found=yes
fi
}