3 # Abort if any command returns an error value
6 # This script is called as the last step of the installation of the
7 # package. All the package's files are in place, dpkg has already
8 # done its automatic conffile handling, and all the packages we depend
9 # of are already fully installed and configured.
13 # We don't print a status message here, as dpkg already said
14 # "Processing triggers for ...".
16 # test if /etc/pve is mounted; else simple exit to avoid
17 # error during updates
18 test -f /etc
/pve
/local
/pve-ssl.pem ||
exit 0;
19 test -e /proxmox_install_mode
&& exit 0;
21 # the ExecStartPre doesn't triggers on service reload, so just in case
22 /usr
/bin
/pvecm updatecerts
--silent || true
24 deb-systemd-invoke reload-or-try-restart pvedaemon.service
25 deb-systemd-invoke reload-or-try-restart pvestatd.service
26 deb-systemd-invoke reload-or-try-restart pveproxy.service
27 deb-systemd-invoke reload-or-try-restart spiceproxy.service
32 # Configure this package. If the package must prompt the user for
33 # information, do it here.
35 mkdir
/etc
/pve
2>/dev
/null || true
37 if test ! -e /var
/lib
/pve-manager
/apl-info
/download.proxmox.com
; then
38 mkdir
-p /var
/lib
/pve-manager
/apl-info
39 cp /usr
/share
/doc
/pve-manager
/aplinfo.dat
/var
/lib
/pve-manager
/apl-info
/download.proxmox.com
43 if ! test -f /root
/.forward ||
! grep -q '|/usr/bin/pvemailforward' /root
/.forward
; then
44 echo '|/usr/bin/pvemailforward' >>/root
/.forward
47 systemctl
--system daemon-reload
>/dev
/null || true
49 # same as dh_systemd_enable (code copied)
51 UNITS
="pvedaemon.service pveproxy.service spiceproxy.service pvestatd.service pvebanner.service pvesr.timer pve-daily-update.timer"
52 NO_RESTART_UNITS
="pvenetcommit.service pve-guests.service"
54 for unit
in ${UNITS} ${NO_RESTART_UNITS}; do
55 deb-systemd-helper unmask
"$unit" >/dev
/null || true
57 # was-enabled defaults to true, so new installations run enable.
58 if deb-systemd-helper
--quiet was-enabled
"$unit"; then
59 # Enables the unit on first installation, creates new
60 # symlinks on upgrades if the unit file has changed.
61 deb-systemd-helper
enable "$unit" >/dev
/null || true
63 # Update the statefile to add new symlinks (if any), which need to be
64 # cleaned up on purge. Also remove old symlinks.
65 deb-systemd-helper update-state
"$unit" >/dev
/null || true
69 if test ! -e /proxmox_install_mode
; then
70 # modeled after code generated by dh_start
71 for unit
in ${UNITS}; do
73 dh_action
="reload-or-try-restart";
77 if systemctl
-q is-enabled
"$unit"; then
78 deb-systemd-invoke
$dh_action "$unit"
83 # TODO: remove once PVE 7.0 is released
85 if dpkg
--compare-versions "$2" 'lt' '6.0-11'; then
91 abort-upgrade|abort-remove|abort-deconfigure
)
94 *) echo "$0: didn't understand being called with \`$1'" 1>&2
98 # FIXME: remove in 7.0
99 dpkg-maintscript-helper rm_conffile
/etc
/apt
/apt.conf.d
/75pveconf
6.0-0\
+3 pve-manager
-- "$@"