Compare commits

..

2 Commits

Author SHA1 Message Date
Slaviša Arežina
8b1165e713 Apply suggestion from @tremor021 2026-03-11 08:20:14 +01:00
Michel Roegl-Brunner
bd093e428b Check if config file exists 2026-03-11 08:06:41 +01:00
13 changed files with 313 additions and 681 deletions

View File

@@ -1,150 +0,0 @@
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

View File

@@ -1,41 +0,0 @@
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

View File

@@ -422,19 +422,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
## 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
### 🚀 Updated Scripts

View File

@@ -9,7 +9,7 @@ APP="Tracearr"
var_tags="${var_tags:-media}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-10}"
var_disk="${var_disk:-5}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}"

View File

@@ -37,7 +37,7 @@ function update_script() {
if [[ -d /etc/wgdashboard ]]; then
sleep 2
cd /etc/wgdashboard/src
$STD ./wgd.sh update -y
$STD ./wgd.sh update
$STD ./wgd.sh start
fi
msg_ok "Updated LXC"

View File

@@ -1,12 +1,12 @@
{
"generated": "2026-03-11T12:12:40Z",
"generated": "2026-03-11T06:17:37Z",
"versions": [
{
"slug": "2fauth",
"repo": "Bubka/2FAuth",
"version": "v6.1.0",
"version": "v6.0.0",
"pinned": false,
"date": "2026-03-11T07:48:27Z"
"date": "2026-01-14T16:00:58Z"
},
{
"slug": "adguard",
@@ -270,9 +270,9 @@
{
"slug": "databasus",
"repo": "databasus/databasus",
"version": "v3.19.1",
"version": "v3.18.0",
"pinned": false,
"date": "2026-03-11T10:25:28Z"
"date": "2026-03-08T20:19:15Z"
},
{
"slug": "dawarich",
@@ -284,9 +284,9 @@
{
"slug": "discopanel",
"repo": "nickheyer/discopanel",
"version": "v2.0.3",
"version": "v2.0.2",
"pinned": false,
"date": "2026-03-11T07:29:10Z"
"date": "2026-03-09T03:38:49Z"
},
{
"slug": "dispatcharr",
@@ -319,9 +319,9 @@
{
"slug": "donetick",
"repo": "donetick/donetick",
"version": "v0.1.75-beta.3",
"version": "v0.1.74",
"pinned": false,
"date": ""
"date": "2026-02-14T23:21:45Z"
},
{
"slug": "drawio",
@@ -1327,9 +1327,9 @@
{
"slug": "revealjs",
"repo": "hakimel/reveal.js",
"version": "6.0.0",
"version": "5.2.1",
"pinned": false,
"date": "2026-03-11T11:54:59Z"
"date": "2025-03-28T13:00:23Z"
},
{
"slug": "romm",
@@ -1376,9 +1376,9 @@
{
"slug": "seaweedfs",
"repo": "seaweedfs/seaweedfs",
"version": "4.17",
"version": "4.16",
"pinned": false,
"date": "2026-03-11T09:30:38Z"
"date": "2026-03-10T06:11:05Z"
},
{
"slug": "seelf",
@@ -1712,9 +1712,9 @@
{
"slug": "wanderer",
"repo": "meilisearch/meilisearch",
"version": "v1.38.2",
"version": "v1.38.0",
"pinned": false,
"date": "2026-03-11T11:36:01Z"
"date": "2026-03-09T08:06:29Z"
},
{
"slug": "warracker",
@@ -1831,9 +1831,9 @@
{
"slug": "zitadel",
"repo": "zitadel/zitadel",
"version": "v4.12.2",
"version": "v4.12.1",
"pinned": false,
"date": "2026-03-11T07:50:10Z"
"date": "2026-03-04T12:40:17Z"
},
{
"slug": "zoraxy",

View File

@@ -21,7 +21,7 @@
"resources": {
"cpu": 2,
"ram": 2048,
"hdd": 10,
"hdd": 5,
"os": "Debian",
"version": "13"
}

View File

@@ -196,7 +196,7 @@ explain_exit_code() {
103) echo "Validation: Shell is not Bash" ;;
104) echo "Validation: Not running as root (or invoked via sudo)" ;;
105) echo "Validation: Proxmox VE version not supported" ;;
106) echo "Validation: Unsupported architecture (requires amd64 or arm64)" ;;
106) echo "Validation: Architecture not supported (ARM / PiMox)" ;;
107) echo "Validation: Kernel key parameters unreadable" ;;
108) echo "Validation: Kernel key limits exceeded" ;;
109) echo "Proxmox: No available container ID after max attempts" ;;
@@ -348,10 +348,10 @@ explain_exit_code() {
json_escape() {
# 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
printf '%s' "$1" |
sed 's/\x1b\[[0-9;]*[a-zA-Z]//g' |
tr -d '\000-\010\013\014\016-\037\177\r' |
awk '
printf '%s' "$1" \
| sed 's/\x1b\[[0-9;]*[a-zA-Z]//g' \
| tr -d '\000-\010\013\014\016-\037\177\r' \
| awk '
BEGIN { ORS = "" }
{
gsub(/\\/, "\\\\") # backslash → \\

File diff suppressed because it is too large Load Diff

View File

@@ -344,15 +344,9 @@ pve_check() {
# - Provides link to ARM64-compatible scripts
# ------------------------------------------------------------------------------
arch_check() {
local arch
arch="$(dpkg --print-architecture)"
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."
if [ "$(dpkg --print-architecture)" != "amd64" ]; then
msg_error "This script will not work with PiMox (ARM architecture detected)."
msg_warn "Visit https://github.com/asylumexp/Proxmox for ARM64 support."
sleep 2
exit 106
fi

View File

@@ -99,7 +99,7 @@ if ! declare -f explain_exit_code &>/dev/null; then
103) echo "Validation: Shell is not Bash" ;;
104) echo "Validation: Not running as root (or invoked via sudo)" ;;
105) echo "Validation: Proxmox VE version not supported" ;;
106) echo "Validation: Unsupported architecture (requires amd64 or arm64)" ;;
106) echo "Validation: Architecture not supported (ARM / PiMox)" ;;
107) echo "Validation: Kernel key parameters unreadable" ;;
108) echo "Validation: Kernel key limits exceeded" ;;
109) echo "Proxmox: No available container ID after max attempts" ;;

View File

@@ -2822,13 +2822,10 @@ function fetch_and_deploy_codeberg_release() {
# Fall back to architecture heuristic
if [[ -z "$url_match" ]]; then
for u in $assets; do
if [[ "${arch,,}" =~ ^(amd64|x86_64)$ ]]; then
[[ "$u" =~ (amd64|x86_64).*\.deb$ ]] || continue
elif [[ "${arch,,}" =~ ^(arm64|aarch64)$ ]]; then
[[ "$u" =~ (arm64|aarch64).*\.deb$ ]] || continue
if [[ "$u" =~ ($arch|amd64|x86_64|aarch64|arm64).*\.deb$ ]]; then
url_match="$u"
break
fi
url_match="$u"
break
done
fi
@@ -3125,11 +3122,7 @@ _gh_scan_older_releases() {
done)
fi
if [[ "$has_match" != "true" ]]; then
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
has_match=$(echo "$releases_list" | jq -r ".[$i].assets[].browser_download_url" | grep -qE "($arch|amd64|x86_64|aarch64|arm64).*\.deb$" && echo true)
fi
if [[ "$has_match" != "true" ]]; then
has_match=$(echo "$releases_list" | jq -r ".[$i].assets[].browser_download_url" | grep -qE '\.deb$' && echo true)
@@ -3335,13 +3328,10 @@ function fetch_and_deploy_gh_release() {
# If no match via explicit pattern, fall back to architecture heuristic
if [[ -z "$url_match" ]]; then
for u in $assets; do
if [[ "${arch,,}" =~ ^(amd64|x86_64)$ ]]; then
[[ "$u" =~ (amd64|x86_64).*\.deb$ ]] || continue
elif [[ "${arch,,}" =~ ^(arm64|aarch64)$ ]]; then
[[ "$u" =~ (arm64|aarch64).*\.deb$ ]] || continue
if [[ "$u" =~ ($arch|amd64|x86_64|aarch64|arm64).*\.deb$ ]]; then
url_match="$u"
break
fi
url_match="$u"
break
done
fi
@@ -3372,13 +3362,10 @@ function fetch_and_deploy_gh_release() {
fi
if [[ -z "$url_match" ]]; then
for u in $assets; do
if [[ "${arch,,}" =~ ^(amd64|x86_64)$ ]]; then
[[ "$u" =~ (amd64|x86_64).*\.deb$ ]] || continue
elif [[ "${arch,,}" =~ ^(arm64|aarch64)$ ]]; then
[[ "$u" =~ (arm64|aarch64).*\.deb$ ]] || continue
if [[ "$u" =~ ($arch|amd64|x86_64|aarch64|arm64).*\.deb$ ]]; then
url_match="$u"
break
fi
url_match="$u"
break
done
fi
if [[ -z "$url_match" ]]; then
@@ -3746,12 +3733,7 @@ function setup_ffmpeg() {
# Binary fallback mode
if [[ "$TYPE" == "binary" ]]; 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
if ! CURL_TIMEOUT=300 curl_with_retry "https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz" "$TMP_DIR/ffmpeg.tar.xz"; then
msg_error "Failed to download FFmpeg binary"
rm -rf "$TMP_DIR"
return 1
@@ -3833,12 +3815,7 @@ function setup_ffmpeg() {
# If no source download (either VERSION empty or download failed), use binary
if [[ -z "$VERSION" ]]; then
msg_info "Setup FFmpeg from pre-built binary"
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
if ! CURL_TIMEOUT=300 curl_with_retry "https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz" "$TMP_DIR/ffmpeg.tar.xz"; then
msg_error "Failed to download FFmpeg pre-built binary"
rm -rf "$TMP_DIR"
return 1
@@ -7904,12 +7881,7 @@ function setup_yq() {
msg_info "Setup yq $LATEST_VERSION"
fi
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
if ! curl_with_retry "https://github.com/${GITHUB_REPO}/releases/download/v${LATEST_VERSION}/yq_linux_amd64" "$TMP_DIR/yq"; then
msg_error "Failed to download yq"
rm -rf "$TMP_DIR"
return 1

View File

@@ -91,7 +91,7 @@ VERSION=$(curl -fsSL https://api.github.com/repos/coder/code-server/releases/lat
msg_info "Installing Code-Server v${VERSION}"
if [ -f ~/.config/code-server/config.yaml ]; then
existing_config=true
existing_config = true
fi
curl -fOL https://github.com/coder/code-server/releases/download/v"$VERSION"/code-server_"${VERSION}"_amd64.deb &>/dev/null