Update apache-install-logrotate.sh

This commit is contained in:
Johan 2023-03-08 12:25:19 +01:00
parent f495e0d793
commit 8b1f490a23

View File

@ -24,14 +24,14 @@ if ! grep -q "/var/www/\*/logs/\*\.log" "/etc/logrotate.d/apache2"; then
create 640 root adm create 640 root adm
sharedscripts sharedscripts
postrotate postrotate
if invoke-rc.d apache2 status > /dev/null 2>&1; then \ if invoke-rc.d apache2 status > /dev/null 2>&1; then
invoke-rc.d apache2 reload > /dev/null 2>&1; \ invoke-rc.d apache2 reload > /dev/null 2>&1;
fi; fi;
endscript endscript
prerotate prerotate
if [ -d /etc/logrotate.d/httpd-prerotate ]; then \ if [ -d /etc/logrotate.d/httpd-prerotate ]; then
run-parts /etc/logrotate.d/httpd-prerotate; \ run-parts /etc/logrotate.d/httpd-prerotate;
fi; \ fi;
endscript endscript
} }
EOT EOT