install_mysql.sh: update also socket in file '/usr/local/mysql/sys-maint.cnf'.
This commit is contained in:
parent
f66cf18618
commit
6080a253c0
@ -6107,6 +6107,26 @@ if $UPDATE_MYSQL ; then
|
|||||||
|
|
||||||
if [[ ! -f "${MYSQL_INSTALL_DIR}/sys-maint.cnf" ]] ; then
|
if [[ ! -f "${MYSQL_INSTALL_DIR}/sys-maint.cnf" ]] ; then
|
||||||
_sys_maint_cnf_needed=true
|
_sys_maint_cnf_needed=true
|
||||||
|
else
|
||||||
|
|
||||||
|
echononl "Ersetze 'socket' variable in '${MYSQL_INSTALL_DIR}/sys-maint.cnf'.."
|
||||||
|
if $(grep -q -E "^\s*socket\s*=\s*${MYSQL_UNIX_SOCKET}" "${MYSQL_INSTALL_DIR}/sys-maint.cnf" 2> /dev/null) ; then
|
||||||
|
echo_skipped
|
||||||
|
else
|
||||||
|
echo "" >> ${logdir}/main.log
|
||||||
|
echo "## - Ersetze 'socket' variable in '${MYSQL_INSTALL_DIR}/sys-maint.cnf'.." >> ${logdir}/main.log
|
||||||
|
echo "## -" >> ${logdir}/main.log
|
||||||
|
echo "perl -i -n -p -e \"s#^(\s*socket\s*=).*#\1 ${MYSQL_UNIX_SOCKET}#\" \"${MYSQL_INSTALL_DIR}/sys-maint.cnf\"" >> ${logdir}/main.log
|
||||||
|
|
||||||
|
perl -i -n -p -e "s#^(\s*socket\s*=).*#\1 ${MYSQL_UNIX_SOCKET}#" "${MYSQL_INSTALL_DIR}/sys-maint.cnf" >> ${logdir}/main.log 2>&1
|
||||||
|
if [ "$?" = "0" ]; then
|
||||||
|
echo_ok
|
||||||
|
else
|
||||||
|
echo_failed
|
||||||
|
warn "Ersetzen von 'socket' variable in '${MYSQL_INSTALL_DIR}/sys-maint.cnf' fehlgeschlagen."
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user