From 85bc06a726065eb8f52845d7c8e80fb52500fda7 Mon Sep 17 00:00:00 2001 From: Christoph Date: Wed, 5 Dec 2018 01:02:37 +0100 Subject: [PATCH] install_httpd-2.4.sh: Replace '' with '/usr/local/apache2' in service file. --- install_httpd-2.4.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/install_httpd-2.4.sh b/install_httpd-2.4.sh index 4fe8b25..c345cbd 100755 --- a/install_httpd-2.4.sh +++ b/install_httpd-2.4.sh @@ -3366,6 +3366,21 @@ EOF warn "Creating systemd service file '/etc/systemd/system/apache2.service' failed." fi + echo "" >> ${_logdir}/main.log + echo "## - Replace '$PREFIX' with '/usr/local/apache2' in service file.." >> ${_logdir}/main.log + echo "## -" >> ${_logdir}/main.log + echo "perl -i -n -p -e \"s#$PREFIX#/usr/local/apache2#g\" /etc/systemd/system/apache2.service" >> ${_logdir}/main.log + echo -e "\tReplace '$PREFIX' with '/usr/local/apache2' in service file.." + echononl "\t '/usr/local/apache2' in service file.." + perl -i -n -p -e "s#$PREFIX#/usr/local/apache2#g" /etc/systemd/system/apache2.service >> ${_logdir}/main.log 2>&1 + if [ "$?" = "0" ]; then + echo_ok + else + echo_failed + warn "Replacing '$PREFIX' with '/usr/local/apache2' in service file failed." + fi + + fi