Compare commits

..

6 Commits

Author SHA1 Message Date
2a0b061c34 Merge branch 'refactor-cosmos-debian13' of https://github.com/community-scripts/ProxmoxVE into refactor-cosmos-debian13 2025-12-19 13:45:40 +01:00
908daaefee [Refactor] Cosmos: Upgrade to Debian 13 and modernize with tools.func
Major refactoring to fix mergerfs dependency issues and modernize the installation:

Changes in ct/cosmos.sh:
- Updated from Debian 12 to Debian 13 (Trixie)
- Fixed APP name capitalization: cosmos  Cosmos
- Improved tags formatting: os,docker  cloud;docker

Changes in install/cosmos-install.sh:
- Install mergerfs via apt (available in Debian 13 repos)
  * Automatically handles fuse dependencies
  * Removes need for manual .deb installation
  * No more hardcoded Bullseye package
- Added ca-certificates and openssl (per official Dockerfile)
- Replaced manual Docker installation with setup_docker helper
- Replaced manual GitHub release download with fetch_and_deploy_gh_release
  * Uses prebuild mode with cosmos-cloud-*-amd64.zip pattern
  * Automatic version detection and extraction
  * Proper error handling and retry logic
- Standardized apt-get  apt usage
- Added unzip to dependencies (required by fetch_and_deploy_gh_release)

