do you really mean "systemctl restart apache2"? Because this will disrupt service and stop the whole webserver and then start it again.
I guess you meant "systemctl reload apache2".
The issue is the same, since they all do the same:
logrotate calls "invoke-rc.d apache2 reload" which calls "/etc/init.d/apache2 reload" which calls "apache2ctl graceful":
% grep -A 6 -F 'do_reload()' /etc/init.d/apache2
do_reload() {
if apache_conftest; then
if ! pidofproc -p $PIDFILE "$DAEMON" > /dev/null 2>&1 ; then APACHE2_INIT_MESSAGE="Apache2 is not running" return 2
fi $APACHE2CTL graceful > /dev/null 2>&1
-----------------------------------------------------------------
Hi Sergio,
do you really mean "systemctl restart apache2"? Because this will disrupt service and stop the whole webserver and then start it again.
I guess you meant "systemctl reload apache2".
The issue is the same, since they all do the same:
logrotate calls "invoke-rc.d apache2 reload" which calls "/etc/init. d/apache2 reload" which calls "apache2ctl graceful":
% grep -A 6 -F 'do_reload()' /etc/init.d/apache2
APACHE2_ INIT_MESSAGE= "Apache2 is not running"
return 2
$APACHE2CTL graceful > /dev/null 2>&1 ------- ------- ------- ------- ------- ------- ------- ------- --
do_reload() {
if apache_conftest; then
if ! pidofproc -p $PIDFILE "$DAEMON" > /dev/null 2>&1 ; then
fi
-------
systemd does the same:
% cat /lib/systemd/ system/ apache2. service /usr/sbin/ apachectl start /usr/sbin/ apachectl graceful-stop /usr/sbin/ apachectl graceful ------- ------- ------- ------- ------- ------- ------- ------- --
...
[Service]
---
ExecStart=
ExecStop=
ExecReload=
-------
So it doesn't matter. You can even send SIGUSR1 to the apache2 father process which does the same:
AH00493: SIGUSR1 received. Doing graceful restart