]> git.proxmox.com Git - pmg-api.git/blame - debian/postinst
bump version to 5.0-11
[pmg-api.git] / debian / postinst
CommitLineData
0854fb22
DM
1#!/bin/sh
2
3set -e
4
5
6case "$1" in
3cf7a549
DM
7 triggered)
8
9 test -e /proxmox_install_mode && exit 0;
10
11 # Note: reload-or-try-restart fails if service is not active
b970485e
DM
12 for service in pmgdaemon pmgproxy pmg-smtp-filter pmgpolicy pmgtunnel pmgmirror; do
13 if systemctl --quiet is-active $service.service ; then
14 deb-systemd-invoke reload-or-try-restart $service.service
15 fi
16 done
07f15aa3 17
3cf7a549
DM
18 exit 0
19 ;;
20
0854fb22 21 configure)
ebe7f62b 22
5e374987 23 if test -e /proxmox_install_mode ; then
ed4c9e72 24 # do nothing in test mode here, but setup services below
5e374987 25 else
cf521b5d 26
5e374987
DM
27 pmgconfig init
28 pmgdb init
ef23c01a 29
5e374987
DM
30 if [ -n "$2" ]; then
31 pmgconfig sync
32 else
33 if systemctl --quiet is-active pmgpolicy.service ; then
34 deb-systemd-invoke reload-or-try-restart postgres.service
35 fi
36 pmgconfig sync --restart
ef23c01a 37 fi
ef23c01a 38
5e374987 39 pmgdb update >/dev/null 2>&1 &
cf521b5d 40
5e374987
DM
41 update-mime-database /usr/share/mime
42 fi
0854fb22
DM
43 ;;
44
45 abort-upgrade|abort-remove|abort-deconfigure)
46 ;;
47
48 *)
49 echo "postinst called with unknown argument \`$1'" >&2
50 exit 1
51 ;;
52esac
53
54# dh_installdeb will replace this with shell code automatically
55# generated by other debhelper scripts.
56
57#DEBHELPER#
58
59exit 0