2024-10-18 18:21:51 +02:00
#!/usr/bin/env bash
2026-09-02 11:40:00 +02:00
_cs_boot = " ${ COMMUNITY_SCRIPTS_CORE_DIR :-$( dirname " ${ BASH_SOURCE [0] } " ) /../../core } /core/build.func"
source " $_cs_boot " 2>/dev/null || source <( curl -fsSL " ${ COMMUNITY_SCRIPTS_CORE_URL :- https ://raw.githubusercontent.com/community-scripts/core/main } /core/build.func" )
2026-01-06 13:28:12 +01:00
# Copyright (c) 2021-2026 tteck
2024-12-16 12:42:51 +01:00
# Author: tteck | Co-Author: havardthom
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
2026-02-24 15:11:53 +01:00
# Source: https://github.com/cockpit-project/cockpit
2024-10-18 18:21:51 +02:00
APP = "Cockpit"
2025-04-10 11:56:52 +02:00
var_tags = " ${ var_tags :- monitoring ;network } "
var_cpu = " ${ var_cpu :- 2 } "
var_ram = " ${ var_ram :- 1024 } "
var_disk = " ${ var_disk :- 4 } "
var_os = " ${ var_os :- debian } "
2026-07-23 23:18:28 +02:00
var_version = " ${ var_version :- 13 } "
2026-06-19 17:53:08 +10:00
var_arm64 = " ${ var_arm64 :- yes } "
2025-04-10 11:56:52 +02:00
var_unprivileged = " ${ var_unprivileged :- 1 } "
2024-12-16 12:42:51 +01:00
header_info " $APP "
2024-10-18 18:21:51 +02:00
variables
color
catch_errors
function update_script() {
2024-12-16 12:42:51 +01:00
header_info
check_container_storage
check_container_resources
if [[ ! -d /etc/cockpit ]] ; then
msg_error "No ${ APP } Installation Found!"
exit
fi
2025-10-30 09:24:16 -07:00
2025-10-14 20:55:40 +02:00
msg_info "Updating ${ APP } LXC"
2026-09-24 08:06:49 +02:00
apt_update_safe
2025-10-14 20:55:40 +02:00
$STD apt -y upgrade
msg_ok "Updated ${ APP } LXC"
2026-07-23 23:18:28 +02:00
if [[ ! -f /etc/apt/sources.list.d/45drives.sources ]] ; then
[[ " $( arch_resolve) " == "arm64" ]] || read -r -p "Would you like to install 45Drives' cockpit-file-sharing, cockpit-identities, and cockpit-navigator now? <y/N> " prompt
if [[ " ${ prompt ,, } " = ~ ^( y| yes) $ ]] ; then
msg_info "Installing 45Drives' cockpit extensions"
setup_deb822_repo "45drives" \
"https://repo.45drives.com/key/gpg.asc" \
"https://repo.45drives.com/enterprise/debian" \
" $( get_os_info codename) " \
"main" \
"amd64"
$STD apt install -y cockpit-file-sharing cockpit-identities cockpit-navigator
msg_ok "Installed 45Drives' cockpit extensions"
fi
fi
2025-10-30 09:24:16 -07:00
msg_ok "Updated successfully!"
2025-10-14 20:55:40 +02:00
exit
2024-10-18 18:21:51 +02:00
}
start
build_container
description
2026-01-06 22:57:40 +01:00
msg_ok "Completed successfully!\n"
2024-12-16 12:42:51 +01:00
echo -e " ${ CREATING }${ GN }${ APP } setup has been successfully initialized! ${ CL } "
2026-06-03 11:03:13 +02:00
echo -e " ${ INFO }${ YW } Access it using the following URL: ${ CL } "
echo -e " ${ GATEWAY }${ BGN } http:// ${ IP } :9090 ${ CL } "