This commit is contained in:
Slaviša Arežina
2026-01-13 08:09:39 +01:00
committed by GitHub
parent 8d53604ae3
commit 7c3d9d231a
3 changed files with 22 additions and 25 deletions
+11 -13
View File
@@ -11,7 +11,7 @@ var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-512}" var_ram="${var_ram:-512}"
var_disk="${var_disk:-6}" var_disk="${var_disk:-6}"
var_os="${var_os:-debian}" var_os="${var_os:-debian}"
var_version="${var_version:-12}" var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}" var_unprivileged="${var_unprivileged:-1}"
header_info "$APP" header_info "$APP"
@@ -29,21 +29,19 @@ function update_script() {
fi fi
msg_info "Updating Caddy LXC" msg_info "Updating Caddy LXC"
$STD apt-get update $STD apt update
$STD apt-get -y upgrade $STD apt upgrade -y
msg_ok "Updated Caddy LXC" msg_ok "Updated Caddy LXC"
if command -v xcaddy >/dev/null 2>&1; then if command -v xcaddy >/dev/null 2>&1; then
setup_go if check_for_gh_release "xcaddy" "caddyserver/xcaddy"; then
msg_info "Updating xCaddy" setup_go
cd /opt fetch_and_deploy_gh_release "xcaddy" "caddyserver/xcaddy" "binary"
RELEASE=$(curl -fsSL https://api.github.com/repos/caddyserver/xcaddy/releases/latest | grep "tag_name" | awk -F '"' '{print $4}')
VERSION="${RELEASE#v}" msg_info "Updating xCaddy"
curl -fsSL "https://github.com/caddyserver/xcaddy/releases/download/${RELEASE}/xcaddy_${VERSION}_linux_amd64.deb" -o "xcaddy_${VERSION}_linux_amd64.deb" $STD xcaddy build
$STD dpkg -i "xcaddy_${VERSION}_linux_amd64.deb" msg_ok "Updated xCaddy"
rm -f "xcaddy_${VERSION}_linux_amd64.deb" fi
$STD xcaddy build
msg_ok "Updated xCaddy"
fi fi
msg_ok "Updated successfully!" msg_ok "Updated successfully!"
exit exit
+1 -1
View File
@@ -23,7 +23,7 @@
"ram": 512, "ram": 512,
"hdd": 6, "hdd": 6,
"os": "debian", "os": "debian",
"version": "12" "version": "13"
} }
}, },
{ {
+10 -11
View File
@@ -14,29 +14,28 @@ network_check
update_os update_os
msg_info "Installing Dependencies" msg_info "Installing Dependencies"
$STD apt-get install -y \ $STD apt install -y \
debian-keyring \ debian-keyring \
debian-archive-keyring \ debian-archive-keyring \
apt-transport-https apt-transport-https
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
msg_info "Installing Caddy" msg_info "Installing Caddy"
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg setup_deb822_repo \
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' >/etc/apt/sources.list.d/caddy-stable.list "caddy" \
$STD apt-get update "https://dl.cloudsmith.io/public/caddy/stable/gpg.key" \
$STD apt-get install -y caddy "https://dl.cloudsmith.io/public/caddy/stable/deb/debian" \
"any-version"
$STD apt install -y caddy
msg_ok "Installed Caddy" msg_ok "Installed Caddy"
read -r -p "${TAB3}Would you like to install xCaddy Addon? <y/N> " prompt read -r -p "${TAB3}Would you like to install xCaddy Addon? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
setup_go setup_go
fetch_and_deploy_gh_release "xcaddy" "caddyserver/xcaddy" "binary"
msg_info "Setup xCaddy" msg_info "Setup xCaddy"
$STD apt-get install -y git $STD apt install -y git
cd /opt
RELEASE=$(curl -fsSL https://api.github.com/repos/caddyserver/xcaddy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
curl -fsSL "https://github.com/caddyserver/xcaddy/releases/download/${RELEASE}/xcaddy_${RELEASE:1}_linux_amd64.deb" -o "xcaddy_${RELEASE:1}_linux_amd64.deb"
$STD dpkg -i xcaddy_"${RELEASE:1}"_linux_amd64.deb
rm -rf /opt/xcaddy*
$STD xcaddy build $STD xcaddy build
msg_ok "Setup xCaddy" msg_ok "Setup xCaddy"
fi fi