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