testing
This commit is contained in:
parent
d3d77e103f
commit
62b2b3a840
@ -5,7 +5,7 @@
|
|||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
# https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
catch_errors
|
||||||
@ -19,6 +19,109 @@ $STD apt-get install -y sudo
|
|||||||
$STD apt-get install -y mc
|
$STD apt-get install -y mc
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Check GH Releases"
|
||||||
|
echo "Getting 0xERR0R/blocky..."
|
||||||
|
RELEASE=$(check_gh_release 0xERR0R/blocky) || exit 1
|
||||||
|
echo "Got Version: $RELEASE"
|
||||||
|
|
||||||
|
echo "Getting aceberg/WatchYourLAN..."
|
||||||
|
RELEASE=$(check_gh_release aceberg/WatchYourLAN) || exit 1
|
||||||
|
echo "Got Version: $RELEASE"
|
||||||
|
|
||||||
|
echo "Getting actualbudget/actual-server..."
|
||||||
|
RELEASE=$(check_gh_release actualbudget/actual-server) || exit 1
|
||||||
|
echo "Got Version: $RELEASE"
|
||||||
|
|
||||||
|
echo "Getting agl/jbig2enc..."
|
||||||
|
RELEASE=$(check_gh_release agl/jbig2enc) || exit 1
|
||||||
|
echo "Got Version: $RELEASE"
|
||||||
|
|
||||||
|
echo "Getting alexta69/metube..."
|
||||||
|
RELEASE=$(check_gh_release alexta69/metube) || exit 1
|
||||||
|
echo "Got Version: $RELEASE"
|
||||||
|
|
||||||
|
echo "Getting AlexxIT/go2rtc..."
|
||||||
|
RELEASE=$(check_gh_release AlexxIT/go2rtc) || exit 1
|
||||||
|
echo "Got Version: $RELEASE"
|
||||||
|
|
||||||
|
echo "Getting apache/tika..."
|
||||||
|
RELEASE=$(check_gh_release apache/tika) || exit 1
|
||||||
|
echo "Got Version: $RELEASE"
|
||||||
|
|
||||||
|
echo "Getting ArtifexSoftware/ghostpdl-downloads..."
|
||||||
|
RELEASE=$(check_gh_release ArtifexSoftware/ghostpdl-downloads) || exit 1
|
||||||
|
echo "Got Version: $RELEASE"
|
||||||
|
|
||||||
|
echo "Getting Athou/commafeed..."
|
||||||
|
RELEASE=$(check_gh_release Athou/commafeed) || exit 1
|
||||||
|
echo "Got Version: $RELEASE"
|
||||||
|
|
||||||
|
echo "Getting authelia/authelia..."
|
||||||
|
RELEASE=$(check_gh_release authelia/authelia) || exit 1
|
||||||
|
echo "Got Version: $RELEASE"
|
||||||
|
|
||||||
|
echo "Getting azukaar/Cosmos-Server..."
|
||||||
|
RELEASE=$(check_gh_release azukaar/Cosmos-Server) || exit 1
|
||||||
|
echo "Got Version: $RELEASE"
|
||||||
|
|
||||||
|
echo "Getting bastienwirtz/homer..."
|
||||||
|
RELEASE=$(check_gh_release bastienwirtz/homer) || exit 1
|
||||||
|
echo "Got Version: $RELEASE"
|
||||||
|
|
||||||
|
echo "Getting benjaminjonard/koillection..."
|
||||||
|
RELEASE=$(check_gh_release benjaminjonard/koillection) || exit 1
|
||||||
|
echo "Got Version: $RELEASE"
|
||||||
|
|
||||||
|
echo "Getting benzino77/tasmocompiler..."
|
||||||
|
RELEASE=$(check_gh_release benzino77/tasmocompiler) || exit 1
|
||||||
|
echo "Got Version: $RELEASE"
|
||||||
|
|
||||||
|
echo "Getting blakeblackshear/frigate..."
|
||||||
|
RELEASE=$(check_gh_release blakeblackshear/frigate) || exit 1
|
||||||
|
echo "Got Version: $RELEASE"
|
||||||
|
|
||||||
|
echo "Getting bluenviron/mediamtx..."
|
||||||
|
RELEASE=$(check_gh_release bluenviron/mediamtx) || exit 1
|
||||||
|
echo "Got Version: $RELEASE"
|
||||||
|
|
||||||
|
echo "Getting BookStackApp/BookStack..."
|
||||||
|
RELEASE=$(check_gh_release BookStackApp/BookStack) || exit 1
|
||||||
|
echo "Got Version: $RELEASE"
|
||||||
|
|
||||||
|
echo "Getting browserless/chrome..."
|
||||||
|
RELEASE=$(check_gh_release browserless/chrome) || exit 1
|
||||||
|
echo "Got Version: $RELEASE"
|
||||||
|
|
||||||
|
echo "Getting Bubka/2FAuth..."
|
||||||
|
RELEASE=$(check_gh_release Bubka/2FAuth) || exit 1
|
||||||
|
echo "Got Version: $RELEASE"
|
||||||
|
|
||||||
|
echo "Getting caddyserver/xcaddy..."
|
||||||
|
RELEASE=$(check_gh_release caddyserver/xcaddy) || exit 1
|
||||||
|
echo "Got Version: $RELEASE"
|
||||||
|
|
||||||
|
echo "Getting clusterzx/paperless-ai..."
|
||||||
|
RELEASE=$(check_gh_release clusterzx/paperless-ai) || exit 1
|
||||||
|
echo "Got Version: $RELEASE"
|
||||||
|
|
||||||
|
echo "Getting cockpit-project/cockpit..."
|
||||||
|
RELEASE=$(check_gh_release cockpit-project/cockpit) || exit 1
|
||||||
|
echo "Got Version: $RELEASE"
|
||||||
|
|
||||||
|
echo "Getting community-scripts/ProxmoxVE..."
|
||||||
|
RELEASE=$(check_gh_release community-scripts/ProxmoxVE) || exit 1
|
||||||
|
echo "Got Version: $RELEASE"
|
||||||
|
|
||||||
|
echo "Getting CorentinTh/it-tools..."
|
||||||
|
RELEASE=$(check_gh_release CorentinTh/it-tools) || exit 1
|
||||||
|
echo "Got Version: $RELEASE"
|
||||||
|
|
||||||
|
echo "Getting dani-garcia/bw_web_builds..."
|
||||||
|
RELEASE=$(check_gh_release dani-garcia/bw_web_builds) || exit 1
|
||||||
|
echo "Got Version: $RELEASE"
|
||||||
|
|
||||||
|
msg_ok "Done"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|
||||||
|
@ -291,22 +291,61 @@ update_motd_ip() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get_gh_release() {
|
||||||
|
local repo="$1"
|
||||||
|
local api_url="https://api.github.com/repos/$repo/releases/latest"
|
||||||
|
local header=()
|
||||||
|
|
||||||
|
# Ensure jq is installed
|
||||||
|
if ! command -v jq &>/dev/null; then
|
||||||
|
msg_info "Installing jq (required for GitHub API parsing)"
|
||||||
|
apt-get update &>/dev/null
|
||||||
|
apt-get install -y jq &>/dev/null && msg_ok "jq installed" || {
|
||||||
|
msg_error "Failed to install jq"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Optional: GitHub Token for higher rate limit
|
||||||
|
[[ -n "$GITHUB_TOKEN" ]] && header=(-H "Authorization: token $GITHUB_TOKEN")
|
||||||
|
|
||||||
|
# Info output
|
||||||
|
msg_info "Fetching GitHub release for $repo"
|
||||||
|
local api_response
|
||||||
|
if ! api_response=$(curl -fsSL "${header[@]}" "$api_url"); then
|
||||||
|
msg_error "Request failed for $repo"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Extract release tag
|
||||||
|
local tag
|
||||||
|
tag=$(echo "$api_response" | jq -r '.tag_name // .name // empty')
|
||||||
|
[[ "$tag" =~ ^v[0-9] ]] && tag="${tag:1}"
|
||||||
|
|
||||||
|
if [[ -z "$tag" ]]; then
|
||||||
|
msg_error "No release tag found for $repo"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
msg_ok "Found release: $tag for $repo"
|
||||||
|
echo "$tag"
|
||||||
|
}
|
||||||
|
|
||||||
# Function to download & save header files
|
# Function to download & save header files
|
||||||
get_header() {
|
get_header() {
|
||||||
local app_name=$(echo ${APP,,} | tr -d ' ')
|
local app_name=$(echo "${APP,,}" | tr -d ' ')
|
||||||
local header_url="https://github.com/community-scripts/ProxmoxVED/raw/main/ct/headers/${app_name}"
|
local header_url="https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/headers/${app_name}"
|
||||||
local local_header_path="/usr/local/community-scripts/headers/${app_name}"
|
local local_header_path="/usr/local/community-scripts/headers/${app_name}"
|
||||||
|
|
||||||
mkdir -p "/usr/local/community-scripts/headers"
|
mkdir -p "$(dirname "$local_header_path")"
|
||||||
|
|
||||||
# Check if local file already present
|
|
||||||
if [ ! -s "$local_header_path" ]; then
|
if [ ! -s "$local_header_path" ]; then
|
||||||
curl -fsSL "$header_url" -o "$local_header_path"
|
if ! curl -fsSL "$header_url" -o "$local_header_path"; then
|
||||||
if [ $? -ne 0 ]; then
|
echo -e "${WARN:-}[WARN]${BOLD:-}${YLW:-} Failed to download header for ${app_name}. No header will be displayed.${CL:-}"
|
||||||
echo -e "${WARN}${BOLD}${YLW}Failed to download header for ${app_name}. No header will be displayed.${CL}"
|
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cat "$local_header_path"
|
cat "$local_header_path"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user