11#! /usr/bin/env bash
22
33# Copyright (c) 2021-2025 tteck
4- # Author: tteck (tteckster)
5- # License: MIT
6- # https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
4+ # Author: tteck (tteckster) | Co-Author: MickLesk (CanbiZ)
5+ # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
76
87source /dev/stdin <<< " $FUNCTIONS_FILE_PATH"
98color
@@ -14,7 +13,14 @@ network_check
1413update_os
1514
1615msg_info " Installing Dependencies"
17- $STD apt-get install -y {debian-keyring,debian-archive-keyring,apt-transport-https,gpg,curl,sudo,mc}
16+ $STD apt-get install -y \
17+ debian-keyring \
18+ debian-archive-keyring \
19+ apt-transport-https \
20+ gpg \
21+ curl \
22+ sudo \
23+ mc
1824msg_ok " Installed Dependencies"
1925
2026msg_info " Installing Caddy"
@@ -24,6 +30,29 @@ $STD apt-get update
2430$STD apt-get install -y caddy
2531msg_ok " Installed Caddy"
2632
33+ read -r -p " Would you like to install xCaddy Addon? <y/N> " prompt
34+ if [[ " ${prompt,,} " =~ ^(y| yes)$ ]]; then
35+ msg_info " Installing Golang"
36+ cd /opt
37+ set +o pipefail
38+ GOLANG=$( curl -s https://go.dev/dl/ | grep -o " go.*\linux-amd64.tar.gz" | head -n 1)
39+ wget -q https://golang.org/dl/$GOLANG
40+ tar -xzf $GOLANG -C /usr/local
41+ ln -s /usr/local/go/bin/go /usr/local/bin/go
42+ set -o pipefail
43+ rm -rf /opt/go*
44+ msg_ok " Installed Golang"
45+
46+ msg_info " Setup xCaddy"
47+ cd /opt
48+ RELEASE=$( curl -s https://api.github.com/repos/caddyserver/xcaddy/releases/latest | grep " tag_name" | awk ' {print substr($2, 2, length($2)-3) }' )
49+ wget -q https://github.com/caddyserver/xcaddy/releases/download/${RELEASE} /xcaddy_${RELEASE: 1} _linux_amd64.deb
50+ $STD dpkg -i xcaddy_${RELEASE: 1} _linux_amd64.deb
51+ rm -rf /opt/xcaddy*
52+ $STD xcaddy build
53+ msg_ok " Setup xCaddy"
54+ fi
55+
2756motd_ssh
2857customize
2958
0 commit comments