]> git.proxmox.com Git - pmg-api.git/blame - debian/postinst
bump version to 5.0-16
[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
7aa01a97 23 if test ! -e /proxmox_install_mode ; then
cf521b5d 24
5e374987
DM
25 pmgconfig init
26 pmgdb init
ef23c01a 27
5e374987
DM
28 if [ -n "$2" ]; then
29 pmgconfig sync
30 else
31 if systemctl --quiet is-active pmgpolicy.service ; then
b4610a89 32 deb-systemd-invoke reload-or-try-restart postgresql.service
5e374987
DM
33 fi
34 pmgconfig sync --restart
ef23c01a 35 fi
ef23c01a 36
5e374987 37 pmgdb update >/dev/null 2>&1 &
cf521b5d 38
5e374987
DM
39 update-mime-database /usr/share/mime
40 fi
0854fb22
DM
41 ;;
42
43 abort-upgrade|abort-remove|abort-deconfigure)
44 ;;
45
46 *)
47 echo "postinst called with unknown argument \`$1'" >&2
48 exit 1
49 ;;
50esac
51
52# dh_installdeb will replace this with shell code automatically
53# generated by other debhelper scripts.
54
55#DEBHELPER#
56
57exit 0