Commit Graph

26 Commits

Author SHA1 Message Date
Thomas Lamprecht
737c6f66ec d/postinst: handle static machine-id from ISO 5.0 <= x <= 6.0
Ported over from commit 8797cc74cd94583130ab4c2f541d1a75b518cfa6
of pve-manager, but with the list of machine-id extracted from PMG
ISOs.

The full map:

PMG 5.0-5  -> "e378bde63ac54872a85af23a8e4dac73"
PMG 5.1-1  -> "932b668d1fad4709b4976d54152d223c"
PMG 5.1-2  -> "931a8410cd034202a26b0e19d56e157a"
PMG 5.2-1  -> "9a1f3c5284e1423c9b0e0ee5819db6c9"
PMG 6.0-1  -> "5472a49c6436426fbebd7881f7b7f13b"

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-29 10:42:10 +02:00
Thomas Lamprecht
e97f0405f9 d/postinst: avoid processing non existent '*' templates due to glob
if there's no file at all in that path the wildcard glob won't expand
and POSIX shell will use '*' as filename, which will then fail.

Avoid that.

Reported-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-03 19:37:40 +02:00
Stoiko Ivanov
ac81f7c976 Use ucf to handle template overrides
ucf(1) is a utility to track changes in config files which are not shipped in
the debian package (but e.g. get generated through the postinst script)

While the template overriding mechanism of PMG does not directly write those
config files - users who override a config-file currently need to manually
compare the templates shipped in '/var/lib/pmg/templates' on every upgrade.

By selectively registering the existing template overrides with ucf, users get
asked once upon the next upgrade regarding their changes, and then will
always get prompted when the shipped default template changes.

The alternative of unconditionally registering all templates with ucf, as done
by dh_ucf (1), would copy all templates to /etc/pmg/templates, which I deemed
less elegant.

The postrm script's check for the existance of 'ucf' only should be sufficient,
since the other ucf executables used ('ucfq' and 'ucfr' are all shipped with
the 'ucf' package)

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
[ dropped some extra lines left over from v1 ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-14 09:35:07 +02:00
Fabian Grünbichler
496063519b postinst: always use pmgconfig sync --restart
since that already checks whether we need to reload the services,
'pmgconfig sync' alone only updates the config files..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-07-30 10:07:49 +02:00
Fabian Grünbichler
0e9278897d postinst: make service reload/restart more robust
like debhelper would do when generating such snippets.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-07-29 11:24:56 +02:00
Dominik Csapak
fe7a2114e9 restart postfix after first installing pmg-api
when installing on debian, restarting postfix is necessary for it
to change the bind address (default is 127.0.0.1)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-07-29 11:19:56 +02:00
Dietmar Maurer
2305fb86e4 debian/postinst/prerm - handle pmgproxy/pmgdaemon manually
We use reload instead of restart to keep vnc connection active
durning updates.
2017-12-05 14:10:26 +01:00
Dietmar Maurer
07959366f5 debian/postinst - rewrite banner 2017-12-05 13:29:37 +01:00
Dietmar Maurer
b4610a89fb debian/postinst - fix postgres service name (postgresql.service) 2017-11-17 11:29:12 +01:00
Dietmar Maurer
7aa01a972b debian/postinst - simplify code 2017-11-17 11:27:38 +01:00
Dietmar Maurer
ed4c9e72f0 do not use #DEBHELPER# macro inside comment 2017-11-17 11:19:32 +01:00
Dietmar Maurer
5e374987fd debian/postinst - do not skip service setup in /proxmox_install_mode 2017-11-17 09:30:30 +01:00
Dietmar Maurer
bc1ebe2540 postinst: call pmgdb init before config sync
This is now required, befause config sync use the database.
2017-04-29 09:24:17 +02:00
Dietmar Maurer
b970485eb0 debian/postinst: cleanup - use a loop 2017-04-14 10:36:11 +02:00
Dietmar Maurer
07f15aa38b debian/postinst: restart pmgmirror when triggered 2017-04-14 09:51:02 +02:00
Dietmar Maurer
dbe9447243 bin/pmgtunnel: new service to tunnel database connections 2017-04-11 16:41:02 +02:00
Dietmar Maurer
ef23c01a4c debian/postinst: try to correctly restart services on first install, cleanups 2017-04-05 11:26:25 +02:00
Dietmar Maurer
a169384ff6 debian/postinst: cleanup, avoid update-mime-database in proxmox_install_mode 2017-03-24 11:17:58 +01:00
Dietmar Maurer
ec5c426dde pmgnetcommit.service: new service to commit network changes at startup 2017-02-23 12:52:34 +01:00
Dietmar Maurer
cf521b5d11 postinst: call update-mime-database 2017-02-22 17:01:03 +01:00
Dietmar Maurer
bc44eb026d pmgconfig: new apicert and tlscert helpers 2017-02-22 16:46:40 +01:00
Dietmar Maurer
46e12d585b install pmgpolicy service 2017-02-21 12:12:19 +01:00
Dietmar Maurer
4a6182ab28 install pmg-smtp-filter.service 2017-02-17 12:56:51 +01:00
Dietmar Maurer
ebe7f62b0e initialize database in postinst script 2017-02-15 06:44:46 +01:00
Dietmar Maurer
3cf7a54975 debian/postinst: add triggered action 2017-02-13 13:55:36 +01:00
Dietmar Maurer
0854fb222a implement pmgproxy.pm 2017-01-26 12:29:27 +01:00