by using "try-reload-or-restart" instead of "reload-or-restart"
Signed-off-by: Fabian Grünbichler <f.gruenbich...@proxmox.com> --- debian/postinst | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/debian/postinst b/debian/postinst index 4077183..0e6b7b2 100644 --- a/debian/postinst +++ b/debian/postinst @@ -2,11 +2,21 @@ set -e +#DEBHELPER# + case "$1" in configure) # Remove masks created by dh_systemd_enable on package removal. deb-systemd-helper unmask pve-firewall.service >/dev/null || true - systemctl reload-or-restart pve-firewall + + # modeled after dh_systemd_start output + systemctl --system daemon-reload >/dev/null || true + if [ -n "$2" ]; then + _dh_action=try-reload-or-restart + else + _dh_action=start + fi + deb-systemd-invoke $_dh_action pve-firewall.service >/dev/null || true ;; abort-upgrade|abort-remove|abort-deconfigure) @@ -18,6 +28,4 @@ case "$1" in ;; esac -#DEBHELPER# - exit 0 -- 2.14.2 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel