From 8b82efe7b01a471d5b728cfdce455d5f410a1169 Mon Sep 17 00:00:00 2001 From: Christoph Date: Sun, 22 Oct 2017 11:37:14 +0200 Subject: [PATCH] Fix error in logrotation configuration. --- install_httpd-2.2.sh | 6 +++++- install_httpd-2.4.sh | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/install_httpd-2.2.sh b/install_httpd-2.2.sh index 6a399dc..40374c3 100755 --- a/install_httpd-2.2.sh +++ b/install_httpd-2.2.sh @@ -589,7 +589,11 @@ if [ ! -f "/etc/logrotate.d/apache2" ]; then if [[ -f "/var/log/apache2/php_errors.log" ]] ; then chown ${HTTPD_USER}:${HTTPD_GROUP} /var/log/apache2/php_errors.log fi - APACHECTL="\$(which apachectl)" + if [[ -x "/usr/local/apache2/bin/apachectl" ]]; then + APACHECTL="/usr/local/apache2/bin/apachectl" + else + APACHECTL="\$(which apachectl)" + fi if [[ -z "\$APACHECTL" ]] ; then if [[ -f "/etc/init.d/apache2" ]; then /etc/init.d/apache2 reload > /dev/null diff --git a/install_httpd-2.4.sh b/install_httpd-2.4.sh index 37e2faa..e503cf8 100755 --- a/install_httpd-2.4.sh +++ b/install_httpd-2.4.sh @@ -3586,7 +3586,11 @@ if [ ! -f "/etc/logrotate.d/apache2" ]; then if [[ -f "/var/log/apache2/php_errors.log" ]] ; then chown ${HTTPD_USER}:${HTTPD_GROUP} /var/log/apache2/php_errors.log fi - APACHECTL="\$(which apachectl)" + if [[ -x "/usr/local/apache2/bin/apachectl" ]]; then + APACHECTL="/usr/local/apache2/bin/apachectl" + else + APACHECTL="\$(which apachectl)" + fi if [[ -z "\$APACHECTL" ]] ; then if [[ -f "/etc/init.d/apache2" ]; then /etc/init.d/apache2 reload > /dev/null