]> git.proxmox.com Git - pve-firewall.git/blob - debian/postinst
fix #1319: don't fail postinst with masked service
[pve-firewall.git] / debian / postinst
1 #!/bin/sh
2
3 set -e
4
5 #DEBHELPER#
6
7 case "$1" in
8 configure)
9 # Remove masks created by dh_systemd_enable on package removal.
10 deb-systemd-helper unmask pve-firewall.service >/dev/null || true
11
12 # modeled after dh_systemd_start output
13 systemctl --system daemon-reload >/dev/null || true
14 if [ -n "$2" ]; then
15 _dh_action=try-reload-or-restart
16 else
17 _dh_action=start
18 fi
19 deb-systemd-invoke $_dh_action pve-firewall.service >/dev/null || true
20 ;;
21
22 abort-upgrade|abort-remove|abort-deconfigure)
23 ;;
24
25 *)
26 echo "postinst called with unknown argument \`$1'" >&2
27 exit 1
28 ;;
29 esac
30
31 exit 0