mirror of
https://github.com/community-scripts/ProxmoxVED.git
synced 2026-02-25 05:57:26 +00:00
download code from release instead of git repo
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: KernelSailor
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
@@ -24,14 +24,6 @@ function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /opt/snowflake ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
if ! id snowflake &>/dev/null; then
|
||||
msg_error "snowflake user not found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
msg_info "Updating Container OS"
|
||||
$STD apt update
|
||||
@@ -44,17 +36,18 @@ function update_script() {
|
||||
systemctl stop snowflake-proxy
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Updating Go"
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
|
||||
setup_go
|
||||
msg_ok "Updated Go"
|
||||
|
||||
msg_info "Updating ${APP} to v${RELEASE}"
|
||||
cd /opt/snowflake || exit
|
||||
$STD git fetch --all
|
||||
$STD git checkout "v${RELEASE}"
|
||||
cd /opt
|
||||
$STD curl -fsSL "https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/archive/v${RELEASE}/snowflake-v${RELEASE}.tar.gz" -o snowflake.tar.gz
|
||||
$STD tar -xzf snowflake.tar.gz
|
||||
rm -rf snowflake
|
||||
mv "snowflake-v${RELEASE}" snowflake
|
||||
rm snowflake.tar.gz
|
||||
chown -R snowflake:snowflake /opt/snowflake
|
||||
$STD sudo -u snowflake go build -o proxy ./proxy
|
||||
cd /opt/snowflake/proxy
|
||||
$STD sudo -u snowflake go build -o snowflake-proxy .
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Updated ${APP} to v${RELEASE}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user