]> git.proxmox.com Git - pve-manager.git/commitdiff
access log rotate: try to reload not restart services
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 9 Nov 2017 13:20:52 +0000 (14:20 +0100)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Tue, 14 Nov 2017 13:08:52 +0000 (14:08 +0100)
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@profihost.ag>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
debian/pve.logrotate

index 38fdaa9b11bb31f4504d09891a21b25dd778493e..f5e615b3c306d52ad658856bb36824a8e77c6814 100644 (file)
@@ -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
 }