]> git.proxmox.com Git - pmg-api.git/blob - debian/postinst
install pmgpolicy service
[pmg-api.git] / debian / postinst
1 #!/bin/sh
2
3 set -e
4
5
6 case "$1" in
7 triggered)
8
9 test -e /proxmox_install_mode && exit 0;
10
11 # Note: reload-or-try-restart fails if service is not active
12 systemctl --quiet is-active pmgdaemon.service && deb-systemd-invoke reload-or-try-restart pmgdaemon.service
13 systemctl --quiet is-active pmgproxy.service && deb-systemd-invoke reload-or-try-restart pmgproxy.service
14 systemctl --quiet is-active pmg-smtp-filter.service && deb-systemd-invoke reload-or-try-restart pmg-smtp-filter.service
15 systemctl --quiet is-active pmgpolicy.service && deb-systemd-invoke reload-or-try-restart pmgpolicy.service
16
17 exit 0
18 ;;
19
20 configure)
21
22 test -e /proxmox_install_mode || pmgdb init
23 test -e /proxmox_install_mode || pmgdb update >/dev/null 2>&1 &
24
25 ;;
26
27 abort-upgrade|abort-remove|abort-deconfigure)
28 ;;
29
30 *)
31 echo "postinst called with unknown argument \`$1'" >&2
32 exit 1
33 ;;
34 esac
35
36 # dh_installdeb will replace this with shell code automatically
37 # generated by other debhelper scripts.
38
39 #DEBHELPER#
40
41 exit 0