Change logrotation file.
This commit is contained in:
		| @@ -3580,11 +3580,19 @@ if [ ! -f "/etc/logrotate.d/apache2" ]; then | ||||
|    create 644 root adm | ||||
|    sharedscripts | ||||
|    postrotate | ||||
|          chown ${HTTPD_USER}:${HTTPD_GROUP} /var/www/*/logs/php_errors.log | ||||
|          chown ${HTTPD_USER}:${HTTPD_GROUP} /var/log/apache2/php_errors.log | ||||
|          if ls /var/www/*/logs/php_errors.log > /dev/null 2>&1 ; then | ||||
|             chown ${HTTPD_USER}:${HTTPD_GROUP} /var/www/*/logs/php_errors.log | ||||
|          fi | ||||
|          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 [[ -z "\$APACHECTL" ]] ; then | ||||
|             echo "Prog 'apachectl' not found!" | ||||
|             if [[ -f "/etc/init.d/apache2" ]; then | ||||
|                /etc/init.d/apache2 reload > /dev/null | ||||
|             else | ||||
|                echo "Reloading apache service failed!" | ||||
|             fi | ||||
|          else | ||||
|             \$APACHECTL graceful > /dev/null | ||||
|          fi | ||||
|   | ||||
		Reference in New Issue
	
	Block a user