[pve-devel] [PATCH manager] access log rotate: try to reload not restart services
Thomas Lamprecht
t.lamprecht at proxmox.com
Thu Nov 9 14:20:52 CET 2017
with the use of systemd the /etc/init.d/pveproxy restart call got
intercepted and redirected to systemd, which did an restart.
But, that is a behvaior change to the intention of the init.d script,
which would not restart but reload the service.
Thus change this to systemds equivalent:
systemctl try-reload-or-restart pveproxy.service
Which tries to reload, if the unit supports it, and only if that does
not worked it restarts.
Same for spiceproxy.
Reported-by: Stefan Priebe <s.priebe at profihost.ag>
Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
debian/pve.logrotate | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/debian/pve.logrotate b/debian/pve.logrotate
index 38fdaa9b..f5e615b3 100644
--- a/debian/pve.logrotate
+++ b/debian/pve.logrotate
@@ -8,7 +8,7 @@
create 640 www-data www-data
sharedscripts
postrotate
- /etc/init.d/pveproxy restart > /dev/null
- /etc/init.d/spiceproxy restart > /dev/null
+ /bin/systemctl try-reload-or-restart pveproxy.service
+ /bin/systemctl try-reload-or-restart spiceproxy.service
endscript
}
--
2.11.0
More information about the pve-devel
mailing list