Change logrotation file.
This commit is contained in:
parent
9dbc786c44
commit
ff6074b088
@ -583,11 +583,19 @@ if [ ! -f "/etc/logrotate.d/apache2" ]; then
|
||||
create 644 root adm
|
||||
sharedscripts
|
||||
postrotate
|
||||
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
|
||||
|
@ -3580,11 +3580,19 @@ if [ ! -f "/etc/logrotate.d/apache2" ]; then
|
||||
create 644 root adm
|
||||
sharedscripts
|
||||
postrotate
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user