Bug#1108939: apache2: logrotate conf uses invoke-rc.d that might be inhibited
Package: apache2
Version: 2.4.62-1~deb12u2
Severity: normal
Dear Maintainer,
The logrotate snippet for apache2 says:
postrotate
if pgrep -f ^/usr/sbin/apache2 > /dev/null; then
invoke-rc.d apache2 reload 2>&1 | logger -t apache2.logrotate
fi
endscript
It is possible that invoke-rc.d is inhibited by
policy-rcd-declarative-deny-all or an equivalent solution but apache2
was enabled and started explicitly.
In that case, log rotation should happen, but it does not.
Since the call is already wrapped in a test that apache2 is running, I
suggest to replace “invoke-rc.d apache2 reload” by “apache2ctl
graceful”.
Regards,
--
Nicolas George, responsable adjoint du
Pôle numérique, pédagogique et scientifique,
École normale supérieure
-- Package-specific info:
-- System Information:
Debian Release: 12.9
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
merged-usr: no
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 6.1.0-28-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=C, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages apache2 depends on:
ii apache2-bin 2.4.62-1~deb12u2
ii apache2-data 2.4.62-1~deb12u2
ii apache2-utils 2.4.62-1~deb12u2
ii init-system-helpers 1.65.2
ii media-types 10.0.0
ii perl 5.36.0-7+deb12u1
ii procps 2:4.0.2-3
ii sysvinit-utils [lsb-base] 3.06-4
Versions of packages apache2 recommends:
ii ssl-cert 1.1.2
Versions of packages apache2 suggests:
pn apache2-doc <none>
pn apache2-suexec-pristine | apache2-suexec-custom <none>
ii links [www-browser] 2.28-1+b2
ii lynx [www-browser] 2.9.0dev.12-1
ii w3m [www-browser] 0.5.3+git20230121-2
Versions of packages apache2-bin depends on:
ii libapr1 1.7.2-3+deb12u1
ii libaprutil1 1.6.3-1
ii libaprutil1-dbd-sqlite3 1.6.3-1
ii libaprutil1-ldap 1.6.3-1
ii libbrotli1 1.0.9-2+b6
ii libc6 2.36-9+deb12u9
ii libcrypt1 1:4.4.33-2
ii libcurl4 7.88.1-10+deb12u8
ii libjansson4 2.14-2
ii libldap-2.5-0 2.5.13+dfsg-5
ii liblua5.3-0 5.3.6-2
ii libnghttp2-14 1.52.0-1+deb12u2
ii libpcre2-8-0 10.42-1
ii libssl3 3.0.15-1~deb12u1
ii libxml2 2.9.14+dfsg-1.3~deb12u1
ii perl 5.36.0-7+deb12u1
ii zlib1g 1:1.2.13.dfsg-1
Versions of packages apache2-bin suggests:
pn apache2-doc <none>
pn apache2-suexec-pristine | apache2-suexec-custom <none>
ii links [www-browser] 2.28-1+b2
ii lynx [www-browser] 2.9.0dev.12-1
ii w3m [www-browser] 0.5.3+git20230121-2
Versions of packages apache2 is related to:
ii apache2 2.4.62-1~deb12u2
ii apache2-bin 2.4.62-1~deb12u2
-- Configuration Files:
/etc/apache2/sites-available/000-default.conf changed:
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
IncludeOptional /etc/roundcube/*/apache.conf
</VirtualHost>
-- no debconf information
Reply to: