Files
ProxmoxVE/install/proxmox-mail-gateway-install.sh
MickLesk 42f15f9438 PMG: migrate post-install to deb822 format, fix APT source conflicts
- Simplify PMG detection to dpkg-based check only
- Extend repo_state() to scan .sources files (deb822 format)
- Add toggle_repo() helper for enable/disable on both formats
- Migrate Debian sources correction to deb822 (debian.sources)
- Migrate pmg-enterprise, pmg-no-subscription, pmgtest repo
  creation to deb822 .sources files
- Install script: clean up duplicate APT sources created by
  proxmox-mailgateway-container package (enterprise.list,
  pmg-install-repo.list, legacy sources.list)
2026-04-12 21:35:14 +02:00

36 lines
979 B
Bash

#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: thost96 (thost96)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://www.proxmox.com/en/products/proxmox-mail-gateway
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Proxmox Mail Gateway"
setup_deb822_repo \
"pmg" \
"https://enterprise.proxmox.com/debian/proxmox-release-trixie.gpg" \
"http://download.proxmox.com/debian/pmg" \
"trixie" \
"pmg-no-subscription"
$STD apt install -y proxmox-mailgateway-container
msg_info "Cleaning up duplicate APT sources"
rm -f /etc/apt/sources.list.d/pmg-enterprise.list
rm -f /etc/apt/sources.list.d/pmg-install-repo.list
[[ -f /etc/apt/sources.list.d/debian.sources ]] && : >/etc/apt/sources.list
msg_ok "Cleaned up duplicate APT sources"
msg_ok "Installed Proxmox Mail Gateway"
motd_ssh
customize
cleanup_lxc