install_mysql.sh: Create environment file for systemd service 'EnvironmentFile'.

This commit is contained in:
Christoph 2019-02-06 03:01:17 +01:00
parent 6545eddf0b
commit 70402c7f25

View File

@ -4839,8 +4839,6 @@ if $INSTALL_SYSTEMD_SERVICE ; then
error "Setting open_files_limit (LimitNOFILE) to $(ulimit -Hn) failed!" error "Setting open_files_limit (LimitNOFILE) to $(ulimit -Hn) failed!"
fi fi
if $PARALLEL_INSTALLATION ; then
SYSTEMD_ENV_FILE="/etc/systemd/system/${MYSQL_DISTRIBUTION,,}-${MYSQL_VERSION}.env" SYSTEMD_ENV_FILE="/etc/systemd/system/${MYSQL_DISTRIBUTION,,}-${MYSQL_VERSION}.env"
echononl "Create environmet file fo systemd service.." echononl "Create environmet file fo systemd service.."
@ -4889,6 +4887,9 @@ EOF
error "Adding/Replacing 'EnvironmentFile' variable at service file failed!" error "Adding/Replacing 'EnvironmentFile' variable at service file failed!"
fi fi
if $PARALLEL_INSTALLATION ; then
if grep -q -E "^\s*Alias\s*=" /etc/systemd/system/$MYSQL_SERVICE_FILE ; then if grep -q -E "^\s*Alias\s*=" /etc/systemd/system/$MYSQL_SERVICE_FILE ; then
echononl "Disable 'Alias' directive(s) at service file.." echononl "Disable 'Alias' directive(s) at service file.."
echo "" >> ${logdir}/main.log echo "" >> ${logdir}/main.log