]> git.proxmox.com Git - pmg-api.git/blame - debian/postinst
PMG/Service/pmgmirror.pm: restart when we detect increased memory usage
[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
ef23c01a
DM
12 if systemctl --quiet is-active pmgdaemon.service ; then
13 deb-systemd-invoke reload-or-try-restart pmgdaemon.service
14 fi
15
16 if systemctl --quiet is-active pmgproxy.service ; then
17 deb-systemd-invoke reload-or-try-restart pmgproxy.service
18 fi
19
20 if systemctl --quiet is-active pmg-smtp-filter.service ; then
21 deb-systemd-invoke reload-or-try-restart pmg-smtp-filter.service
22 fi
23
24 if systemctl --quiet is-active pmgpolicy.service ; then
25 deb-systemd-invoke reload-or-try-restart pmgpolicy.service
26 fi
3cf7a549 27
dbe94472
DM
28 if systemctl --quiet is-active pmgtunnel.service ; then
29 deb-systemd-invoke reload-or-try-restart pmgtunnel.service
30 fi
31
3cf7a549
DM
32 exit 0
33 ;;
34
0854fb22 35 configure)
ebe7f62b 36
a169384f 37 test -e /proxmox_install_mode && exit 0;
cf521b5d 38
ef23c01a
DM
39 pmgconfig init
40
41 if [ -n "$2" ]; then
42 pmgconfig sync
43 else
44 if systemctl --quiet is-active pmgpolicy.service ; then
45 deb-systemd-invoke reload-or-try-restart postgres.service
46 fi
47 pmgconfig sync --restart
48 fi
49
a169384f
DM
50 pmgdb init
51 pmgdb update >/dev/null 2>&1 &
cf521b5d 52
a169384f 53 update-mime-database /usr/share/mime
0854fb22
DM
54 ;;
55
56 abort-upgrade|abort-remove|abort-deconfigure)
57 ;;
58
59 *)
60 echo "postinst called with unknown argument \`$1'" >&2
61 exit 1
62 ;;
63esac
64
65# dh_installdeb will replace this with shell code automatically
66# generated by other debhelper scripts.
67
68#DEBHELPER#
69
70exit 0