Files
ProxmoxVE/install/proxmox-mail-gateway-install.sh
CanbiZ 12003224dc Refactor cleanup steps to use cleanup_lxc function
Replaces repeated manual cleanup commands with a single call to the cleanup_lxc function across all install scripts. This change improves maintainability and consistency by centralizing cleanup logic.
2025-11-22 14:22:20 +01:00

32 lines
887 B
Bash

#!/usr/bin/env bash
# Copyright (c) 2021-2025 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"
curl -fsSL "https://enterprise.proxmox.com/debian/proxmox-release-trixie.gpg" -o "/usr/share/keyrings/proxmox-release-trixie.gpg"
cat <<EOF >/etc/apt/sources.list.d/pmg.sources
Types: deb
URIs: http://download.proxmox.com/debian/pmg
Suites: trixie
Components: pmg-no-subscription
Signed-By: /usr/share/keyrings/proxmox-release-trixie.gpg
EOF
$STD apt update
$STD apt -y install proxmox-mailgateway-container
msg_ok "Installed Proxmox Mail Gateway"
motd_ssh
customize
cleanup_lxc