2024-10-18 18:21:51 +02:00
#!/usr/bin/env bash
2026-01-06 13:28:12 +01:00
# Copyright (c) 2021-2026 tteck
2024-10-18 18:21:51 +02:00
# Author: tteck
# Co-Author: havardthom
2025-03-04 17:54:20 +01:00
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
2024-10-18 18:21:51 +02:00
# Source: https://github.com/cockpit-project/cockpit
2025-03-24 14:20:56 +01:00
source /dev/stdin <<< " $FUNCTIONS_FILE_PATH "
2024-10-18 18:21:51 +02:00
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Cockpit"
2026-07-23 23:18:28 +02:00
CODENAME = $( get_os_info codename)
2025-10-14 20:55:40 +02:00
cat <<EOF >/etc/apt/sources.list.d/debian-backports.sources
Types: deb deb-src
URIs: http://deb.debian.org/debian
2026-07-23 23:18:28 +02:00
Suites: ${CODENAME}-backports
2025-10-14 20:55:40 +02:00
Components: main
Enabled: yes
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
EOF
2026-09-24 08:06:49 +02:00
apt_update_safe
2026-07-23 23:18:28 +02:00
$STD apt install -t ${ CODENAME } -backports cockpit cracklib-runtime --no-install-recommends -y
2024-10-18 18:21:51 +02:00
sed -i "s/root//g" /etc/cockpit/disallowed-users
msg_ok "Installed Cockpit"
2026-06-19 17:53:08 +10:00
# 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
2025-10-14 20:55:40 +02:00
if [[ " ${ prompt ,, } " = ~ ^( y| yes) $ ]] ; then
2026-07-23 23:18:28 +02:00
msg_info "Installing 45Drives' cockpit extensions"
setup_deb822_repo "45drives" \
"https://repo.45drives.com/key/gpg.asc" \
"https://repo.45drives.com/enterprise/debian" \
" ${ CODENAME } " \
"main" \
"amd64"
$STD apt install -y cockpit-file-sharing cockpit-identities cockpit-navigator
msg_ok "Installed 45Drives' cockpit extensions"
2025-10-14 20:55:40 +02:00
fi
2024-10-18 18:21:51 +02:00
motd_ssh
customize
2025-11-22 17:27:13 +01:00
cleanup_lxc