d/postinst: use reload-or-restart instead of try-reload-or-try-restart

The only difference is that reload-or-try-restart does not do
anything if the service isn't already running, while
reload-or-restart also starts a stopped service.

We explicitly check if the service is enabled on upgrade before doing
any start/reload-or-restart action anyway. So, it would now start
daemons that were stopped but not disabled, which is not a really
valid state and would have happened on the next reboot anyway.

This starts new daemons (like the pvescheduler) automatically on a
package upgrade

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Dominik Csapak 2021-10-07 10:27:22 +02:00 committed by Thomas Lamprecht
parent df827e9890
commit 4e6b6db2c4

2
debian/postinst vendored
View File

@ -180,7 +180,7 @@ case "$1" in
# modeled after code generated by dh_start
for unit in ${UNITS}; do
if test -n "$2"; then
dh_action="reload-or-try-restart";
dh_action="reload-or-restart";
else
dh_action="start"
fi