mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-03-15 14:33:01 +01:00
Compare commits
24 Commits
fix/coder-
...
arm64-buil
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
24f1347990 | ||
|
|
866b6950c0 | ||
|
|
44ec223d20 | ||
|
|
4ab3a24d03 | ||
|
|
231945dfa7 | ||
|
|
7c051fb648 | ||
|
|
968e96e2c7 | ||
|
|
02b5c7f7a8 | ||
|
|
6f8aa6eadc | ||
|
|
f1f77e5283 | ||
|
|
1e726852df | ||
|
|
35b3b93ca6 | ||
|
|
ba85fad318 | ||
|
|
6ae5eefdf5 | ||
|
|
b6805bb845 | ||
|
|
3117145e6c | ||
|
|
c144915a74 | ||
|
|
ad1e207ee1 | ||
|
|
78979189c1 | ||
|
|
a6a83b9541 | ||
|
|
e4db6be257 | ||
|
|
b9d401b178 | ||
|
|
6f62656c96 | ||
|
|
087f817bf6 |
150
.github/workflows/delete-pocketbase-entry-on-removal.yml
generated
vendored
Normal file
150
.github/workflows/delete-pocketbase-entry-on-removal.yml
generated
vendored
Normal file
@@ -0,0 +1,150 @@
|
|||||||
|
name: Delete PocketBase entry on script/JSON removal
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- "frontend/public/json/**"
|
||||||
|
- "vm/**"
|
||||||
|
- "tools/**"
|
||||||
|
- "turnkey/**"
|
||||||
|
- "ct/**"
|
||||||
|
- "install/**"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
delete-pocketbase-entry:
|
||||||
|
runs-on: self-hosted
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Get slugs from deleted JSON and script files
|
||||||
|
id: slugs
|
||||||
|
run: |
|
||||||
|
BEFORE="${{ github.event.before }}"
|
||||||
|
AFTER="${{ github.event.after }}"
|
||||||
|
slugs=""
|
||||||
|
|
||||||
|
# Deleted JSON files: get slug from previous commit
|
||||||
|
deleted_json=$(git diff --name-only --diff-filter=D "$BEFORE" "$AFTER" -- frontend/public/json/ | grep '\.json$' || true)
|
||||||
|
for f in $deleted_json; do
|
||||||
|
[[ -z "$f" ]] && continue
|
||||||
|
s=$(git show "$BEFORE:$f" 2>/dev/null | jq -r '.slug // empty' 2>/dev/null || true)
|
||||||
|
[[ -n "$s" ]] && slugs="$slugs $s"
|
||||||
|
done
|
||||||
|
|
||||||
|
# Deleted script files: derive slug from path
|
||||||
|
deleted_sh=$(git diff --name-only --diff-filter=D "$BEFORE" "$AFTER" -- ct/ install/ tools/ turnkey/ vm/ | grep '\.sh$' || true)
|
||||||
|
for f in $deleted_sh; do
|
||||||
|
[[ -z "$f" ]] && continue
|
||||||
|
base="${f##*/}"
|
||||||
|
base="${base%.sh}"
|
||||||
|
if [[ "$f" == install/* && "$base" == *-install ]]; then
|
||||||
|
s="${base%-install}"
|
||||||
|
else
|
||||||
|
s="$base"
|
||||||
|
fi
|
||||||
|
[[ -n "$s" ]] && slugs="$slugs $s"
|
||||||
|
done
|
||||||
|
|
||||||
|
slugs=$(echo $slugs | xargs -n1 | sort -u | tr '\n' ' ')
|
||||||
|
if [[ -z "$slugs" ]]; then
|
||||||
|
echo "No deleted JSON or script files to remove from PocketBase."
|
||||||
|
echo "count=0" >> "$GITHUB_OUTPUT"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
echo "$slugs" > slugs_to_delete.txt
|
||||||
|
echo "count=$(echo $slugs | wc -w)" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "Slugs to delete: $slugs"
|
||||||
|
|
||||||
|
- name: Delete from PocketBase
|
||||||
|
if: steps.slugs.outputs.count != '0'
|
||||||
|
env:
|
||||||
|
POCKETBASE_URL: ${{ secrets.POCKETBASE_URL }}
|
||||||
|
POCKETBASE_COLLECTION: ${{ secrets.POCKETBASE_COLLECTION }}
|
||||||
|
POCKETBASE_ADMIN_EMAIL: ${{ secrets.POCKETBASE_ADMIN_EMAIL }}
|
||||||
|
POCKETBASE_ADMIN_PASSWORD: ${{ secrets.POCKETBASE_ADMIN_PASSWORD }}
|
||||||
|
run: |
|
||||||
|
node << 'ENDSCRIPT'
|
||||||
|
(async function() {
|
||||||
|
const fs = require('fs');
|
||||||
|
const https = require('https');
|
||||||
|
const http = require('http');
|
||||||
|
const url = require('url');
|
||||||
|
|
||||||
|
function request(fullUrl, opts) {
|
||||||
|
return new Promise(function(resolve, reject) {
|
||||||
|
const u = url.parse(fullUrl);
|
||||||
|
const isHttps = u.protocol === 'https:';
|
||||||
|
const body = opts.body;
|
||||||
|
const options = {
|
||||||
|
hostname: u.hostname,
|
||||||
|
port: u.port || (isHttps ? 443 : 80),
|
||||||
|
path: u.path,
|
||||||
|
method: opts.method || 'GET',
|
||||||
|
headers: opts.headers || {}
|
||||||
|
};
|
||||||
|
if (body) options.headers['Content-Length'] = Buffer.byteLength(body);
|
||||||
|
const lib = isHttps ? https : http;
|
||||||
|
const req = lib.request(options, function(res) {
|
||||||
|
let data = '';
|
||||||
|
res.on('data', function(chunk) { data += chunk; });
|
||||||
|
res.on('end', function() {
|
||||||
|
resolve({ ok: res.statusCode >= 200 && res.statusCode < 300, statusCode: res.statusCode, body: data });
|
||||||
|
});
|
||||||
|
});
|
||||||
|
req.on('error', reject);
|
||||||
|
if (body) req.write(body);
|
||||||
|
req.end();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const raw = process.env.POCKETBASE_URL.replace(/\/$/, '');
|
||||||
|
const apiBase = /\/api$/i.test(raw) ? raw : raw + '/api';
|
||||||
|
const coll = process.env.POCKETBASE_COLLECTION;
|
||||||
|
const slugs = fs.readFileSync('slugs_to_delete.txt', 'utf8').trim().split(/\s+/).filter(Boolean);
|
||||||
|
|
||||||
|
const authUrl = apiBase + '/collections/users/auth-with-password';
|
||||||
|
const authBody = JSON.stringify({
|
||||||
|
identity: process.env.POCKETBASE_ADMIN_EMAIL,
|
||||||
|
password: process.env.POCKETBASE_ADMIN_PASSWORD
|
||||||
|
});
|
||||||
|
const authRes = await request(authUrl, {
|
||||||
|
method: 'POST',
|
||||||
|
headers: { 'Content-Type': 'application/json' },
|
||||||
|
body: authBody
|
||||||
|
});
|
||||||
|
if (!authRes.ok) {
|
||||||
|
throw new Error('Auth failed. Response: ' + authRes.body);
|
||||||
|
}
|
||||||
|
const token = JSON.parse(authRes.body).token;
|
||||||
|
const recordsUrl = apiBase + '/collections/' + encodeURIComponent(coll) + '/records';
|
||||||
|
|
||||||
|
for (const slug of slugs) {
|
||||||
|
const filter = "(slug='" + slug + "')";
|
||||||
|
const listRes = await request(recordsUrl + '?filter=' + encodeURIComponent(filter) + '&perPage=1', {
|
||||||
|
headers: { 'Authorization': token }
|
||||||
|
});
|
||||||
|
const list = JSON.parse(listRes.body);
|
||||||
|
const existingId = list.items && list.items[0] && list.items[0].id;
|
||||||
|
if (!existingId) {
|
||||||
|
console.log('No PocketBase record for slug "' + slug + '", skipping.');
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
const delRes = await request(recordsUrl + '/' + existingId, {
|
||||||
|
method: 'DELETE',
|
||||||
|
headers: { 'Authorization': token }
|
||||||
|
});
|
||||||
|
if (delRes.ok) {
|
||||||
|
console.log('Deleted PocketBase record for slug "' + slug + '" (id=' + existingId + ').');
|
||||||
|
} else {
|
||||||
|
console.warn('DELETE failed for slug "' + slug + '": ' + delRes.statusCode + ' ' + delRes.body);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log('Done.');
|
||||||
|
})().catch(e => { console.error(e); process.exit(1); });
|
||||||
|
ENDSCRIPT
|
||||||
|
shell: bash
|
||||||
41
.github/workflows/trigger_github_pages_redirect.yml
generated
vendored
Normal file
41
.github/workflows/trigger_github_pages_redirect.yml
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
name: Pages Redirect
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
pages: write
|
||||||
|
id-token: write
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Create redirect page
|
||||||
|
run: |
|
||||||
|
mkdir site
|
||||||
|
cat <<EOF > site/index.html
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="refresh" content="0; url=https://community-scripts.org/">
|
||||||
|
<link rel="canonical" href="https://community-scripts.org/">
|
||||||
|
<title>Redirecting...</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
Redirecting...
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
EOF
|
||||||
|
|
||||||
|
- uses: actions/upload-pages-artifact@v3
|
||||||
|
with:
|
||||||
|
path: site
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
uses: actions/deploy-pages@v4
|
||||||
13
CHANGELOG.md
13
CHANGELOG.md
@@ -422,6 +422,19 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
|||||||
|
|
||||||
## 2026-03-11
|
## 2026-03-11
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- Tracearr: Increase default disk variable from 5 to 10 [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#12762](https://github.com/community-scripts/ProxmoxVE/pull/12762))
|
||||||
|
- Fix Wireguard Dashboard update [@odin568](https://github.com/odin568) ([#12767](https://github.com/community-scripts/ProxmoxVE/pull/12767))
|
||||||
|
|
||||||
|
### 🧰 Tools
|
||||||
|
|
||||||
|
- #### ✨ New Features
|
||||||
|
|
||||||
|
- Coder-Code-Server: Check if config file exists [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#12758](https://github.com/community-scripts/ProxmoxVE/pull/12758))
|
||||||
|
|
||||||
## 2026-03-10
|
## 2026-03-10
|
||||||
|
|
||||||
### 🚀 Updated Scripts
|
### 🚀 Updated Scripts
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ APP="Tracearr"
|
|||||||
var_tags="${var_tags:-media}"
|
var_tags="${var_tags:-media}"
|
||||||
var_cpu="${var_cpu:-2}"
|
var_cpu="${var_cpu:-2}"
|
||||||
var_ram="${var_ram:-2048}"
|
var_ram="${var_ram:-2048}"
|
||||||
var_disk="${var_disk:-5}"
|
var_disk="${var_disk:-10}"
|
||||||
var_os="${var_os:-debian}"
|
var_os="${var_os:-debian}"
|
||||||
var_version="${var_version:-13}"
|
var_version="${var_version:-13}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ function update_script() {
|
|||||||
if [[ -d /etc/wgdashboard ]]; then
|
if [[ -d /etc/wgdashboard ]]; then
|
||||||
sleep 2
|
sleep 2
|
||||||
cd /etc/wgdashboard/src
|
cd /etc/wgdashboard/src
|
||||||
$STD ./wgd.sh update
|
$STD ./wgd.sh update -y
|
||||||
$STD ./wgd.sh start
|
$STD ./wgd.sh start
|
||||||
fi
|
fi
|
||||||
msg_ok "Updated LXC"
|
msg_ok "Updated LXC"
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"generated": "2026-03-11T06:17:37Z",
|
"generated": "2026-03-11T12:12:40Z",
|
||||||
"versions": [
|
"versions": [
|
||||||
{
|
{
|
||||||
"slug": "2fauth",
|
"slug": "2fauth",
|
||||||
"repo": "Bubka/2FAuth",
|
"repo": "Bubka/2FAuth",
|
||||||
"version": "v6.0.0",
|
"version": "v6.1.0",
|
||||||
"pinned": false,
|
"pinned": false,
|
||||||
"date": "2026-01-14T16:00:58Z"
|
"date": "2026-03-11T07:48:27Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"slug": "adguard",
|
"slug": "adguard",
|
||||||
@@ -270,9 +270,9 @@
|
|||||||
{
|
{
|
||||||
"slug": "databasus",
|
"slug": "databasus",
|
||||||
"repo": "databasus/databasus",
|
"repo": "databasus/databasus",
|
||||||
"version": "v3.18.0",
|
"version": "v3.19.1",
|
||||||
"pinned": false,
|
"pinned": false,
|
||||||
"date": "2026-03-08T20:19:15Z"
|
"date": "2026-03-11T10:25:28Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"slug": "dawarich",
|
"slug": "dawarich",
|
||||||
@@ -284,9 +284,9 @@
|
|||||||
{
|
{
|
||||||
"slug": "discopanel",
|
"slug": "discopanel",
|
||||||
"repo": "nickheyer/discopanel",
|
"repo": "nickheyer/discopanel",
|
||||||
"version": "v2.0.2",
|
"version": "v2.0.3",
|
||||||
"pinned": false,
|
"pinned": false,
|
||||||
"date": "2026-03-09T03:38:49Z"
|
"date": "2026-03-11T07:29:10Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"slug": "dispatcharr",
|
"slug": "dispatcharr",
|
||||||
@@ -319,9 +319,9 @@
|
|||||||
{
|
{
|
||||||
"slug": "donetick",
|
"slug": "donetick",
|
||||||
"repo": "donetick/donetick",
|
"repo": "donetick/donetick",
|
||||||
"version": "v0.1.74",
|
"version": "v0.1.75-beta.3",
|
||||||
"pinned": false,
|
"pinned": false,
|
||||||
"date": "2026-02-14T23:21:45Z"
|
"date": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"slug": "drawio",
|
"slug": "drawio",
|
||||||
@@ -1327,9 +1327,9 @@
|
|||||||
{
|
{
|
||||||
"slug": "revealjs",
|
"slug": "revealjs",
|
||||||
"repo": "hakimel/reveal.js",
|
"repo": "hakimel/reveal.js",
|
||||||
"version": "5.2.1",
|
"version": "6.0.0",
|
||||||
"pinned": false,
|
"pinned": false,
|
||||||
"date": "2025-03-28T13:00:23Z"
|
"date": "2026-03-11T11:54:59Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"slug": "romm",
|
"slug": "romm",
|
||||||
@@ -1376,9 +1376,9 @@
|
|||||||
{
|
{
|
||||||
"slug": "seaweedfs",
|
"slug": "seaweedfs",
|
||||||
"repo": "seaweedfs/seaweedfs",
|
"repo": "seaweedfs/seaweedfs",
|
||||||
"version": "4.16",
|
"version": "4.17",
|
||||||
"pinned": false,
|
"pinned": false,
|
||||||
"date": "2026-03-10T06:11:05Z"
|
"date": "2026-03-11T09:30:38Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"slug": "seelf",
|
"slug": "seelf",
|
||||||
@@ -1712,9 +1712,9 @@
|
|||||||
{
|
{
|
||||||
"slug": "wanderer",
|
"slug": "wanderer",
|
||||||
"repo": "meilisearch/meilisearch",
|
"repo": "meilisearch/meilisearch",
|
||||||
"version": "v1.38.0",
|
"version": "v1.38.2",
|
||||||
"pinned": false,
|
"pinned": false,
|
||||||
"date": "2026-03-09T08:06:29Z"
|
"date": "2026-03-11T11:36:01Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"slug": "warracker",
|
"slug": "warracker",
|
||||||
@@ -1831,9 +1831,9 @@
|
|||||||
{
|
{
|
||||||
"slug": "zitadel",
|
"slug": "zitadel",
|
||||||
"repo": "zitadel/zitadel",
|
"repo": "zitadel/zitadel",
|
||||||
"version": "v4.12.1",
|
"version": "v4.12.2",
|
||||||
"pinned": false,
|
"pinned": false,
|
||||||
"date": "2026-03-04T12:40:17Z"
|
"date": "2026-03-11T07:50:10Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"slug": "zoraxy",
|
"slug": "zoraxy",
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
"resources": {
|
"resources": {
|
||||||
"cpu": 2,
|
"cpu": 2,
|
||||||
"ram": 2048,
|
"ram": 2048,
|
||||||
"hdd": 5,
|
"hdd": 10,
|
||||||
"os": "Debian",
|
"os": "Debian",
|
||||||
"version": "13"
|
"version": "13"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ explain_exit_code() {
|
|||||||
103) echo "Validation: Shell is not Bash" ;;
|
103) echo "Validation: Shell is not Bash" ;;
|
||||||
104) echo "Validation: Not running as root (or invoked via sudo)" ;;
|
104) echo "Validation: Not running as root (or invoked via sudo)" ;;
|
||||||
105) echo "Validation: Proxmox VE version not supported" ;;
|
105) echo "Validation: Proxmox VE version not supported" ;;
|
||||||
106) echo "Validation: Architecture not supported (ARM / PiMox)" ;;
|
106) echo "Validation: Unsupported architecture (requires amd64 or arm64)" ;;
|
||||||
107) echo "Validation: Kernel key parameters unreadable" ;;
|
107) echo "Validation: Kernel key parameters unreadable" ;;
|
||||||
108) echo "Validation: Kernel key limits exceeded" ;;
|
108) echo "Validation: Kernel key limits exceeded" ;;
|
||||||
109) echo "Proxmox: No available container ID after max attempts" ;;
|
109) echo "Proxmox: No available container ID after max attempts" ;;
|
||||||
@@ -348,10 +348,10 @@ explain_exit_code() {
|
|||||||
json_escape() {
|
json_escape() {
|
||||||
# Escape a string for safe JSON embedding using awk (handles any input size).
|
# Escape a string for safe JSON embedding using awk (handles any input size).
|
||||||
# Pipeline: strip ANSI → remove control chars → escape \ " TAB → join lines with \n
|
# Pipeline: strip ANSI → remove control chars → escape \ " TAB → join lines with \n
|
||||||
printf '%s' "$1" \
|
printf '%s' "$1" |
|
||||||
| sed 's/\x1b\[[0-9;]*[a-zA-Z]//g' \
|
sed 's/\x1b\[[0-9;]*[a-zA-Z]//g' |
|
||||||
| tr -d '\000-\010\013\014\016-\037\177\r' \
|
tr -d '\000-\010\013\014\016-\037\177\r' |
|
||||||
| awk '
|
awk '
|
||||||
BEGIN { ORS = "" }
|
BEGIN { ORS = "" }
|
||||||
{
|
{
|
||||||
gsub(/\\/, "\\\\") # backslash → \\
|
gsub(/\\/, "\\\\") # backslash → \\
|
||||||
|
|||||||
676
misc/build.func
676
misc/build.func
File diff suppressed because it is too large
Load Diff
@@ -344,9 +344,15 @@ pve_check() {
|
|||||||
# - Provides link to ARM64-compatible scripts
|
# - Provides link to ARM64-compatible scripts
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
arch_check() {
|
arch_check() {
|
||||||
if [ "$(dpkg --print-architecture)" != "amd64" ]; then
|
local arch
|
||||||
msg_error "This script will not work with PiMox (ARM architecture detected)."
|
arch="$(dpkg --print-architecture)"
|
||||||
msg_warn "Visit https://github.com/asylumexp/Proxmox for ARM64 support."
|
if [[ "$arch" != "amd64" && "$arch" != "arm64" ]]; then
|
||||||
|
msg_error "This script requires amd64 or arm64 (detected: $arch)."
|
||||||
|
sleep 2
|
||||||
|
exit 106
|
||||||
|
fi
|
||||||
|
if [[ "$arch" == "arm64" && "${var_arm64:-}" != "yes" ]]; then
|
||||||
|
msg_error "This script does not yet support arm64."
|
||||||
sleep 2
|
sleep 2
|
||||||
exit 106
|
exit 106
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ if ! declare -f explain_exit_code &>/dev/null; then
|
|||||||
103) echo "Validation: Shell is not Bash" ;;
|
103) echo "Validation: Shell is not Bash" ;;
|
||||||
104) echo "Validation: Not running as root (or invoked via sudo)" ;;
|
104) echo "Validation: Not running as root (or invoked via sudo)" ;;
|
||||||
105) echo "Validation: Proxmox VE version not supported" ;;
|
105) echo "Validation: Proxmox VE version not supported" ;;
|
||||||
106) echo "Validation: Architecture not supported (ARM / PiMox)" ;;
|
106) echo "Validation: Unsupported architecture (requires amd64 or arm64)" ;;
|
||||||
107) echo "Validation: Kernel key parameters unreadable" ;;
|
107) echo "Validation: Kernel key parameters unreadable" ;;
|
||||||
108) echo "Validation: Kernel key limits exceeded" ;;
|
108) echo "Validation: Kernel key limits exceeded" ;;
|
||||||
109) echo "Proxmox: No available container ID after max attempts" ;;
|
109) echo "Proxmox: No available container ID after max attempts" ;;
|
||||||
|
|||||||
@@ -2822,10 +2822,13 @@ function fetch_and_deploy_codeberg_release() {
|
|||||||
# Fall back to architecture heuristic
|
# Fall back to architecture heuristic
|
||||||
if [[ -z "$url_match" ]]; then
|
if [[ -z "$url_match" ]]; then
|
||||||
for u in $assets; do
|
for u in $assets; do
|
||||||
if [[ "$u" =~ ($arch|amd64|x86_64|aarch64|arm64).*\.deb$ ]]; then
|
if [[ "${arch,,}" =~ ^(amd64|x86_64)$ ]]; then
|
||||||
url_match="$u"
|
[[ "$u" =~ (amd64|x86_64).*\.deb$ ]] || continue
|
||||||
break
|
elif [[ "${arch,,}" =~ ^(arm64|aarch64)$ ]]; then
|
||||||
|
[[ "$u" =~ (arm64|aarch64).*\.deb$ ]] || continue
|
||||||
fi
|
fi
|
||||||
|
url_match="$u"
|
||||||
|
break
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -3122,7 +3125,11 @@ _gh_scan_older_releases() {
|
|||||||
done)
|
done)
|
||||||
fi
|
fi
|
||||||
if [[ "$has_match" != "true" ]]; then
|
if [[ "$has_match" != "true" ]]; then
|
||||||
has_match=$(echo "$releases_list" | jq -r ".[$i].assets[].browser_download_url" | grep -qE "($arch|amd64|x86_64|aarch64|arm64).*\.deb$" && echo true)
|
if [[ "${arch,,}" =~ ^(amd64|x86_64)$ ]]; then
|
||||||
|
has_match=$(echo "$releases_list" | jq -r ".[$i].assets[].browser_download_url" | grep -qE '(amd64|x86_64).*\.deb$' && echo true)
|
||||||
|
elif [[ "${arch,,}" =~ ^(arm64|aarch64)$ ]]; then
|
||||||
|
has_match=$(echo "$releases_list" | jq -r ".[$i].assets[].browser_download_url" | grep -qE '(arm64|aarch64).*\.deb$' && echo true)
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ "$has_match" != "true" ]]; then
|
if [[ "$has_match" != "true" ]]; then
|
||||||
has_match=$(echo "$releases_list" | jq -r ".[$i].assets[].browser_download_url" | grep -qE '\.deb$' && echo true)
|
has_match=$(echo "$releases_list" | jq -r ".[$i].assets[].browser_download_url" | grep -qE '\.deb$' && echo true)
|
||||||
@@ -3328,10 +3335,13 @@ function fetch_and_deploy_gh_release() {
|
|||||||
# If no match via explicit pattern, fall back to architecture heuristic
|
# If no match via explicit pattern, fall back to architecture heuristic
|
||||||
if [[ -z "$url_match" ]]; then
|
if [[ -z "$url_match" ]]; then
|
||||||
for u in $assets; do
|
for u in $assets; do
|
||||||
if [[ "$u" =~ ($arch|amd64|x86_64|aarch64|arm64).*\.deb$ ]]; then
|
if [[ "${arch,,}" =~ ^(amd64|x86_64)$ ]]; then
|
||||||
url_match="$u"
|
[[ "$u" =~ (amd64|x86_64).*\.deb$ ]] || continue
|
||||||
break
|
elif [[ "${arch,,}" =~ ^(arm64|aarch64)$ ]]; then
|
||||||
|
[[ "$u" =~ (arm64|aarch64).*\.deb$ ]] || continue
|
||||||
fi
|
fi
|
||||||
|
url_match="$u"
|
||||||
|
break
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -3362,10 +3372,13 @@ function fetch_and_deploy_gh_release() {
|
|||||||
fi
|
fi
|
||||||
if [[ -z "$url_match" ]]; then
|
if [[ -z "$url_match" ]]; then
|
||||||
for u in $assets; do
|
for u in $assets; do
|
||||||
if [[ "$u" =~ ($arch|amd64|x86_64|aarch64|arm64).*\.deb$ ]]; then
|
if [[ "${arch,,}" =~ ^(amd64|x86_64)$ ]]; then
|
||||||
url_match="$u"
|
[[ "$u" =~ (amd64|x86_64).*\.deb$ ]] || continue
|
||||||
break
|
elif [[ "${arch,,}" =~ ^(arm64|aarch64)$ ]]; then
|
||||||
|
[[ "$u" =~ (arm64|aarch64).*\.deb$ ]] || continue
|
||||||
fi
|
fi
|
||||||
|
url_match="$u"
|
||||||
|
break
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
if [[ -z "$url_match" ]]; then
|
if [[ -z "$url_match" ]]; then
|
||||||
@@ -3733,7 +3746,12 @@ function setup_ffmpeg() {
|
|||||||
|
|
||||||
# Binary fallback mode
|
# Binary fallback mode
|
||||||
if [[ "$TYPE" == "binary" ]]; then
|
if [[ "$TYPE" == "binary" ]]; then
|
||||||
if ! CURL_TIMEOUT=300 curl_with_retry "https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz" "$TMP_DIR/ffmpeg.tar.xz"; then
|
local ffmpeg_arch
|
||||||
|
case "$(dpkg --print-architecture 2>/dev/null || echo amd64)" in
|
||||||
|
arm64) ffmpeg_arch="arm64" ;;
|
||||||
|
*) ffmpeg_arch="amd64" ;;
|
||||||
|
esac
|
||||||
|
if ! CURL_TIMEOUT=300 curl_with_retry "https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-${ffmpeg_arch}-static.tar.xz" "$TMP_DIR/ffmpeg.tar.xz"; then
|
||||||
msg_error "Failed to download FFmpeg binary"
|
msg_error "Failed to download FFmpeg binary"
|
||||||
rm -rf "$TMP_DIR"
|
rm -rf "$TMP_DIR"
|
||||||
return 1
|
return 1
|
||||||
@@ -3815,7 +3833,12 @@ function setup_ffmpeg() {
|
|||||||
# If no source download (either VERSION empty or download failed), use binary
|
# If no source download (either VERSION empty or download failed), use binary
|
||||||
if [[ -z "$VERSION" ]]; then
|
if [[ -z "$VERSION" ]]; then
|
||||||
msg_info "Setup FFmpeg from pre-built binary"
|
msg_info "Setup FFmpeg from pre-built binary"
|
||||||
if ! CURL_TIMEOUT=300 curl_with_retry "https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz" "$TMP_DIR/ffmpeg.tar.xz"; then
|
local ffmpeg_arch
|
||||||
|
case "$(dpkg --print-architecture 2>/dev/null || echo amd64)" in
|
||||||
|
arm64) ffmpeg_arch="arm64" ;;
|
||||||
|
*) ffmpeg_arch="amd64" ;;
|
||||||
|
esac
|
||||||
|
if ! CURL_TIMEOUT=300 curl_with_retry "https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-${ffmpeg_arch}-static.tar.xz" "$TMP_DIR/ffmpeg.tar.xz"; then
|
||||||
msg_error "Failed to download FFmpeg pre-built binary"
|
msg_error "Failed to download FFmpeg pre-built binary"
|
||||||
rm -rf "$TMP_DIR"
|
rm -rf "$TMP_DIR"
|
||||||
return 1
|
return 1
|
||||||
@@ -7881,7 +7904,12 @@ function setup_yq() {
|
|||||||
msg_info "Setup yq $LATEST_VERSION"
|
msg_info "Setup yq $LATEST_VERSION"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! curl_with_retry "https://github.com/${GITHUB_REPO}/releases/download/v${LATEST_VERSION}/yq_linux_amd64" "$TMP_DIR/yq"; then
|
local yq_arch
|
||||||
|
case "$(dpkg --print-architecture 2>/dev/null || echo amd64)" in
|
||||||
|
arm64) yq_arch="arm64" ;;
|
||||||
|
*) yq_arch="amd64" ;;
|
||||||
|
esac
|
||||||
|
if ! curl_with_retry "https://github.com/${GITHUB_REPO}/releases/download/v${LATEST_VERSION}/yq_linux_${yq_arch}" "$TMP_DIR/yq"; then
|
||||||
msg_error "Failed to download yq"
|
msg_error "Failed to download yq"
|
||||||
rm -rf "$TMP_DIR"
|
rm -rf "$TMP_DIR"
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ VERSION=$(curl -fsSL https://api.github.com/repos/coder/code-server/releases/lat
|
|||||||
msg_info "Installing Code-Server v${VERSION}"
|
msg_info "Installing Code-Server v${VERSION}"
|
||||||
|
|
||||||
if [ -f ~/.config/code-server/config.yaml ]; then
|
if [ -f ~/.config/code-server/config.yaml ]; then
|
||||||
existing_config = true
|
existing_config=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
curl -fOL https://github.com/coder/code-server/releases/download/v"$VERSION"/code-server_"${VERSION}"_amd64.deb &>/dev/null
|
curl -fOL https://github.com/coder/code-server/releases/download/v"$VERSION"/code-server_"${VERSION}"_amd64.deb &>/dev/null
|
||||||
|
|||||||
Reference in New Issue
Block a user