diff --git a/install_mysql.sh b/install_mysql.sh index 933b738..336ea0a 100755 --- a/install_mysql.sh +++ b/install_mysql.sh @@ -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