2024-05-11 19:22:24 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
2026-01-06 13:28:12 +01:00
|
|
|
# Copyright (c) 2021-2026 tteck
|
2025-01-20 15:10:48 +01:00
|
|
|
# Author: tteck (tteckster) | Co-Author: MickLesk (CanbiZ)
|
|
|
|
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
2025-03-04 17:54:20 +01:00
|
|
|
# Source: https://caddyserver.com/
|
2024-05-11 19:22:24 -04:00
|
|
|
|
2025-02-03 12:24:46 +01:00
|
|
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
2024-05-11 19:22:24 -04:00
|
|
|
color
|
|
|
|
|
verb_ip6
|
|
|
|
|
catch_errors
|
|
|
|
|
setting_up_container
|
|
|
|
|
network_check
|
|
|
|
|
update_os
|
|
|
|
|
|
|
|
|
|
msg_info "Installing Dependencies"
|
2026-01-13 08:09:39 +01:00
|
|
|
$STD apt install -y \
|
2025-01-20 15:10:48 +01:00
|
|
|
debian-keyring \
|
|
|
|
|
debian-archive-keyring \
|
2025-05-28 10:54:01 +02:00
|
|
|
apt-transport-https
|
2024-05-11 19:22:24 -04:00
|
|
|
msg_ok "Installed Dependencies"
|
|
|
|
|
|
|
|
|
|
msg_info "Installing Caddy"
|
2026-01-13 08:09:39 +01:00
|
|
|
setup_deb822_repo \
|
|
|
|
|
"caddy" \
|
|
|
|
|
"https://dl.cloudsmith.io/public/caddy/stable/gpg.key" \
|
|
|
|
|
"https://dl.cloudsmith.io/public/caddy/stable/deb/debian" \
|
|
|
|
|
"any-version"
|
|
|
|
|
$STD apt install -y caddy
|
2024-05-11 19:22:24 -04:00
|
|
|
msg_ok "Installed Caddy"
|
|
|
|
|
|
2025-05-15 11:13:57 +02:00
|
|
|
read -r -p "${TAB3}Would you like to install xCaddy Addon? <y/N> " prompt
|
2025-01-20 15:10:48 +01:00
|
|
|
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
2025-06-18 12:03:00 +02:00
|
|
|
setup_go
|
2026-01-13 08:09:39 +01:00
|
|
|
fetch_and_deploy_gh_release "xcaddy" "caddyserver/xcaddy" "binary"
|
|
|
|
|
|
2025-01-20 15:10:48 +01:00
|
|
|
msg_info "Setup xCaddy"
|
2026-01-13 08:09:39 +01:00
|
|
|
$STD apt install -y git
|
2025-01-20 15:10:48 +01:00
|
|
|
$STD xcaddy build
|
|
|
|
|
msg_ok "Setup xCaddy"
|
|
|
|
|
fi
|
|
|
|
|
|
2024-05-11 19:22:24 -04:00
|
|
|
motd_ssh
|
|
|
|
|
customize
|
2025-11-22 17:27:13 +01:00
|
|
|
cleanup_lxc
|