]> git.proxmox.com Git - pmg-api.git/blame - debian/postinst
PMG::Cluster::sync_config_from_master - print note when local node is master
[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
DM
27
28 exit 0
29 ;;
30
0854fb22 31 configure)
ebe7f62b 32
a169384f 33 test -e /proxmox_install_mode && exit 0;
cf521b5d 34
ef23c01a
DM
35 pmgconfig init
36
37 if [ -n "$2" ]; then
38 pmgconfig sync
39 else
40 if systemctl --quiet is-active pmgpolicy.service ; then
41 deb-systemd-invoke reload-or-try-restart postgres.service
42 fi
43 pmgconfig sync --restart
44 fi
45
a169384f
DM
46 pmgdb init
47 pmgdb update >/dev/null 2>&1 &
cf521b5d 48
a169384f 49 update-mime-database /usr/share/mime
0854fb22
DM
50 ;;
51
52 abort-upgrade|abort-remove|abort-deconfigure)
53 ;;
54
55 *)
56 echo "postinst called with unknown argument \`$1'" >&2
57 exit 1
58 ;;
59esac
60
61# dh_installdeb will replace this with shell code automatically
62# generated by other debhelper scripts.
63
64#DEBHELPER#
65
66exit 0