]> git.proxmox.com Git - pve-firewall.git/commitdiff
fix #1319: don't fail postinst with masked service
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Thu, 8 Mar 2018 12:33:51 +0000 (13:33 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 8 Mar 2018 12:49:04 +0000 (13:49 +0100)
by using "try-reload-or-restart" instead of "reload-or-restart"

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
debian/postinst

index 40771833bab8ad1898c16c47c96af0ecfd9d99e2..0e6b7b2603e9ad4fd11b02300d61ba013f320260 100644 (file)
@@ -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