install_mysql.sh: add '--defaults-file' option to mysql start command. This option MUST be the firts commanline option.
This commit is contained in:
parent
4b8c5fbea5
commit
1223afb13e
@ -5063,6 +5063,32 @@ if $INSTALL_SYSTEMD_SERVICE ; then
|
||||
[[ $OK = "yes" ]] || fatal "Abbruch durch User"
|
||||
fi
|
||||
|
||||
|
||||
echononl "Add '--defaults-file=..' to ExecStart command line at systemd service file.."
|
||||
echo "" >> ${logdir}/main.log
|
||||
echo "## - Add '--defaults-file=..' to ExecStart command line at systemd service file.." >> ${logdir}/main.log
|
||||
echo "## -" >> ${logdir}/main.log
|
||||
echo "perl -i -n -p -e \"s&^(\s*ExecStart=[^\s]+)\s+(.*)&\1 --defaults-file=${MYSQL_INSTALL_DIR}/etc/my.cnf \2&\" /etc/systemd/system/$MYSQL_SERVICE_FILE" >> ${logdir}/main.log
|
||||
|
||||
perl -i -n -p -e "s&^(\s*ExecStart=[^\s]+)\s+(.*)&\1 --defaults-file=${MYSQL_INSTALL_DIR}/etc/my.cnf \2&" \
|
||||
/etc/systemd/system/$MYSQL_SERVICE_FILE >> ${logdir}/main.log
|
||||
if [[ $_retval -eq 0 ]]; then
|
||||
echo_ok
|
||||
else
|
||||
echo_failed
|
||||
error "Modifiing ExecStart command line at '/etc/systemd/system/${MYSQL_SERVICE_FILE}' failed!"
|
||||
|
||||
echononl "continue anyway [yes/no]: "
|
||||
read OK
|
||||
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
|
||||
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
|
||||
echononl "Wrong entry! - repeat [yes/nno]: "
|
||||
read OK
|
||||
done
|
||||
[[ $OK = "yes" ]] || fatal "Abbruch durch User"
|
||||
fi
|
||||
|
||||
|
||||
echononl "Set open_files_limit (LimitNOFILE) to $(ulimit -Hn) .."
|
||||
echo "" >> ${logdir}/main.log
|
||||
echo "## - Set open_files_limit (LimitNOFILE) to $(ulimit -Hn) .." >> ${logdir}/main.log
|
||||
|
Loading…
Reference in New Issue
Block a user