mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-02-03 20:03:25 +01:00
tools: add ubuntu PHP repository setup (#11034)
Switches to using the ondrej/php PPA for Ubuntu and retains the Sury repository for Debian when setting up PHP. This ensures compatibility with the respective distributions' recommended PHP sources.
This commit is contained in:
committed by
GitHub
parent
1d7d8c27fa
commit
5c9087a91a
@@ -4387,11 +4387,19 @@ EOF
|
||||
return 1
|
||||
}
|
||||
|
||||
manage_tool_repository "php" "$PHP_VERSION" "" "https://packages.sury.org/debsuryorg-archive-keyring.deb" || {
|
||||
msg_error "Failed to setup PHP repository"
|
||||
return 1
|
||||
}
|
||||
|
||||
# Use different repository based on OS
|
||||
if [[ "$DISTRO_ID" == "ubuntu" ]]; then
|
||||
# Ubuntu: Use ondrej/php PPA
|
||||
msg_info "Adding ondrej/php PPA for Ubuntu"
|
||||
$STD apt install -y software-properties-common
|
||||
$STD add-apt-repository -y ppa:ondrej/php
|
||||
else
|
||||
# Debian: Use Sury repository
|
||||
manage_tool_repository "php" "$PHP_VERSION" "" "https://packages.sury.org/debsuryorg-archive-keyring.deb" || {
|
||||
msg_error "Failed to setup PHP repository"
|
||||
return 1
|
||||
}
|
||||
fi
|
||||
ensure_apt_working || return 1
|
||||
$STD apt update
|
||||
|
||||
|
||||
Reference in New Issue
Block a user