Compare commits

..

3 Commits

Author SHA1 Message Date
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
MickLesk
6bb4b53907 PMG Post Install: detect gateway via dpkg or PMG service units 2026-04-12 21:13:25 +02:00
MickLesk
7c268219f4 PMG Post Install: Detect gateway via /etc/os-release when /etc/issue is generic 2026-04-12 20:56:45 +02:00
12 changed files with 93 additions and 68 deletions

View File

@@ -442,33 +442,12 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
</details>
## 2026-04-13
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Bambuddy: preserve database and archive on update [@Copilot](https://github.com/Copilot) ([#13706](https://github.com/community-scripts/ProxmoxVE/pull/13706))
- #### ✨ New Features
- OpenCloud: pin version to 6.0.0 [@vhsdream](https://github.com/vhsdream) ([#13691](https://github.com/community-scripts/ProxmoxVE/pull/13691))
- #### 🔧 Refactor
- core: remove unused TEMP_DIR mktemp leak in build_container / clean sonarqube [@MickLesk](https://github.com/MickLesk) ([#13708](https://github.com/community-scripts/ProxmoxVE/pull/13708))
## 2026-04-12
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Alpine-Wakapi: Remove container checks in update_script function [@MickLesk](https://github.com/MickLesk) ([#13694](https://github.com/community-scripts/ProxmoxVE/pull/13694))
- #### 🔧 Refactor
- IronClaw: Install keychain dependencies and launch in a DBus session [@MickLesk](https://github.com/MickLesk) ([#13692](https://github.com/community-scripts/ProxmoxVE/pull/13692))
- MeTube: Allow pnpm build scripts to fix ERR_PNPM_IGNORED_BUILDS [@MickLesk](https://github.com/MickLesk) ([#13668](https://github.com/community-scripts/ProxmoxVE/pull/13668))
## 2026-04-11

View File

@@ -22,6 +22,8 @@ catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/wakapi ]]; then
msg_error "No ${APP} Installation Found!"
exit

View File

@@ -39,9 +39,6 @@ function update_script() {
msg_info "Backing up Configuration and Data"
cp /opt/bambuddy/.env /opt/bambuddy.env.bak
cp -r /opt/bambuddy/data /opt/bambuddy_data_bak
[[ -f /opt/bambuddy/bambuddy.db ]] && cp /opt/bambuddy/bambuddy.db /opt/bambuddy.db.bak
[[ -f /opt/bambuddy/bambutrack.db ]] && cp /opt/bambuddy/bambutrack.db /opt/bambutrack.db.bak
[[ -d /opt/bambuddy/archive ]] && cp -r /opt/bambuddy/archive /opt/bambuddy_archive_bak
msg_ok "Backed up Configuration and Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "bambuddy" "maziggy/bambuddy" "tarball" "latest" "/opt/bambuddy"
@@ -62,14 +59,8 @@ function update_script() {
mkdir -p /opt/bambuddy/data
cp /opt/bambuddy.env.bak /opt/bambuddy/.env
cp -r /opt/bambuddy_data_bak/. /opt/bambuddy/data/
[[ -f /opt/bambuddy.db.bak ]] && cp /opt/bambuddy.db.bak /opt/bambuddy/bambuddy.db
[[ -f /opt/bambutrack.db.bak ]] && cp /opt/bambutrack.db.bak /opt/bambuddy/bambutrack.db
if [[ -d /opt/bambuddy_archive_bak ]]; then
mkdir -p /opt/bambuddy/archive
cp -r /opt/bambuddy_archive_bak/. /opt/bambuddy/archive/
fi
rm -f /opt/bambuddy.env.bak /opt/bambuddy.db.bak /opt/bambutrack.db.bak
rm -rf /opt/bambuddy_data_bak /opt/bambuddy_archive_bak
rm -f /opt/bambuddy.env.bak
rm -rf /opt/bambuddy_data_bak
msg_ok "Restored Configuration and Data"
msg_info "Starting Service"

View File

@@ -29,7 +29,7 @@ function update_script() {
exit
fi
RELEASE="v6.0.0"
RELEASE="v5.2.0"
if check_for_gh_release "OpenCloud" "opencloud-eu/opencloud" "${RELEASE}" "each release is tested individually before the version is updated. Please do not open issues for this"; then
msg_info "Stopping services"
systemctl stop opencloud opencloud-wopi

View File

@@ -43,7 +43,6 @@ function update_script() {
RELEASE=$(get_latest_github_release "SonarSource/sonarqube")
curl -fsSL "https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-${RELEASE}.zip" -o $temp_file
unzip -q "$temp_file" -d /opt
rm -f "$temp_file"
mv /opt/sonarqube-${RELEASE} /opt/sonarqube
echo "${RELEASE}" > ~/.sonarqube
msg_ok "Updated SonarQube"

View File

@@ -14,7 +14,7 @@ network_check
update_os
msg_info "Installing Dependencies"
$STD apk add openssl dbus gnome-keyring
$STD apk add openssl
msg_ok "Installed Dependencies"
msg_info "Installing PostgreSQL"
@@ -57,8 +57,7 @@ cat <<EOF >/etc/init.d/ironclaw
name="IronClaw"
description="IronClaw AI Agent"
command="/usr/bin/dbus-run-session"
command_args="/usr/local/bin/ironclaw"
command="/usr/local/bin/ironclaw"
command_background=true
pidfile="/run/ironclaw.pid"
directory="/root"

View File

@@ -13,13 +13,6 @@ setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt install -y \
dbus-user-session \
gnome-keyring \
libsecret-tools
msg_ok "Installed Dependencies"
PG_VERSION="17" PG_MODULES="pgvector" setup_postgresql
PG_DB_NAME="ironclaw" PG_DB_USER="ironclaw" PG_DB_EXTENSIONS="vector" setup_postgresql_db
@@ -53,8 +46,7 @@ After=network.target postgresql.service
Type=simple
User=root
WorkingDirectory=/root
EnvironmentFile=/root/.ironclaw/.env
ExecStart=/usr/bin/dbus-run-session /usr/local/bin/ironclaw
ExecStart=/usr/local/bin/ironclaw
Restart=on-failure
RestartSec=5

View File

@@ -64,7 +64,7 @@ $STD sudo -u cool coolconfig set-admin-password --user=admin --password="$COOLPA
echo "$COOLPASS" >~/.coolpass
msg_ok "Installed Collabora Online"
fetch_and_deploy_gh_release "OpenCloud" "opencloud-eu/opencloud" "singlefile" "v6.0.0" "/usr/bin" "opencloud-*-linux-amd64"
fetch_and_deploy_gh_release "OpenCloud" "opencloud-eu/opencloud" "singlefile" "v5.2.0" "/usr/bin" "opencloud-*-linux-amd64"
mv /usr/bin/OpenCloud /usr/bin/opencloud
msg_info "Configuring OpenCloud"

View File

@@ -21,6 +21,13 @@ setup_deb822_repo \
"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

View File

@@ -21,7 +21,6 @@ temp_file=$(mktemp)
RELEASE=$(get_latest_github_release "SonarSource/sonarqube")
curl -fsSL "https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-${RELEASE}.zip" -o $temp_file
unzip -q "$temp_file" -d /opt
rm -f "$temp_file"
mv /opt/sonarqube-* /opt/sonarqube
$STD useradd -r -m -U -d /opt/sonarqube -s /bin/bash sonarqube
chown -R sonarqube:sonarqube /opt/sonarqube

View File

@@ -3613,6 +3613,8 @@ build_container() {
fi
# Build PCT_OPTIONS as string for export
TEMP_DIR=$(mktemp -d)
pushd "$TEMP_DIR" >/dev/null
local _func_url
if [ "$var_os" == "alpine" ]; then
_func_url="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/alpine-install.func"

View File

@@ -47,7 +47,8 @@ msg_error() {
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "post-pmg-install" "pve"
if ! grep -q "Proxmox Mail Gateway" /etc/issue 2>/dev/null; then
if ! dpkg -s proxmox-mailgateway-container >/dev/null 2>&1 &&
! dpkg -s proxmox-mailgateway >/dev/null 2>&1; then
msg_error "This script is only intended for Proxmox Mail Gateway"
exit 232
fi
@@ -57,14 +58,24 @@ repo_state() {
local repo="$1"
local file=""
local state="missing"
for f in /etc/apt/sources.list /etc/apt/sources.list.d/*.list; do
for f in /etc/apt/sources.list /etc/apt/sources.list.d/*.list /etc/apt/sources.list.d/*.sources; do
[[ -f "$f" ]] || continue
if grep -q "$repo" "$f"; then
file="$f"
if grep -qE "^[^#].*${repo}" "$f"; then
state="active"
elif grep -qE "^#.*${repo}" "$f"; then
state="disabled"
if [[ "$f" == *.sources ]]; then
# deb822 format: check Enabled field
if grep -qiE '^Enabled:\s*no' "$f"; then
state="disabled"
else
state="active"
fi
else
# legacy format
if grep -qE "^[^#].*${repo}" "$f"; then
state="active"
elif grep -qE "^#.*${repo}" "$f"; then
state="disabled"
fi
fi
break
fi
@@ -72,6 +83,28 @@ repo_state() {
echo "$state $file"
}
toggle_repo() {
# $1 = file, $2 = action (enable|disable)
local file="$1" action="$2"
if [[ "$file" == *.sources ]]; then
if [[ "$action" == "disable" ]]; then
if grep -qiE '^Enabled:' "$file"; then
sed -i 's/^Enabled:.*/Enabled: no/' "$file"
else
echo "Enabled: no" >>"$file"
fi
else
sed -i 's/^Enabled:.*/Enabled: yes/' "$file"
fi
else
if [[ "$action" == "disable" ]]; then
sed -i '/^[^#]/s/^/# /' "$file"
else
sed -i 's/^# *//' "$file"
fi
fi
}
start_routines() {
header_info
VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)"
@@ -84,11 +117,20 @@ start_routines() {
case $CHOICE in
yes)
msg_info "Correcting Debian Sources"
cat <<EOF >/etc/apt/sources.list
deb http://deb.debian.org/debian ${VERSION} main contrib
deb http://deb.debian.org/debian ${VERSION}-updates main contrib
deb http://security.debian.org/debian-security ${VERSION}-security main contrib
cat <<EOF >/etc/apt/sources.list.d/debian.sources
Types: deb
URIs: http://deb.debian.org/debian
Suites: ${VERSION} ${VERSION}-updates
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
Types: deb
URIs: http://security.debian.org/debian-security
Suites: ${VERSION}-security
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
EOF
rm -f /etc/apt/sources.list
msg_ok "Corrected Debian Sources"
;;
no) msg_error "Selected no to Correcting Debian Sources" ;;
@@ -108,7 +150,7 @@ EOF
keep) msg_ok "Kept 'pmg-enterprise' repository" ;;
disable)
msg_info "Disabling 'pmg-enterprise' repository"
sed -i "s/^[^#].*pmg-enterprise/# &/" "$file"
toggle_repo "$file" disable
msg_ok "Disabled 'pmg-enterprise' repository"
;;
delete)
@@ -128,7 +170,7 @@ EOF
case $CHOICE in
enable)
msg_info "Enabling 'pmg-enterprise' repository"
sed -i "s/^#.*pmg-enterprise/deb/" "$file"
toggle_repo "$file" enable
msg_ok "Enabled 'pmg-enterprise' repository"
;;
keep) msg_ok "Kept 'pmg-enterprise' repository disabled" ;;
@@ -149,8 +191,12 @@ EOF
case $CHOICE in
yes)
msg_info "Adding 'pmg-enterprise' repository"
cat >/etc/apt/sources.list.d/pmg-enterprise.list <<EOF
deb https://enterprise.proxmox.com/debian/pmg ${VERSION} pmg-enterprise
cat >/etc/apt/sources.list.d/pmg-enterprise.sources <<EOF
Types: deb
URIs: https://enterprise.proxmox.com/debian/pmg
Suites: ${VERSION}
Components: pmg-enterprise
Signed-By: /etc/apt/keyrings/pmg.gpg
EOF
msg_ok "Added 'pmg-enterprise' repository"
;;
@@ -173,7 +219,7 @@ EOF
keep) msg_ok "Kept 'pmg-no-subscription' repository" ;;
disable)
msg_info "Disabling 'pmg-no-subscription' repository"
sed -i "s/^[^#].*pmg-no-subscription/# &/" "$file"
toggle_repo "$file" disable
msg_ok "Disabled 'pmg-no-subscription' repository"
;;
delete)
@@ -193,7 +239,7 @@ EOF
case $CHOICE in
enable)
msg_info "Enabling 'pmg-no-subscription' repository"
sed -i "s/^#.*pmg-no-subscription/deb/" "$file"
toggle_repo "$file" enable
msg_ok "Enabled 'pmg-no-subscription' repository"
;;
keep) msg_ok "Kept 'pmg-no-subscription' repository disabled" ;;
@@ -213,8 +259,12 @@ EOF
case $CHOICE in
yes)
msg_info "Adding 'pmg-no-subscription' repository"
cat >/etc/apt/sources.list.d/pmg-install-repo.list <<EOF
deb http://download.proxmox.com/debian/pmg ${VERSION} pmg-no-subscription
cat >/etc/apt/sources.list.d/pmg-no-subscription.sources <<EOF
Types: deb
URIs: http://download.proxmox.com/debian/pmg
Suites: ${VERSION}
Components: pmg-no-subscription
Signed-By: /etc/apt/keyrings/pmg.gpg
EOF
msg_ok "Added 'pmg-no-subscription' repository"
;;
@@ -236,8 +286,13 @@ EOF
case $CHOICE in
yes)
msg_info "Adding 'pmgtest' repository (disabled)"
cat >/etc/apt/sources.list.d/pmgtest-for-beta.list <<EOF
# deb http://download.proxmox.com/debian/pmg ${VERSION} pmgtest
cat >/etc/apt/sources.list.d/pmgtest.sources <<EOF
Types: deb
URIs: http://download.proxmox.com/debian/pmg
Suites: ${VERSION}
Components: pmgtest
Signed-By: /etc/apt/keyrings/pmg.gpg
Enabled: no
EOF
msg_ok "Added 'pmgtest' repository"
;;