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

View File

@@ -11,7 +11,7 @@ var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-512}"
var_disk="${var_disk:-6}"
var_os="${var_os:-debian}"
var_version="${var_version:-12}"
var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
@@ -29,21 +29,19 @@ function update_script() {
fi
msg_info "Updating Caddy LXC"
$STD apt-get update
$STD apt-get -y upgrade
$STD apt update
$STD apt upgrade -y
msg_ok "Updated Caddy LXC"
if command -v xcaddy >/dev/null 2>&1; then
setup_go
msg_info "Updating xCaddy"
cd /opt
RELEASE=$(curl -fsSL https://api.github.com/repos/caddyserver/xcaddy/releases/latest | grep "tag_name" | awk -F '"' '{print $4}')
VERSION="${RELEASE#v}"
curl -fsSL "https://github.com/caddyserver/xcaddy/releases/download/${RELEASE}/xcaddy_${VERSION}_linux_amd64.deb" -o "xcaddy_${VERSION}_linux_amd64.deb"
$STD dpkg -i "xcaddy_${VERSION}_linux_amd64.deb"
rm -f "xcaddy_${VERSION}_linux_amd64.deb"
$STD xcaddy build
msg_ok "Updated xCaddy"
if check_for_gh_release "xcaddy" "caddyserver/xcaddy"; then
setup_go
fetch_and_deploy_gh_release "xcaddy" "caddyserver/xcaddy" "binary"
msg_info "Updating xCaddy"
$STD xcaddy build
msg_ok "Updated xCaddy"
fi
fi
msg_ok "Updated successfully!"
exit