d68d762
@@ -6,6 +6,8 @@
sharedscripts
delaycompress
postrotate
- /bin/systemctl reload httpd.service > /dev/null 2>/dev/null || true
+ if [ -e /var/run/httpd/httpd.pid ]; then
+ /bin/systemctl reload httpd.service > /dev/null 2>/dev/null || true
+ fi
endscript
}
Prevent an error from being logged when trying to reload even if httpd is not running
Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
The way we recommend to configure instantiated units (httpd@foobar.service) is with:
[Unit] ReloadPropagatedFrom=httpd.service
so that they are reloaded by logrotate as well. Your change would stop that working.
Is there another way to prevent systemd logging the failed reloads?
rebased onto 6480e1fec4e0d430683ca0cf20dd519b9351beae
1 new commit added
Add boot check before reload :
I updated the commit. Could you take a look?
Not sure how you addressed my concern because the "is-active" check is still there.
2 new commits added
Fix unintended attempt of reloading inactive httpd.service
Add boot check before reload
rebased onto d68d762
this is also going to stop the reload propagating to templated services. Please test the scenario I outlined above with a templated httpd@foobar.service and test the case which is going to break with your change. Feel free to reopen if you come up with a tested solution.
Pull-Request has been closed by jorton