Benefits:
- Fixes mergerfs dependency errors (issue #TMD44)
- More maintainable (uses helper functions instead of manual curl/unzip)
- Better error handling and version tracking
- Automatic architecture detection via apt
- Matches official Cosmos Dockerfile dependency list
- Future-proof for Debian version changes

Fixes dependency issues where mergerfs failed to install due to missing fuse
package. In Debian 13, mergerfs is available via apt and properly declares its
dependencies, so apt handles everything automatically.
2025-12-19 13:45:26 +01:00
38a2fec5d3 [Refactor] Cosmos: Upgrade to Debian 13 and modernize with tools.func
Major refactoring to fix mergerfs dependency issues and modernize the installation:

Changes in ct/cosmos.sh:
- Updated from Debian 12 to Debian 13 (Trixie)
- Fixed APP name capitalization: cosmos  Cosmos
- Improved tags formatting: os,docker  cloud;docker

Changes in install/cosmos-install.sh:
- Install mergerfs via apt (available in Debian 13 repos)
  * Automatically handles fuse dependencies
  * Removes need for manual .deb installation
  * No more hardcoded Bullseye package
- Added ca-certificates and openssl (per official Dockerfile)
- Replaced manual Docker installation with setup_docker helper
- Replaced manual GitHub release download with fetch_and_deploy_gh_release
  * Uses prebuild mode with cosmos-cloud-*-amd64.zip pattern
  * Automatic version detection and extraction
  * Proper error handling and retry logic
- Standardized apt-get  apt usage
- Added unzip to dependencies (required by fetch_and_deploy_gh_release)

Benefits:
- Fixes mergerfs dependency errors (issue #TMD44)
- More maintainable (uses helper functions instead of manual curl/unzip)
- Better error handling and version tracking
- Automatic architecture detection via apt
- Matches official Cosmos Dockerfile dependency list
- Future-proof for Debian version changes

Fixes dependency issues where mergerfs failed to install due to missing fuse
package. In Debian 13, mergerfs is available via apt and properly declares its
dependencies, so apt handles everything automatically.
2025-12-19 13:43:16 +01:00
00137d4441 Update .app files (#10140)
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2025-12-19 13:25:23 +01:00
159b5ee22e Update CHANGELOG.md (#10139)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-12-19 12:22:30 +00:00
5beb983b7f Refactor (#10070) 2025-12-19 13:22:07 +01:00
8 changed files with 44 additions and 46 deletions

View File

@ -12,6 +12,12 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
## 2025-12-19
### 🚀 Updated Scripts
- #### 🔧 Refactor
- Refactor: Proxmox-Mail-Gateway [@tremor021](https://github.com/tremor021) ([#10070](https://github.com/community-scripts/ProxmoxVE/pull/10070))
### ❔ Uncategorized
- Update paymenter.json(#10133) [@DragoQC](https://github.com/DragoQC) ([#10134](https://github.com/community-scripts/ProxmoxVE/pull/10134))

View File

@ -5,14 +5,15 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://https://cosmos-cloud.io/
APP="cosmos"
var_tags="${var_tags:-os,docker}"
APP="Cosmos"
var_tags="${var_tags:-cloud;docker}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-8}"
var_os="${var_os:-debian}"
var_version="${var_version:-12}"
var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}"
var_fuse="${var_fuse:-yes}"
header_info "$APP"
variables

View File

@ -27,10 +27,11 @@ function update_script() {
msg_error "No ${APP} Installation Found!"
exit
fi
msg_info "Updating ${APP}"
msg_info "Updating Proxmox-Mail-Gateway"
$STD apt update
$STD apt -y upgrade
msg_ok "Updated ${APP}"
$STD apt upgrade -y
msg_ok "Updated Proxmox-Mail-Gateway"
msg_ok "Updated successfully!"
exit
}

View File

@ -24,7 +24,7 @@
"ram": 2048,
"hdd": 8,
"os": "debian",
"version": "12"
"version": "13"
}
}
],
@ -36,6 +36,10 @@
{
"type": "info",
"text": "The file `/etc/sysconfig/CosmosCloud` is optional. If you need custom settings, you can create it yourself."
},
{
"type": "warning",
"text": "Requires FUSE support for mergerfs functionality. FUSE is enabled by default during installation."
}
]
}

View File

@ -14,38 +14,23 @@ network_check
update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
$STD apt install -y \
ca-certificates \
openssl \
snapraid \
avahi-daemon \
fdisk
fdisk \
mergerfs \
unzip
msg_ok "Installed Dependencies"
msg_info "Install mergerfs"
MERGERFS_VERSION="2.40.2"
curl -fsSL "https://github.com/trapexit/mergerfs/releases/download/${MERGERFS_VERSION}/mergerfs_${MERGERFS_VERSION}.debian-bullseye_amd64.deb" -o "mergerfs_${MERGERFS_VERSION}.debian-bullseye_amd64.deb"
$STD dpkg -i "mergerfs_${MERGERFS_VERSION}.debian-bullseye_amd64.deb" || $STD apt-get install -f -y
rm "mergerfs_${MERGERFS_VERSION}.debian-bullseye_amd64.deb"
msg_ok "Installed mergerfs"
setup_docker
fetch_and_deploy_gh_release "cosmos" "azukaar/Cosmos-Server" "prebuild" "latest" "/opt/cosmos" "cosmos-cloud-*-amd64.zip"
msg_info "Install Docker"
curl -fsSL https://get.docker.com -o get-docker.sh
$STD sh get-docker.sh
rm get-docker.sh
msg_ok "Installed Docker"
msg_info "Install Cosmos"
mkdir -p /opt/cosmos
LATEST_RELEASE=$(curl -fsSL https://api.github.com/repos/azukaar/Cosmos-Server/releases/latest | grep "tag_name" | cut -d '"' -f 4)
ZIP_FILE="cosmos-cloud-${LATEST_RELEASE#v}-amd64.zip"
curl -fsSL "https://github.com/azukaar/Cosmos-Server/releases/download/${LATEST_RELEASE}/${ZIP_FILE}" -o "/opt/cosmos/${ZIP_FILE}"
msg_info "Setting up Cosmos"
cd /opt/cosmos
$STD unzip -o -q "${ZIP_FILE}"
LATEST_RELEASE_NO_V=${LATEST_RELEASE#v}
mv /opt/cosmos/cosmos-cloud-${LATEST_RELEASE_NO_V}/* /opt/cosmos/
rmdir /opt/cosmos/cosmos-cloud-${LATEST_RELEASE_NO_V}
chmod +x /opt/cosmos/cosmos
rm -f "/opt/cosmos/cosmos-cloud-${LATEST_RELEASE#v}-amd64.zip"
msg_ok "Installed Cosmos"
msg_ok "Set up Cosmos"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/cosmos.service

View File

@ -14,16 +14,13 @@ 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
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_ok "Installed Proxmox Mail Gateway"
motd_ssh

View File

@ -2626,8 +2626,8 @@ configure_ssh_settings() {
#
# - Entry point of script
# - On Proxmox host: calls install_script
# - In silent mode: runs update_script with automatic cleanup
# - Otherwise: shows update/setting menu and runs update_script with cleanup
# - In silent mode: runs update_script
# - Otherwise: shows update/setting menu
# ------------------------------------------------------------------------------
start() {
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
@ -2638,7 +2638,6 @@ start() {
VERBOSE="no"
set_std_mode
update_script
cleanup_lxc
else
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC Update/Setting" --menu \
"Support/Update functions for ${APP} LXC. Choose an option:" \
@ -2663,7 +2662,6 @@ start() {
;;
esac
update_script
cleanup_lxc
fi
}

View File

@ -0,0 +1,6 @@
__ _ __ __ __ __
____ _/ /_ (_) /_/ /_____ _____________ ____ / /_ ___ _ ______ ____ _____/ /____ _____
/ __ `/ __ \/ / __/ __/ __ \/ ___/ ___/ _ \/ __ \/ __/_____/ _ \| |/_/ __ \/ __ \/ ___/ __/ _ \/ ___/
/ /_/ / /_/ / / /_/ /_/ /_/ / / / / / __/ / / / /_/_____/ __/> </ /_/ / /_/ / / / /_/ __/ /
\__, /_.___/_/\__/\__/\____/_/ /_/ \___/_/ /_/\__/ \___/_/|_/ .___/\____/_/ \__/\___/_/
/_/ /_/