mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-09-22 20:27:19 +02:00
Cockpit: use get_os_info for codename, drop obsolete unsupported-version prompt
This commit is contained in:
+12
-21
@@ -15,42 +15,33 @@ network_check
|
|||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Cockpit"
|
msg_info "Installing Cockpit"
|
||||||
source /etc/os-release
|
CODENAME=$(get_os_info codename)
|
||||||
cat <<EOF >/etc/apt/sources.list.d/debian-backports.sources
|
cat <<EOF >/etc/apt/sources.list.d/debian-backports.sources
|
||||||
Types: deb deb-src
|
Types: deb deb-src
|
||||||
URIs: http://deb.debian.org/debian
|
URIs: http://deb.debian.org/debian
|
||||||
Suites: ${VERSION_CODENAME}-backports
|
Suites: ${CODENAME}-backports
|
||||||
Components: main
|
Components: main
|
||||||
Enabled: yes
|
Enabled: yes
|
||||||
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
|
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
$STD apt update
|
$STD apt update
|
||||||
$STD apt install -t ${VERSION_CODENAME}-backports cockpit cracklib-runtime --no-install-recommends -y
|
$STD apt install -t ${CODENAME}-backports cockpit cracklib-runtime --no-install-recommends -y
|
||||||
sed -i "s/root//g" /etc/cockpit/disallowed-users
|
sed -i "s/root//g" /etc/cockpit/disallowed-users
|
||||||
msg_ok "Installed Cockpit"
|
msg_ok "Installed Cockpit"
|
||||||
|
|
||||||
# 45Drives only publishes amd64 packages
|
# 45Drives only publishes amd64 packages
|
||||||
[[ "$(arch_resolve)" == "arm64" ]] || read -r -p "Would you like to install 45Drives' cockpit-file-sharing, cockpit-identities, and cockpit-navigator <y/N> " prompt
|
[[ "$(arch_resolve)" == "arm64" ]] || read -r -p "Would you like to install 45Drives' cockpit-file-sharing, cockpit-identities, and cockpit-navigator <y/N> " prompt
|
||||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||||
install_45drives=true
|
msg_info "Installing 45Drives' cockpit extensions"
|
||||||
if [[ "${VERSION_ID}" -ge 14 ]]; then
|
setup_deb822_repo "45drives" \
|
||||||
read -r -p "Debian ${VERSION_ID} is not officially supported by 45Drives yet, would you like to continue anyway? <y/N> " prompt
|
"https://repo.45drives.com/key/gpg.asc" \
|
||||||
if [[ ! "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
"https://repo.45drives.com/enterprise/debian" \
|
||||||
install_45drives=false
|
"${CODENAME}" \
|
||||||
fi
|
"main" \
|
||||||
fi
|
"amd64"
|
||||||
if [[ "$install_45drives" == "true" ]]; then
|
$STD apt install -y cockpit-file-sharing cockpit-identities cockpit-navigator
|
||||||
msg_info "Installing 45Drives' cockpit extensions"
|
msg_ok "Installed 45Drives' cockpit extensions"
|
||||||
setup_deb822_repo "45drives" \
|
|
||||||
"https://repo.45drives.com/key/gpg.asc" \
|
|
||||||
"https://repo.45drives.com/enterprise/debian" \
|
|
||||||
"${VERSION_CODENAME}" \
|
|
||||||
"main" \
|
|
||||||
"amd64"
|
|
||||||
$STD apt install -y cockpit-file-sharing cockpit-identities cockpit-navigator
|
|
||||||
msg_ok "Installed 45Drives' cockpit extensions"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
|
|||||||
Reference in New Issue
Block a user