mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-11-18 00:53:39 +01:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cd40038c86 |
No files matched your search
Generated
-36
@@ -203,42 +203,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "🛰️ Services",
|
||||
"labels": [
|
||||
"services"
|
||||
],
|
||||
"subCategories": [
|
||||
{
|
||||
"title": "🐞 Bug Fixes",
|
||||
"labels": [
|
||||
"bugfix"
|
||||
],
|
||||
"notes": []
|
||||
},
|
||||
{
|
||||
"title": "✨ New Features",
|
||||
"labels": [
|
||||
"feature"
|
||||
],
|
||||
"notes": []
|
||||
},
|
||||
{
|
||||
"title": "💥 Breaking Changes",
|
||||
"labels": [
|
||||
"breaking change"
|
||||
],
|
||||
"notes": []
|
||||
},
|
||||
{
|
||||
"title": "🔧 Refactor",
|
||||
"labels": [
|
||||
"refactor"
|
||||
],
|
||||
"notes": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "❔ Uncategorized",
|
||||
"labels": [
|
||||
|
||||
Generated
+4
-5
@@ -324,14 +324,13 @@ jobs:
|
||||
git commit -m "Archive old changelog entries"
|
||||
git checkout -b $BRANCH_NAME || git checkout $BRANCH_NAME
|
||||
git push origin $BRANCH_NAME --force
|
||||
echo "HEAD_SHA=$(git rev-parse HEAD)" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Create pull request if not exists
|
||||
if: env.changed == 'true'
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
|
||||
run: |
|
||||
PR_EXISTS=$(gh pr list --head "${BRANCH_NAME}" --state open --json number,isCrossRepository --jq '[.[] | select(.isCrossRepository == false)][0].number // empty')
|
||||
PR_EXISTS=$(gh pr list --head "${BRANCH_NAME}" --json number --jq '.[].number')
|
||||
if [ -z "$PR_EXISTS" ]; then
|
||||
gh pr create --title "[Github Action] Archive old changelog entries" \
|
||||
--body "This PR is auto-generated by a Github Action to archive old changelog entries (older than 14 days) to .github/changelogs/YEAR/MONTH.md" \
|
||||
@@ -347,8 +346,8 @@ jobs:
|
||||
run: |
|
||||
git config --global user.name "github-actions-automege[bot]"
|
||||
git config --global user.email "github-actions-automege[bot]@users.noreply.github.com"
|
||||
PR_NUMBER=$(gh pr list --head "${BRANCH_NAME}" --state open --json number,isCrossRepository --jq '[.[] | select(.isCrossRepository == false)][0].number // empty')
|
||||
PR_NUMBER=$(gh pr list --head "${BRANCH_NAME}" --json number --jq '.[].number')
|
||||
if [ -n "$PR_NUMBER" ]; then
|
||||
gh pr review "$PR_NUMBER" --approve
|
||||
gh pr merge "$PR_NUMBER" --squash --admin --match-head-commit "$HEAD_SHA"
|
||||
gh pr review $PR_NUMBER --approve
|
||||
gh pr merge $PR_NUMBER --squash --admin
|
||||
fi
|
||||
Generated
+67
-118
@@ -118,63 +118,9 @@ jobs:
|
||||
)
|
||||
);
|
||||
|
||||
async function getScriptAuthors(pr) {
|
||||
try {
|
||||
const { data: files } = await github.rest.pulls.listFiles({
|
||||
owner: context.repo.owner,
|
||||
repo: "ProxmoxVE",
|
||||
pull_number: pr.number,
|
||||
per_page: 100,
|
||||
});
|
||||
const ctFile = files.find(file => file.status === "added" && /^ct\/[^/]+\.sh$/.test(file.filename));
|
||||
if (!ctFile) return "";
|
||||
|
||||
const { data: script } = await github.rest.repos.getContent({
|
||||
owner: context.repo.owner,
|
||||
repo: "ProxmoxVE",
|
||||
path: ctFile.filename,
|
||||
ref: pr.merge_commit_sha,
|
||||
});
|
||||
const header = Buffer.from(script.content, "base64").toString("utf-8")
|
||||
.split("\n").slice(0, 20)
|
||||
.find(line => /^#\s*Authors?:/i.test(line));
|
||||
if (!header) return "";
|
||||
|
||||
// "MickLesk (CanbiZ)" puts the handle first, "Slaviša Arežina (tremor021)" in the parentheses
|
||||
const candidates = header.replace(/^#\s*Authors?:/i, "").split("|").map(part => {
|
||||
part = part.trim().replace(/^[A-Za-z-]+:\s*/, "");
|
||||
const match = part.match(/^([^(]*)\(([^)]*)\)/);
|
||||
if (!match) return part;
|
||||
const words = match[1].trim().split(/\s+/).filter(Boolean);
|
||||
return words.length === 1 ? words[0] : match[2].trim();
|
||||
});
|
||||
|
||||
// A display name used alone in a header; the GitHub account of that name is someone else
|
||||
const authorAliases = { canbiz: "MickLesk" };
|
||||
const logins = [];
|
||||
for (let candidate of candidates) {
|
||||
if (!/^[A-Za-z0-9-]+$/.test(candidate)) continue;
|
||||
candidate = authorAliases[candidate.toLowerCase()] ?? candidate;
|
||||
try {
|
||||
const { data: user } = await github.rest.users.getByUsername({ username: candidate });
|
||||
if (user.type === "User" && !logins.includes(user.login)) logins.push(user.login);
|
||||
} catch (error) {
|
||||
console.log(`No GitHub user ${candidate} (${ctFile.filename}): ${error}`);
|
||||
}
|
||||
}
|
||||
return logins.map(login => `[@${login}](https://github.com/${login})`).join(", ");
|
||||
} catch (error) {
|
||||
console.error(`Could not read the author of #${pr.number}: ${error}`);
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
for (const pr of filteredPRs) {
|
||||
const prLabels = pr.labels.map(label => label.name.toLowerCase());
|
||||
const scriptAuthors = prLabels.includes("new script") ? await getScriptAuthors(pr) : "";
|
||||
if (scriptAuthors) {
|
||||
prNote = `- ${pr.title} ${scriptAuthors} ([#${pr.number}](${pr.html_url}))`;
|
||||
} else if (pr.user.login.includes("push-app-to-main[bot]")) {
|
||||
if (pr.user.login.includes("push-app-to-main[bot]")) {
|
||||
|
||||
const scriptName = pr.title;
|
||||
try {
|
||||
@@ -182,12 +128,11 @@ jobs:
|
||||
owner: context.repo.owner,
|
||||
repo: "DevScripts",
|
||||
state: "all",
|
||||
labels: ["Started Migration To ProxmoxVE"],
|
||||
per_page: 100,
|
||||
labels: ["Started Migration To ProxmoxVE"]
|
||||
});
|
||||
|
||||
const matchingIssue = relatedIssues.find(issue =>
|
||||
issue.title.trim().toLowerCase() === scriptName.trim().toLowerCase()
|
||||
issue.title.toLowerCase().includes(scriptName.toLowerCase())
|
||||
);
|
||||
|
||||
if (matchingIssue) {
|
||||
@@ -267,70 +212,75 @@ jobs:
|
||||
|
||||
}
|
||||
|
||||
// ── Pull requests from other repositories ───────────────────────
|
||||
const externalRepos = [
|
||||
{ repo: "core", category: "💾 Core", prefix: "core" },
|
||||
{ repo: "services", category: "🛰️ Services", prefix: "services" },
|
||||
{ repo: "ProxmoxVE-Frontend", category: "🌐 Website", prefix: "website" },
|
||||
];
|
||||
const externalLabelAliases = {
|
||||
bug: "bugfix",
|
||||
bugfix: "bugfix",
|
||||
enhancement: "feature",
|
||||
feature: "feature",
|
||||
refactor: "refactor",
|
||||
"breaking change": "breaking change",
|
||||
};
|
||||
const externalPriority = ["breaking change", "bugfix", "feature", "refactor"];
|
||||
// ── Engine pull requests ────────────────────────────────────────
|
||||
// The engine lives in community-scripts/core, so its changes never
|
||||
// show up in this repository's PR list -- and a fix there reaches
|
||||
// every script here. The "💾 Core" category already existed for
|
||||
// ProxmoxVE PRs labelled `core`; engine PRs land in the same place.
|
||||
try {
|
||||
const { data: corePulls } = await github.rest.pulls.list({
|
||||
owner: context.repo.owner,
|
||||
repo: "core",
|
||||
base: "main",
|
||||
state: "closed",
|
||||
sort: "updated",
|
||||
direction: "desc",
|
||||
per_page: 100,
|
||||
});
|
||||
|
||||
for (const { repo, category: categoryTitle, prefix } of externalRepos) {
|
||||
try {
|
||||
const { data: externalPulls } = await github.rest.pulls.list({
|
||||
owner: context.repo.owner,
|
||||
repo,
|
||||
base: "main",
|
||||
state: "closed",
|
||||
sort: "updated",
|
||||
direction: "desc",
|
||||
per_page: 100,
|
||||
});
|
||||
const coreCategory = categorizedPRs.find(category =>
|
||||
category.title.includes("Core") || category.labels.includes("core"));
|
||||
|
||||
const category = categorizedPRs.find(c => c.title === categoryTitle);
|
||||
// core carries GitHub's default label set, and most of its pull
|
||||
// requests carry none at all, so map what maps and let the rest
|
||||
// sit directly under the category.
|
||||
const coreLabelAliases = {
|
||||
bug: "bugfix",
|
||||
bugfix: "bugfix",
|
||||
enhancement: "feature",
|
||||
feature: "feature",
|
||||
refactor: "refactor",
|
||||
"breaking change": "breaking change",
|
||||
};
|
||||
const corePriority = ["breaking change", "bugfix", "feature", "refactor"];
|
||||
|
||||
for (const pr of externalPulls) {
|
||||
if (!pr.merged_at) continue;
|
||||
if (new Date(pr.merged_at) <= latestDateInChangelog) continue;
|
||||
for (const pr of corePulls) {
|
||||
if (!pr.merged_at) continue;
|
||||
if (new Date(pr.merged_at) <= latestDateInChangelog) continue;
|
||||
|
||||
const rawLabels = pr.labels.map(label => label.name.toLowerCase());
|
||||
if (rawLabels.some(l => ["invalid", "wontdo", "wontfix", "duplicate", process.env.AUTOMATED_PR_LABEL].includes(l))) continue;
|
||||
const rawLabels = pr.labels.map(label => label.name.toLowerCase());
|
||||
if (rawLabels.some(l => ["invalid", "wontdo", "wontfix", "duplicate", process.env.AUTOMATED_PR_LABEL].includes(l))) continue;
|
||||
|
||||
if (!category) {
|
||||
console.log(`No ${categoryTitle} category configured; skipping ${prefix}#${pr.number}`);
|
||||
continue;
|
||||
}
|
||||
if (!coreCategory) {
|
||||
console.log(`No Core category configured; skipping core#${pr.number}`);
|
||||
continue;
|
||||
}
|
||||
|
||||
// core#N rather than #N: a bare #N links to a pull request in this repository.
|
||||
const note = `- ${pr.title} [@${pr.user.login}](https://github.com/${pr.user.login}) ([${prefix}#${pr.number}](${pr.html_url}))`;
|
||||
// core#N rather than #N: a bare number reads as a pull request
|
||||
// in this repository, so the link would lead somewhere other
|
||||
// than the text promises.
|
||||
const coreNote = `- ${pr.title} [@${pr.user.login}](https://github.com/${pr.user.login}) ([core#${pr.number}](${pr.html_url}))`;
|
||||
|
||||
const mapped = rawLabels.map(l => externalLabelAliases[l]).filter(Boolean);
|
||||
let placed = false;
|
||||
if (category.subCategories && category.subCategories.length > 0) {
|
||||
for (const priorityLabel of externalPriority) {
|
||||
if (!mapped.includes(priorityLabel)) continue;
|
||||
const subCategory = category.subCategories.find(sub =>
|
||||
sub.labels.includes(priorityLabel));
|
||||
if (subCategory) {
|
||||
subCategory.notes.push(note);
|
||||
placed = true;
|
||||
break;
|
||||
}
|
||||
const mapped = rawLabels.map(l => coreLabelAliases[l]).filter(Boolean);
|
||||
let placed = false;
|
||||
if (coreCategory.subCategories && coreCategory.subCategories.length > 0) {
|
||||
for (const priorityLabel of corePriority) {
|
||||
if (!mapped.includes(priorityLabel)) continue;
|
||||
const subCategory = coreCategory.subCategories.find(sub =>
|
||||
sub.labels.includes(priorityLabel));
|
||||
if (subCategory) {
|
||||
subCategory.notes.push(coreNote);
|
||||
placed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!placed) category.notes.push(note);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(`Could not read ${repo} pull requests: ${error}`);
|
||||
if (!placed) coreCategory.notes.push(coreNote);
|
||||
}
|
||||
} catch (error) {
|
||||
// The engine repository being unreachable must not cost this
|
||||
// repository its changelog.
|
||||
console.error(`Could not read core pull requests: ${error}`);
|
||||
}
|
||||
|
||||
return categorizedPRs;
|
||||
@@ -399,14 +349,13 @@ jobs:
|
||||
git commit -m "Update CHANGELOG.md"
|
||||
git checkout -b $BRANCH_NAME || git checkout $BRANCH_NAME
|
||||
git push origin $BRANCH_NAME --force
|
||||
echo "HEAD_SHA=$(git rev-parse HEAD)" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Create pull request if not exists
|
||||
if: env.changed == 'true'
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
|
||||
run: |
|
||||
PR_EXISTS=$(gh pr list --head "${BRANCH_NAME}" --state open --json number,isCrossRepository --jq '[.[] | select(.isCrossRepository == false)][0].number // empty')
|
||||
PR_EXISTS=$(gh pr list --head "${BRANCH_NAME}" --json number --jq '.[].number')
|
||||
if [ -z "$PR_EXISTS" ]; then
|
||||
gh pr create --title "[Github Action] Update CHANGELOG.md" \
|
||||
--body "This PR is auto-generated by a Github Action to update the CHANGELOG.md file." \
|
||||
@@ -420,9 +369,9 @@ jobs:
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
PR_NUMBER=$(gh pr list --head "${BRANCH_NAME}" --state open --json number,isCrossRepository --jq '[.[] | select(.isCrossRepository == false)][0].number // empty')
|
||||
PR_NUMBER=$(gh pr list --head "${BRANCH_NAME}" --json number --jq '.[].number')
|
||||
if [ -n "$PR_NUMBER" ]; then
|
||||
gh pr review "$PR_NUMBER" --approve
|
||||
gh pr review $PR_NUMBER --approve
|
||||
fi
|
||||
|
||||
- name: Approve pull request and merge
|
||||
@@ -432,8 +381,8 @@ jobs:
|
||||
run: |
|
||||
git config --global user.name "github-actions-automege[bot]"
|
||||
git config --global user.email "github-actions-automege[bot]@users.noreply.github.com"
|
||||
PR_NUMBER=$(gh pr list --head "${BRANCH_NAME}" --state open --json number,isCrossRepository --jq '[.[] | select(.isCrossRepository == false)][0].number // empty')
|
||||
PR_NUMBER=$(gh pr list --head "${BRANCH_NAME}" --json number --jq '.[].number')
|
||||
if [ -n "$PR_NUMBER" ]; then
|
||||
gh pr review "$PR_NUMBER" --approve
|
||||
gh pr merge "$PR_NUMBER" --squash --admin --match-head-commit "$HEAD_SHA"
|
||||
gh pr review $PR_NUMBER --approve
|
||||
gh pr merge $PR_NUMBER --squash --admin
|
||||
fi
|
||||
Generated
+3
-25
@@ -19,7 +19,6 @@ jobs:
|
||||
run: sed -n '/^## /,$p' CHANGELOG.md > changelog_cleaned.md
|
||||
|
||||
- name: Extract relevant changelog section
|
||||
id: extract
|
||||
run: |
|
||||
YESTERDAY=$(date -u --date="yesterday" +%Y-%m-%d)
|
||||
echo "Checking for changes on: $YESTERDAY"
|
||||
@@ -27,24 +26,8 @@ jobs:
|
||||
# Extract the section from "## $YESTERDAY" until the next "## YYYY-MM-DD"
|
||||
sed -n "/^## $YESTERDAY/,/^## [0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}/p" changelog_cleaned.md | head -n -1 > changelog_tmp_full.md
|
||||
|
||||
# GitHub fills a release's Contributors only from bare @login mentions
|
||||
sed -i -E 's#\[@([A-Za-z0-9-]+)\]\(https://github\.com/\1\)#@\1#g' changelog_tmp_full.md
|
||||
|
||||
# Keep whole lines up to 120000 characters (GitHub allows 125000)
|
||||
export LC_ALL=C.UTF-8
|
||||
SIZE=0
|
||||
TRUNCATED=false
|
||||
while IFS= read -r line || [ -n "$line" ]; do
|
||||
SIZE=$((SIZE + ${#line} + 1))
|
||||
if [ "$SIZE" -gt 120000 ]; then
|
||||
TRUNCATED=true
|
||||
break
|
||||
fi
|
||||
printf '%s\n' "$line"
|
||||
done < changelog_tmp_full.md > changelog_tmp.md
|
||||
if [ "$TRUNCATED" = true ]; then
|
||||
printf '\nCut to fit the release size limit. The full list is in [CHANGELOG.md](https://github.com/community-scripts/ProxmoxVE/blob/main/CHANGELOG.md).\n' >> changelog_tmp.md
|
||||
fi
|
||||
# Truncate the extracted section to 5000 characters
|
||||
head -c 5000 changelog_tmp_full.md > changelog_tmp.md
|
||||
|
||||
echo "=== Extracted Changelog ==="
|
||||
cat changelog_tmp.md
|
||||
@@ -53,17 +36,12 @@ jobs:
|
||||
# Abort if no content was found
|
||||
if [ ! -s changelog_tmp.md ]; then
|
||||
echo "No changes found for $YESTERDAY, skipping release."
|
||||
echo "skip=true" >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
- name: Create GitHub release
|
||||
if: steps.extract.outputs.skip != 'true'
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
YESTERDAY=$(date -u --date="yesterday" +%Y-%m-%d)
|
||||
PREVIOUS=$(gh release view --json tagName --jq .tagName 2>/dev/null || true)
|
||||
if [ -n "$PREVIOUS" ]; then
|
||||
printf '\n**Full Changelog**: https://github.com/community-scripts/ProxmoxVE/compare/%s...%s\n' "$PREVIOUS" "$YESTERDAY" >> changelog_tmp.md
|
||||
fi
|
||||
gh release create "$YESTERDAY" -t "$YESTERDAY" -F changelog_tmp.md
|
||||
@@ -584,67 +584,12 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
</details>
|
||||
|
||||
## 2026-11-17
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- AIOStreams [@MrNRod](https://github.com/MrNRod) ([#18673](https://github.com/community-scripts/ProxmoxVE/pull/18673))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- immichframe: move to .NET 10 (1.0.40.0 requires it) [@supersoju](https://github.com/supersoju) ([#18806](https://github.com/community-scripts/ProxmoxVE/pull/18806))
|
||||
- LibreNMS: write a valid APP_KEY before migrating [@MickLesk](https://github.com/MickLesk) ([#18776](https://github.com/community-scripts/ProxmoxVE/pull/18776))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- OpenCloud: bump to v9.1.1 [@SimKaiLong](https://github.com/SimKaiLong) ([#18795](https://github.com/community-scripts/ProxmoxVE/pull/18795))
|
||||
- Portabase: support file and folder backups (restic / rclone) [@MickLesk](https://github.com/MickLesk) ([#18766](https://github.com/community-scripts/ProxmoxVE/pull/18766))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- ITSM-NG: fetch the repo and key over HTTPS [@MickLesk](https://github.com/MickLesk) ([#18799](https://github.com/community-scripts/ProxmoxVE/pull/18799))
|
||||
- Frigate: Fetch the OpenVINO model over HTTPS [@MickLesk](https://github.com/MickLesk) ([#18797](https://github.com/community-scripts/ProxmoxVE/pull/18797))
|
||||
- Change Detection: replace Browserless with SockPuppetBrowser [@MickLesk](https://github.com/MickLesk) ([#18767](https://github.com/community-scripts/ProxmoxVE/pull/18767))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- Stop setting kernel.keys.maxkeys on Incus containers [@MickLesk](https://github.com/MickLesk) ([core#277](https://github.com/community-scripts/core/pull/277))
|
||||
- Bound the template catalog lookup so a dead storage cannot hang the run [@MickLesk](https://github.com/MickLesk) ([core#275](https://github.com/community-scripts/core/pull/275))
|
||||
- Record a failed command as written in the script [@MickLesk](https://github.com/MickLesk) ([core#274](https://github.com/community-scripts/core/pull/274))
|
||||
- Let the Incus network wait ask again when its probe fails [@MickLesk](https://github.com/MickLesk) ([core#273](https://github.com/community-scripts/core/pull/273))
|
||||
- Run the VM cleanup and Incus file pull tests in CI | Take files out of an Incus guest as a bounded stream into a private file [@MickLesk](https://github.com/MickLesk) ([core#272](https://github.com/community-scripts/core/pull/272))
|
||||
|
||||
### 🧰 Tools
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Arcane: show the generated admin password [@MickLesk](https://github.com/MickLesk) ([#18785](https://github.com/community-scripts/ProxmoxVE/pull/18785))
|
||||
|
||||
### 📚 Documentation
|
||||
|
||||
- Changelog: Credit script authors and list services and website changes [@MickLesk](https://github.com/MickLesk) ([#18809](https://github.com/community-scripts/ProxmoxVE/pull/18809))
|
||||
- Merge only the changelog pull request the job opened [@MickLesk](https://github.com/MickLesk) ([#18804](https://github.com/community-scripts/ProxmoxVE/pull/18804))
|
||||
|
||||
### 🛰️ Services
|
||||
|
||||
- Serve failure text only to requests that carry the admin token [@MickLesk](https://github.com/MickLesk) ([services#17](https://github.com/community-scripts/services/pull/17))
|
||||
- Number the notes in the testing message and show their type [@MickLesk](https://github.com/MickLesk) ([services#16](https://github.com/community-scripts/services/pull/16))
|
||||
- Decide exit 255 by the command, not as dpkg [@MickLesk](https://github.com/MickLesk) ([services#14](https://github.com/community-scripts/services/pull/14))
|
||||
|
||||
## 2026-11-16
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- Gitea Runner ([#18782](https://github.com/community-scripts/ProxmoxVE/pull/18782))
|
||||
- NetAlertX ([#18781](https://github.com/community-scripts/ProxmoxVE/pull/18781))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Dawarich: let Rails serve undigested asset paths [@ryanvo](https://github.com/ryanvo) ([#18779](https://github.com/community-scripts/ProxmoxVE/pull/18779))
|
||||
- ArchiveBox: install libatomic1 for the Playwright driver [@MickLesk](https://github.com/MickLesk) ([#18722](https://github.com/community-scripts/ProxmoxVE/pull/18722))
|
||||
- Ollama/OpenWebUI: download update before stopping the service [@jobben-2025](https://github.com/jobben-2025) ([#18755](https://github.com/community-scripts/ProxmoxVE/pull/18755))
|
||||
- opengym: bump Node.js from 22 to 26 [@github-actions[bot]](https://github.com/github-actions[bot]) ([#18756](https://github.com/community-scripts/ProxmoxVE/pull/18756))
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MrNRod
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/Viren070/AIOStreams
|
||||
|
||||
APP="AIOStreams"
|
||||
var_tags="${var_tags:-media;streaming;stremio}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-8}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
#var_arm64="${var_arm64:-no}" # unset = ask the user; set yes/no only when verified
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/aiostreams ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "aiostreams" "Viren070/AIOStreams" "" "" "v"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop aiostreams
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "aiostreams" "Viren070/AIOStreams" "tarball" "latest" "" "" "v"
|
||||
AIOSTREAMS_TAG="$CHECK_UPDATE_RELEASE"
|
||||
|
||||
PNPM_VERSION=$(sed -n 's/.*"packageManager": "pnpm@\([^"+]*\).*/\1/p' /opt/aiostreams/package.json)
|
||||
NODE_VERSION="24" NODE_MODULE="pnpm@${PNPM_VERSION:-11.0.8}" setup_nodejs
|
||||
|
||||
msg_info "Building Application (Patience)"
|
||||
cd /opt/aiostreams
|
||||
export NODE_OPTIONS="--max-old-space-size=3072"
|
||||
$STD pnpm install --frozen-lockfile
|
||||
$STD pnpm run build
|
||||
unset NODE_OPTIONS
|
||||
cp -r /opt/aiostreams/packages/server/src/static /opt/aiostreams/packages/server/dist/static
|
||||
msg_ok "Built Application"
|
||||
|
||||
msg_info "Generating Version Metadata"
|
||||
mkdir -p /opt/aiostreams/resources
|
||||
AIOSTREAMS_VERSION=$(jq -r '.version' /opt/aiostreams/package.json)
|
||||
AIOSTREAMS_DESC=$(jq -r '.description' /opt/aiostreams/package.json)
|
||||
AIOSTREAMS_COMMIT_INFO=$(curl -fsSL "https://api.github.com/repos/Viren070/AIOStreams/commits/${AIOSTREAMS_TAG}" 2>/dev/null || true)
|
||||
AIOSTREAMS_COMMIT=$(jq -r '.sha[0:8] // empty' <<<"${AIOSTREAMS_COMMIT_INFO}")
|
||||
AIOSTREAMS_COMMIT_TIME=$(jq -r '.commit.committer.date // empty' <<<"${AIOSTREAMS_COMMIT_INFO}")
|
||||
cat <<EOF >/opt/aiostreams/resources/metadata.json
|
||||
{
|
||||
"version": "${AIOSTREAMS_VERSION}",
|
||||
"description": $(jq -Rn --arg d "${AIOSTREAMS_DESC}" '$d'),
|
||||
"tag": "${AIOSTREAMS_TAG}",
|
||||
"channel": "stable",
|
||||
"commitHash": "${AIOSTREAMS_COMMIT:-unknown}",
|
||||
"buildTime": "$(date -u +%Y-%m-%dT%H:%M:%S.000Z)",
|
||||
"commitTime": "${AIOSTREAMS_COMMIT_TIME:-$(date -u +%Y-%m-%dT%H:%M:%S.000Z)}"
|
||||
}
|
||||
EOF
|
||||
msg_ok "Generated Version Metadata"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start aiostreams
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Updated successfully!"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
||||
echo -e "${INFO}${YW} No authentication is enabled by default.${CL}"
|
||||
echo -e "${INFO}${YW} Set AIOSTREAMS_AUTH in /opt/aiostreams_data/.env to secure the dashboard.${CL}"
|
||||
+38
-65
@@ -31,7 +31,7 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
|
||||
ensure_dependencies libjpeg-dev poppler-utils file locales xvfb xauth python3
|
||||
ensure_dependencies libjpeg-dev poppler-utils file locales
|
||||
|
||||
msg_info "Generating Locales"
|
||||
for l in cs_CZ de_DE en_GB en_US es_ES fr_FR id_ID it_IT ja_JP ko_KR \
|
||||
@@ -44,83 +44,56 @@ function update_script() {
|
||||
fi
|
||||
msg_ok "Generated Locales"
|
||||
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
VENV_PATH="/opt/changedetection/.venv"
|
||||
CHANGEDETECTION_BIN="${VENV_PATH}/bin/changedetection.io"
|
||||
SERVICE_FILE="/etc/systemd/system/changedetection.service"
|
||||
|
||||
PYTHON_VERSION="3.13" setup_uv
|
||||
|
||||
msg_info "Updating ${APP}"
|
||||
[[ -x "$CHANGEDETECTION_BIN" ]] || $STD uv venv --clear "$VENV_PATH"
|
||||
$STD uv pip install --python "$VENV_PATH/bin/python" --upgrade changedetection.io playwright
|
||||
if ! grep -q "$CHANGEDETECTION_BIN" "$SERVICE_FILE"; then
|
||||
sed -i "s|^ExecStart=.*|ExecStart=$CHANGEDETECTION_BIN -d /opt/changedetection -p 5000|" "$SERVICE_FILE"
|
||||
fi
|
||||
msg_ok "Updated ${APP}"
|
||||
|
||||
if [[ ! -f /etc/apt/sources.list.d/google-chrome.sources ]]; then
|
||||
msg_info "Installing Chrome"
|
||||
setup_deb822_repo \
|
||||
"google-chrome" \
|
||||
"https://dl.google.com/linux/linux_signing_key.pub" \
|
||||
"https://dl.google.com/linux/chrome/deb/" \
|
||||
"stable"
|
||||
$STD apt install -y google-chrome-stable
|
||||
rm -f /etc/apt/sources.list.d/google-chrome.list
|
||||
msg_ok "Installed Chrome"
|
||||
if [[ ! -d "$VENV_PATH" || ! -x "$CHANGEDETECTION_BIN" ]]; then
|
||||
msg_info "Migrating to uv/venv"
|
||||
rm -rf "$VENV_PATH"
|
||||
$STD uv venv --clear "$VENV_PATH"
|
||||
$STD "$VENV_PATH/bin/python" -m ensurepip --upgrade
|
||||
$STD "$VENV_PATH/bin/python" -m pip install --upgrade pip
|
||||
$STD "$VENV_PATH/bin/python" -m pip install changedetection.io playwright
|
||||
msg_ok "Migrated to uv/venv"
|
||||
else
|
||||
msg_info "Updating Chrome"
|
||||
apt_update_safe
|
||||
$STD apt install -y --only-upgrade google-chrome-stable
|
||||
msg_ok "Updated Chrome"
|
||||
msg_info "Updating ${APP}"
|
||||
$STD "$VENV_PATH/bin/python" -m pip install --upgrade changedetection.io playwright
|
||||
msg_ok "Updated ${APP}"
|
||||
fi
|
||||
|
||||
if check_for_gh_release "sockpuppetbrowser" "dgtlmoon/sockpuppetbrowser"; then
|
||||
[[ -f /etc/systemd/system/sockpuppetbrowser.service ]] && systemctl stop sockpuppetbrowser
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "sockpuppetbrowser" "dgtlmoon/sockpuppetbrowser" "tarball"
|
||||
|
||||
msg_info "Setting up SockPuppetBrowser"
|
||||
id -u chrome &>/dev/null || useradd -r -m -s /usr/sbin/nologin chrome
|
||||
$STD uv venv --clear --python /usr/bin/python3 /opt/sockpuppetbrowser/.venv
|
||||
$STD uv pip install --python /opt/sockpuppetbrowser/.venv/bin/python -r /opt/sockpuppetbrowser/requirements.txt
|
||||
msg_ok "Set up SockPuppetBrowser"
|
||||
SERVICE_FILE="/etc/systemd/system/changedetection.service"
|
||||
if ! grep -q "${VENV_PATH}/bin/changedetection.io" "$SERVICE_FILE"; then
|
||||
msg_info "Updating systemd service"
|
||||
sed -i "s|^ExecStart=.*|ExecStart=${VENV_PATH}/bin/changedetection.io -d /opt/changedetection -p 5000|" "$SERVICE_FILE"
|
||||
$STD systemctl daemon-reload
|
||||
msg_ok "Updated systemd service"
|
||||
fi
|
||||
|
||||
if [[ -f /etc/systemd/system/browserless.service ]]; then
|
||||
msg_info "Replacing Browserless with SockPuppetBrowser"
|
||||
systemctl disable -q --now browserless
|
||||
rm -f /etc/systemd/system/browserless.service
|
||||
rm -rf /opt/browserless /root/.cache/ms-playwright
|
||||
$STD apt purge -y microsoft-edge-stable
|
||||
rm -f /etc/apt/sources.list.d/microsoft-edge-stable.list
|
||||
cat <<EOF >/etc/systemd/system/sockpuppetbrowser.service
|
||||
[Unit]
|
||||
Description=SockPuppetBrowser
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=chrome
|
||||
Group=chrome
|
||||
WorkingDirectory=/opt/sockpuppetbrowser/backend
|
||||
Environment=CHROME_BIN=/usr/bin/google-chrome-stable
|
||||
Environment=LOG_LEVEL=INFO
|
||||
ExecStart=/opt/sockpuppetbrowser/.venv/bin/python server.py --host 127.0.0.1 --port 3000 --sport 8080
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
sed -i 's/browserless\.service/sockpuppetbrowser.service/g' "$SERVICE_FILE"
|
||||
sed -i -e '/^WEBDRIVER_URL=/d' \
|
||||
-e 's|^PLAYWRIGHT_DRIVER_URL=ws://localhost:3000/chrome.*|PLAYWRIGHT_DRIVER_URL=ws://127.0.0.1:3000/?headful=true\&--window-size=1920,1080|' \
|
||||
/opt/changedetection/.env
|
||||
systemctl daemon-reload
|
||||
systemctl enable -q sockpuppetbrowser
|
||||
msg_ok "Replaced Browserless with SockPuppetBrowser"
|
||||
msg_info "Updating Browserless (Patience)"
|
||||
$STD git -C /opt/browserless/ fetch --all
|
||||
$STD git -C /opt/browserless/ reset --hard origin/main
|
||||
$STD npm ci --include=optional --include=dev --prefix /opt/browserless
|
||||
$STD npm install --save-exact playwright-core@1.62.1 --prefix /opt/browserless
|
||||
$STD /opt/browserless/node_modules/playwright-core/cli.js install --with-deps
|
||||
# Update Chrome separately, as it has to be done with the force option. Otherwise the installation of other browsers will not be done if Chrome is already installed.
|
||||
$STD /opt/browserless/node_modules/playwright-core/cli.js install --force chrome
|
||||
$STD /opt/browserless/node_modules/playwright-core/cli.js install --force msedge
|
||||
$STD /opt/browserless/node_modules/playwright-core/cli.js install chromium firefox webkit
|
||||
$STD npm install --prefix /opt/browserless esbuild typescript ts-node @types/node --save-dev
|
||||
$STD npm run build --prefix /opt/browserless
|
||||
$STD npm run build:function --prefix /opt/browserless
|
||||
$STD npm prune production --prefix /opt/browserless
|
||||
systemctl restart browserless
|
||||
msg_ok "Updated Browserless"
|
||||
else
|
||||
msg_error "No Browserless Installation Found!"
|
||||
fi
|
||||
|
||||
systemctl daemon-reload
|
||||
systemctl restart sockpuppetbrowser
|
||||
systemctl restart changedetection
|
||||
msg_ok "Updated successfully!"
|
||||
exit
|
||||
|
||||
@@ -40,13 +40,6 @@ function update_script() {
|
||||
msg_ok "Fixed MapLibre delivery in Nginx"
|
||||
fi
|
||||
|
||||
if [[ -f /etc/nginx/sites-available/dawarich.conf ]] && grep -q 'try_files \$uri =404;' /etc/nginx/sites-available/dawarich.conf; then
|
||||
msg_info "Fixing Dawarich asset fallback in Nginx"
|
||||
sed -i 's|try_files \$uri =404;|try_files $uri @rails;|' /etc/nginx/sites-available/dawarich.conf
|
||||
nginx_enable_site dawarich.conf
|
||||
msg_ok "Fixed Dawarich asset fallback in Nginx"
|
||||
fi
|
||||
|
||||
if check_for_gh_release "dawarich" "Freika/dawarich"; then
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop dawarich-web dawarich-worker
|
||||
|
||||
@@ -1,135 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: community-scripts
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://gitea.com/gitea/runner
|
||||
|
||||
APP="Gitea-Runner"
|
||||
var_tags="${var_tags:-ci;git}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_arm64="${var_arm64:-yes}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
# Needed for container-based workflow execution (Docker/Podman inside LXC)
|
||||
var_nesting="${var_nesting:-1}"
|
||||
var_keyctl="${var_keyctl:-1}"
|
||||
|
||||
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
|
||||
var_os=$(msg_menu "Choose the container OS" \
|
||||
"debian" "Debian 13" \
|
||||
"alpine" "Alpine 3.24 (smaller)")
|
||||
fi
|
||||
|
||||
var_os="${var_os:-debian}"
|
||||
if [[ "${var_os:-}" == "alpine" ]]; then
|
||||
var_ram="${var_ram:-1024}"
|
||||
var_disk="${var_disk:-4}"
|
||||
var_version="${var_version:-3.24}"
|
||||
else
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-8}"
|
||||
var_version="${var_version:-13}"
|
||||
fi
|
||||
|
||||
export var_gitea_url="${var_gitea_url:-}"
|
||||
export var_gitea_token="${var_gitea_token:-}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
update_deb_based() {
|
||||
if [[ ! -f /usr/local/bin/gitea-runner ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ensure_dependencies git
|
||||
|
||||
RELEASE=$(curl -fsSL https://gitea.com/api/v1/repos/gitea/runner/releases/latest | jq -r .tag_name | sed 's/^v//')
|
||||
if [[ "${RELEASE}" == "$(cat ~/.gitea-runner 2>/dev/null)" ]]; then
|
||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||
exit
|
||||
fi
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop gitea-runner
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Updating ${APP} to v${RELEASE}"
|
||||
$STD curl -fsSL -o /usr/local/bin/gitea-runner "https://gitea.com/gitea/runner/releases/download/v${RELEASE}/gitea-runner-${RELEASE}-linux-$(arch_resolve)"
|
||||
chmod +x /usr/local/bin/gitea-runner
|
||||
ln -sf /usr/local/bin/gitea-runner /usr/local/bin/act_runner
|
||||
echo "${RELEASE}" >~/.gitea-runner
|
||||
msg_ok "Updated ${APP} to v${RELEASE}"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start gitea-runner
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Updated successfully!"
|
||||
}
|
||||
|
||||
update_alpine() {
|
||||
if [[ ! -f /usr/local/bin/gitea-runner ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
msg_info "Updating Alpine Packages"
|
||||
$STD apk -U upgrade
|
||||
$STD apk add --no-cache git
|
||||
msg_ok "Updated Alpine Packages"
|
||||
|
||||
RELEASE=$(curl -fsSL https://gitea.com/api/v1/repos/gitea/runner/releases/latest | jq -r .tag_name | sed 's/^v//')
|
||||
if [[ "${RELEASE}" == "$(cat ~/.gitea-runner 2>/dev/null)" ]]; then
|
||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||
exit
|
||||
fi
|
||||
|
||||
msg_info "Stopping Service"
|
||||
$STD rc-service gitea-runner stop
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Updating ${APP} to v${RELEASE}"
|
||||
$STD curl -fsSL -o /usr/local/bin/gitea-runner "https://gitea.com/gitea/runner/releases/download/v${RELEASE}/gitea-runner-${RELEASE}-linux-$(arch_resolve)"
|
||||
chmod +x /usr/local/bin/gitea-runner
|
||||
ln -sf /usr/local/bin/gitea-runner /usr/local/bin/act_runner
|
||||
echo "${RELEASE}" >~/.gitea-runner
|
||||
msg_ok "Updated ${APP} to v${RELEASE}"
|
||||
|
||||
msg_info "Starting Service"
|
||||
$STD rc-service gitea-runner start
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Updated successfully!"
|
||||
}
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
run_os_update
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW}To register the runner, execute the following command in the container console:${CL}"
|
||||
if [[ -n "${var_gitea_url:-}" ]]; then
|
||||
echo -e "${TAB}${BGN}gitea-runner -c /etc/gitea-runner/config.yaml register --instance ${var_gitea_url} --token <REGISTRATION_TOKEN>${CL}"
|
||||
else
|
||||
echo -e "${TAB}${BGN}gitea-runner -c /etc/gitea-runner/config.yaml register --instance <GITEA_INSTANCE_URL> --token <REGISTRATION_TOKEN>${CL}"
|
||||
fi
|
||||
echo -e "${INFO}${YW}After registering, start the runner daemon:${CL}"
|
||||
if [[ "${var_os:-}" == "alpine" ]]; then
|
||||
echo -e "${TAB}${BGN}rc-service gitea-runner start${CL}"
|
||||
else
|
||||
echo -e "${TAB}${BGN}systemctl start gitea-runner${CL}"
|
||||
fi
|
||||
echo -e "${INFO}${YW}Official registration documentation:${CL}"
|
||||
echo -e "${GATEWAY}${BGN}https://docs.gitea.com/runner/registration/${CL}"
|
||||
+6
-6
@@ -31,12 +31,12 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
|
||||
if ! dotnet --list-sdks 2>/dev/null | grep -q '^10\.'; then
|
||||
msg_info "Installing .NET SDK 10.0"
|
||||
if ! dotnet --list-sdks 2>/dev/null | grep -q '^8\.'; then
|
||||
msg_info "Installing .NET SDK 8.0"
|
||||
if [[ "$(arch_resolve)" == "arm64" ]]; then
|
||||
curl -fsSL https://dot.net/v1/dotnet-install.sh -o /tmp/dotnet-install.sh
|
||||
$STD bash /tmp/dotnet-install.sh --channel 10.0 --install-dir /usr/lib/dotnet10
|
||||
ln -sf /usr/lib/dotnet10/dotnet /usr/bin/dotnet
|
||||
$STD bash /tmp/dotnet-install.sh --channel 8.0 --install-dir /usr/lib/dotnet8
|
||||
ln -sf /usr/lib/dotnet8/dotnet /usr/bin/dotnet
|
||||
rm -f /tmp/dotnet-install.sh
|
||||
else
|
||||
setup_deb822_repo \
|
||||
@@ -45,9 +45,9 @@ function update_script() {
|
||||
"https://packages.microsoft.com/debian/13/prod/" \
|
||||
"trixie" \
|
||||
"main"
|
||||
$STD apt install -y dotnet-sdk-10.0
|
||||
$STD apt install -y dotnet-sdk-8.0
|
||||
fi
|
||||
msg_ok "Installed .NET SDK 10.0"
|
||||
msg_ok "Installed .NET SDK 8.0"
|
||||
fi
|
||||
|
||||
if check_for_gh_release "immichframe" "immichFrame/ImmichFrame"; then
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/netalertx/NetAlertX
|
||||
|
||||
APP="NetAlertX"
|
||||
var_tags="${var_tags:-network;monitoring}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-1024}"
|
||||
var_disk="${var_disk:-4}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_arm64="${var_arm64:-yes}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/netalertx ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "netalertx" "netalertx/NetAlertX"; then
|
||||
msg_info "Stopping NetAlertX"
|
||||
systemctl stop netalertx
|
||||
msg_ok "Stopped NetAlertX"
|
||||
|
||||
CLEAN_INSTALL=1 CLEAN_INSTALL_KEEP=".venv" fetch_and_deploy_gh_release "netalertx" "netalertx/NetAlertX" "tarball"
|
||||
|
||||
msg_info "Updating NetAlertX"
|
||||
cd /opt/netalertx
|
||||
$STD uv pip install --python .venv/bin/python -r requirements.txt
|
||||
ln -sfn /opt/netalertx/install/production-filesystem/services /opt/netalertx/services
|
||||
echo "v$(cat ~/.netalertx)" >/opt/netalertx/.VERSION
|
||||
date +%s >/opt/netalertx/front/buildtimestamp.txt
|
||||
msg_ok "Updated NetAlertX"
|
||||
|
||||
msg_info "Starting NetAlertX"
|
||||
systemctl start netalertx
|
||||
msg_ok "Started NetAlertX"
|
||||
msg_ok "Updated successfully!"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW}Access it using the following URL:${CL}"
|
||||
echo -e "${GATEWAY}${BGN}http://${IP}:20211${CL}"
|
||||
echo -e "${INFO}${YW}The login password is in /opt/netalertx_data/.env${CL}"
|
||||
+1
-1
@@ -40,7 +40,7 @@ function update_script() {
|
||||
msg_ok "Allowed OpenCloud to embed Collabora"
|
||||
fi
|
||||
|
||||
RELEASE="v9.1.1"
|
||||
RELEASE="v9.0.0"
|
||||
if check_for_gh_release "OpenCloud" "opencloud-eu/opencloud" "${RELEASE}" "each release is tested individually before the version is updated. Please do not open issues for this"; then
|
||||
OLD_VERSION="$(cat ~/.opencloud 2>/dev/null)"
|
||||
msg_info "Stopping services"
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_
|
||||
APP="Paperclip"
|
||||
var_tags="${var_tags:-ai;automation;dev-tools}"
|
||||
var_cpu="${var_cpu:-4}"
|
||||
var_ram="${var_ram:-10240}"
|
||||
var_ram="${var_ram:-8192}"
|
||||
var_disk="${var_disk:-20}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
|
||||
@@ -31,46 +31,6 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
|
||||
TOOLS_CHANGED=false
|
||||
if check_for_gh_release "rclone" "rclone/rclone"; then
|
||||
TOOLS_CHANGED=true
|
||||
fetch_and_deploy_gh_release "rclone" "rclone/rclone" "binary" "latest" "" "rclone-v*-linux-$(arch_resolve).deb"
|
||||
fi
|
||||
if check_for_gh_release "restic" "restic/restic"; then
|
||||
TOOLS_CHANGED=true
|
||||
fetch_and_deploy_gh_release "restic" "restic/restic" "singlefile" "latest" "/usr/local/bin" "restic_*_linux_$(arch_resolve).bz2"
|
||||
fi
|
||||
if ! grep -q "/storage/restic/" /etc/nginx/sites-available/portabase; then
|
||||
msg_info "Adding file backup routes to Nginx"
|
||||
cat <<'EOF' >/tmp/portabase-storage.conf
|
||||
location /storage/restic/ {
|
||||
proxy_pass http://127.0.0.1:1081;
|
||||
proxy_request_buffering off;
|
||||
proxy_buffering off;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
|
||||
location /storage/sync/ {
|
||||
proxy_pass http://127.0.0.1:1082;
|
||||
proxy_request_buffering off;
|
||||
proxy_buffering off;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
EOF
|
||||
sed -i '/ignore_invalid_headers off;/r /tmp/portabase-storage.conf' /etc/nginx/sites-available/portabase
|
||||
rm -f /tmp/portabase-storage.conf
|
||||
$STD nginx -t
|
||||
systemctl reload nginx
|
||||
msg_ok "Added file backup routes to Nginx"
|
||||
fi
|
||||
if [[ "$TOOLS_CHANGED" == "true" ]]; then
|
||||
systemctl restart portabase
|
||||
fi
|
||||
|
||||
if check_for_gh_release "portabase" "Portabase/portabase"; then
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop portabase portabase-tusd
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MrNRod
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/Viren070/AIOStreams | Docs: https://docs.aiostreams.viren070.me/
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y \
|
||||
build-essential \
|
||||
python3 \
|
||||
ffmpeg
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
fetch_and_deploy_gh_release "aiostreams" "Viren070/AIOStreams" "tarball" "latest" "" "" "v"
|
||||
AIOSTREAMS_TAG="v$(cat ~/.aiostreams)"
|
||||
|
||||
PNPM_VERSION=$(sed -n 's/.*"packageManager": "pnpm@\([^"+]*\).*/\1/p' /opt/aiostreams/package.json)
|
||||
NODE_VERSION="24" NODE_MODULE="pnpm@${PNPM_VERSION:-11.0.8}" setup_nodejs
|
||||
|
||||
msg_info "Configuring Application"
|
||||
mkdir -p /opt/aiostreams_data
|
||||
cp /opt/aiostreams/.env.sample /opt/aiostreams_data/.env
|
||||
SECRET_KEY=$(openssl rand -hex 32)
|
||||
sed -i \
|
||||
-e "s|^BASE_URL=.*|BASE_URL=http://${LOCAL_IP}:3000|" \
|
||||
-e "s|^SECRET_KEY=.*|SECRET_KEY=${SECRET_KEY}|" \
|
||||
-e "s|^# PORT=3000|PORT=3000|" \
|
||||
-e "s|^DATABASE_URI=sqlite://./data/db.sqlite|DATABASE_URI=sqlite:///opt/aiostreams_data/db.sqlite|" \
|
||||
/opt/aiostreams_data/.env
|
||||
msg_ok "Configured Application"
|
||||
|
||||
msg_info "Building AIOStreams (Patience)"
|
||||
cd /opt/aiostreams
|
||||
export NODE_OPTIONS="--max-old-space-size=3072"
|
||||
$STD pnpm install --frozen-lockfile
|
||||
$STD pnpm run build
|
||||
unset NODE_OPTIONS
|
||||
cp -r /opt/aiostreams/packages/server/src/static /opt/aiostreams/packages/server/dist/static
|
||||
msg_ok "Built AIOStreams"
|
||||
|
||||
msg_info "Generating Version Metadata"
|
||||
mkdir -p /opt/aiostreams/resources
|
||||
AIOSTREAMS_VERSION=$(jq -r '.version' /opt/aiostreams/package.json)
|
||||
AIOSTREAMS_DESC=$(jq -r '.description' /opt/aiostreams/package.json)
|
||||
AIOSTREAMS_COMMIT_INFO=$(curl -fsSL "https://api.github.com/repos/Viren070/AIOStreams/commits/${AIOSTREAMS_TAG}" 2>/dev/null || true)
|
||||
AIOSTREAMS_COMMIT=$(jq -r '.sha[0:8] // empty' <<<"${AIOSTREAMS_COMMIT_INFO}")
|
||||
AIOSTREAMS_COMMIT_TIME=$(jq -r '.commit.committer.date // empty' <<<"${AIOSTREAMS_COMMIT_INFO}")
|
||||
cat <<EOF >/opt/aiostreams/resources/metadata.json
|
||||
{
|
||||
"version": "${AIOSTREAMS_VERSION}",
|
||||
"description": $(jq -Rn --arg d "${AIOSTREAMS_DESC}" '$d'),
|
||||
"tag": "${AIOSTREAMS_TAG}",
|
||||
"channel": "stable",
|
||||
"commitHash": "${AIOSTREAMS_COMMIT:-unknown}",
|
||||
"buildTime": "$(date -u +%Y-%m-%dT%H:%M:%S.000Z)",
|
||||
"commitTime": "${AIOSTREAMS_COMMIT_TIME:-$(date -u +%Y-%m-%dT%H:%M:%S.000Z)}"
|
||||
}
|
||||
EOF
|
||||
msg_ok "Generated Version Metadata"
|
||||
|
||||
msg_info "Creating Service"
|
||||
NODE_HEAP_MB=$(($(free -m | awk '/^Mem:/ {print $2}') / 2))
|
||||
cat <<EOF >/etc/systemd/system/aiostreams.service
|
||||
[Unit]
|
||||
Description=AIOStreams
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/aiostreams
|
||||
EnvironmentFile=/opt/aiostreams_data/.env
|
||||
Environment="NODE_ENV=production"
|
||||
Environment="NODE_OPTIONS=--max-old-space-size=${NODE_HEAP_MB} --max-semi-space-size=8 --expose-gc"
|
||||
Environment="MALLOC_ARENA_MAX=2"
|
||||
ExecStart=/usr/bin/node /opt/aiostreams/packages/server/dist/server.js
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now aiostreams
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -13,13 +13,32 @@ setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
msg_info "Installing Dependencies (Patience)"
|
||||
$STD apt install -y \
|
||||
git \
|
||||
build-essential \
|
||||
dumb-init \
|
||||
libjpeg-dev \
|
||||
libatk-bridge2.0-0 \
|
||||
libasound2 \
|
||||
libatk1.0-0 \
|
||||
libcairo2 \
|
||||
libcups2 \
|
||||
libdbus-1-3 \
|
||||
libexpat1 \
|
||||
libgbm-dev \
|
||||
libgbm1 \
|
||||
libgdk-pixbuf-2.0-0 \
|
||||
libglib2.0-0 \
|
||||
libgtk-3-0 \
|
||||
libnspr4 \
|
||||
libnss3 \
|
||||
libpango-1.0-0 \
|
||||
libpangocairo-1.0-0 \
|
||||
qpdf \
|
||||
xdg-utils \
|
||||
xvfb \
|
||||
xauth \
|
||||
python3 \
|
||||
ca-certificates \
|
||||
locales \
|
||||
poppler-utils \
|
||||
file
|
||||
@@ -35,25 +54,35 @@ msg_ok "Generated Locales"
|
||||
|
||||
PYTHON_VERSION="3.13" setup_uv
|
||||
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
msg_info "Installing Change Detection"
|
||||
mkdir -p /opt/changedetection
|
||||
$STD uv venv --clear /opt/changedetection/.venv
|
||||
$STD uv pip install --python /opt/changedetection/.venv/bin/python changedetection.io playwright
|
||||
$STD /opt/changedetection/.venv/bin/python -m ensurepip --upgrade
|
||||
$STD /opt/changedetection/.venv/bin/python -m pip install --upgrade pip
|
||||
$STD /opt/changedetection/.venv/bin/python -m pip install changedetection.io
|
||||
cat <<EOF >/opt/changedetection/.env
|
||||
PLAYWRIGHT_DRIVER_URL=ws://127.0.0.1:3000/?headful=true&--window-size=1920,1080
|
||||
WEBDRIVER_URL=http://127.0.0.1:4444/wd/hub
|
||||
PLAYWRIGHT_DRIVER_URL=ws://localhost:3000/chrome?launch=eyJkZWZhdWx0Vmlld3BvcnQiOnsiaGVpZ2h0Ijo3MjAsIndpZHRoIjoxMjgwfSwiaGVhZGxlc3MiOmZhbHNlLCJzdGVhbHRoIjp0cnVlfQ==&blockAds=true
|
||||
LC_ALL=en_US.UTF-8
|
||||
EOF
|
||||
msg_ok "Installed Change Detection"
|
||||
|
||||
msg_info "Installing Chrome"
|
||||
setup_deb822_repo \
|
||||
"google-chrome" \
|
||||
"https://dl.google.com/linux/linux_signing_key.pub" \
|
||||
"https://dl.google.com/linux/chrome/deb/" \
|
||||
"stable"
|
||||
$STD apt install -y google-chrome-stable
|
||||
rm -f /etc/apt/sources.list.d/google-chrome.list
|
||||
msg_ok "Installed Chrome"
|
||||
msg_info "Installing Browserless & Playwright"
|
||||
mkdir /opt/browserless
|
||||
$STD /opt/changedetection/.venv/bin/python -m pip install playwright
|
||||
$STD git clone https://github.com/browserless/chrome /opt/browserless
|
||||
$STD npm ci --include=optional --include=dev --prefix /opt/browserless
|
||||
$STD npm install --save-exact playwright-core@1.62.1 --prefix /opt/browserless
|
||||
$STD /opt/browserless/node_modules/playwright-core/cli.js install --with-deps &>/dev/null
|
||||
$STD /opt/browserless/node_modules/playwright-core/cli.js install --force chrome &>/dev/null
|
||||
$STD /opt/browserless/node_modules/playwright-core/cli.js install chromium firefox webkit &>/dev/null
|
||||
$STD /opt/browserless/node_modules/playwright-core/cli.js install --force msedge
|
||||
$STD npm run build --prefix /opt/browserless
|
||||
$STD npm run build:function --prefix /opt/browserless
|
||||
$STD npm prune production --prefix /opt/browserless
|
||||
msg_ok "Installed Browserless & Playwright"
|
||||
|
||||
msg_info "Installing Font Packages"
|
||||
$STD apt install -y \
|
||||
@@ -70,38 +99,30 @@ $STD apt install -y \
|
||||
fonts-wqy-zenhei
|
||||
msg_ok "Installed Font Packages"
|
||||
|
||||
fetch_and_deploy_gh_release "sockpuppetbrowser" "dgtlmoon/sockpuppetbrowser" "tarball"
|
||||
|
||||
msg_info "Setting up SockPuppetBrowser"
|
||||
useradd -r -m -s /usr/sbin/nologin chrome
|
||||
$STD uv venv --clear --python /usr/bin/python3 /opt/sockpuppetbrowser/.venv
|
||||
$STD uv pip install --python /opt/sockpuppetbrowser/.venv/bin/python -r /opt/sockpuppetbrowser/requirements.txt
|
||||
msg_ok "Set up SockPuppetBrowser"
|
||||
msg_info "Installing X11 Packages"
|
||||
$STD apt install -y \
|
||||
libx11-6 \
|
||||
libx11-xcb1 \
|
||||
libxcb1 \
|
||||
libxcomposite1 \
|
||||
libxcursor1 \
|
||||
libxdamage1 \
|
||||
libxext6 \
|
||||
libxfixes3 \
|
||||
libxi6 \
|
||||
libxrandr2 \
|
||||
libxrender1 \
|
||||
libxss1 \
|
||||
libxtst6
|
||||
msg_ok "Installed X11 Packages"
|
||||
|
||||
msg_info "Creating Services"
|
||||
cat <<EOF >/etc/systemd/system/sockpuppetbrowser.service
|
||||
[Unit]
|
||||
Description=SockPuppetBrowser
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=chrome
|
||||
Group=chrome
|
||||
WorkingDirectory=/opt/sockpuppetbrowser/backend
|
||||
Environment=CHROME_BIN=/usr/bin/google-chrome-stable
|
||||
Environment=LOG_LEVEL=INFO
|
||||
ExecStart=/opt/sockpuppetbrowser/.venv/bin/python server.py --host 127.0.0.1 --port 3000 --sport 8080
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
cat <<EOF >/etc/systemd/system/changedetection.service
|
||||
[Unit]
|
||||
Description=Change Detection
|
||||
After=network-online.target sockpuppetbrowser.service
|
||||
Wants=sockpuppetbrowser.service
|
||||
After=network-online.target
|
||||
After=network.target browserless.service
|
||||
Wants=browserless.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
@@ -112,7 +133,23 @@ ExecStart=/opt/changedetection/.venv/bin/changedetection.io -d /opt/changedetect
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now sockpuppetbrowser changedetection
|
||||
|
||||
cat <<EOF >/etc/systemd/system/browserless.service
|
||||
[Unit]
|
||||
Description=browserless service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Environment=CONNECTION_TIMEOUT=60000
|
||||
WorkingDirectory=/opt/browserless
|
||||
ExecStart=/opt/browserless/scripts/start.sh
|
||||
SyslogIdentifier=browserless
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
EOF
|
||||
systemctl enable -q --now browserless
|
||||
systemctl enable -q --now changedetection
|
||||
msg_ok "Created Services"
|
||||
|
||||
motd_ssh
|
||||
|
||||
@@ -159,7 +159,7 @@ server {
|
||||
location ~ ^/(assets|packs)/ {
|
||||
expires max;
|
||||
add_header Cache-Control "public, immutable";
|
||||
try_files \$uri @rails;
|
||||
try_files \$uri =404;
|
||||
}
|
||||
|
||||
location / {
|
||||
|
||||
@@ -201,7 +201,7 @@ msg_ok "Installed OpenVino"
|
||||
|
||||
msg_info "Building OpenVino Model"
|
||||
cd /models
|
||||
curl_download "ssdlite_mobilenet_v2_coco_2018_05_09.tar.gz" "https://storage.googleapis.com/download.tensorflow.org/models/object_detection/ssdlite_mobilenet_v2_coco_2018_05_09.tar.gz"
|
||||
curl_download "ssdlite_mobilenet_v2_coco_2018_05_09.tar.gz" "http://download.tensorflow.org/models/object_detection/ssdlite_mobilenet_v2_coco_2018_05_09.tar.gz"
|
||||
$STD tar -zxf ssdlite_mobilenet_v2_coco_2018_05_09.tar.gz --no-same-owner
|
||||
if python3 /opt/frigate/docker/main/build_ov_model.py &>/dev/null; then
|
||||
mkdir -p /openvino-model
|
||||
|
||||
@@ -1,129 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: community-scripts
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://gitea.com/gitea/runner
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
setup_deb_based() {
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y git
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
setup_docker
|
||||
|
||||
msg_info "Installing Gitea Runner"
|
||||
RELEASE=$(curl -fsSL https://gitea.com/api/v1/repos/gitea/runner/releases/latest | jq -r .tag_name | sed 's/^v//')
|
||||
$STD curl -fsSL -o /usr/local/bin/gitea-runner "https://gitea.com/gitea/runner/releases/download/v${RELEASE}/gitea-runner-${RELEASE}-linux-$(arch_resolve)"
|
||||
chmod +x /usr/local/bin/gitea-runner
|
||||
ln -sf /usr/local/bin/gitea-runner /usr/local/bin/act_runner
|
||||
echo "${RELEASE}" >~/.gitea-runner
|
||||
msg_ok "Installed Gitea Runner v${RELEASE}"
|
||||
|
||||
msg_info "Configuring Gitea Runner"
|
||||
mkdir -p /etc/gitea-runner /var/lib/gitea-runner
|
||||
/usr/local/bin/gitea-runner config generate >/etc/gitea-runner/config.yaml
|
||||
sed -i 's|.*file:.*\.runner.*| file: /var/lib/gitea-runner/.runner|' /etc/gitea-runner/config.yaml
|
||||
msg_ok "Configured Gitea Runner"
|
||||
|
||||
if [[ -n "${var_gitea_url:-}" ]] && [[ -n "${var_gitea_token:-}" ]]; then
|
||||
msg_info "Registering Gitea Runner"
|
||||
$STD /usr/local/bin/gitea-runner register --no-interactive --config /etc/gitea-runner/config.yaml --instance "${var_gitea_url}" --token "${var_gitea_token}" --name "$(hostname)"
|
||||
msg_ok "Registered Gitea Runner"
|
||||
fi
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/gitea-runner.service
|
||||
[Unit]
|
||||
Description=Gitea Actions Runner
|
||||
Documentation=https://docs.gitea.com/runner/
|
||||
After=network-online.target docker.service
|
||||
Wants=network-online.target docker.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/local/bin/gitea-runner daemon --config /etc/gitea-runner/config.yaml
|
||||
WorkingDirectory=/var/lib/gitea-runner
|
||||
Environment=HOME=/var/lib/gitea-runner
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
TimeoutStopSec=3h
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q gitea-runner
|
||||
if [[ -s /var/lib/gitea-runner/.runner ]]; then
|
||||
systemctl start gitea-runner
|
||||
fi
|
||||
msg_ok "Created Service"
|
||||
}
|
||||
|
||||
setup_alpine() {
|
||||
msg_info "Installing Docker"
|
||||
$STD apk add --no-cache docker docker-cli-compose git
|
||||
$STD rc-update add docker default
|
||||
$STD rc-service docker start
|
||||
msg_ok "Installed Docker"
|
||||
|
||||
msg_info "Installing Gitea Runner"
|
||||
RELEASE=$(curl -fsSL https://gitea.com/api/v1/repos/gitea/runner/releases/latest | jq -r .tag_name | sed 's/^v//')
|
||||
$STD curl -fsSL -o /usr/local/bin/gitea-runner "https://gitea.com/gitea/runner/releases/download/v${RELEASE}/gitea-runner-${RELEASE}-linux-$(arch_resolve)"
|
||||
chmod +x /usr/local/bin/gitea-runner
|
||||
ln -sf /usr/local/bin/gitea-runner /usr/local/bin/act_runner
|
||||
echo "${RELEASE}" >~/.gitea-runner
|
||||
msg_ok "Installed Gitea Runner v${RELEASE}"
|
||||
|
||||
msg_info "Configuring Gitea Runner"
|
||||
mkdir -p /etc/gitea-runner /var/lib/gitea-runner
|
||||
/usr/local/bin/gitea-runner config generate >/etc/gitea-runner/config.yaml
|
||||
sed -i 's|.*file:.*\.runner.*| file: /var/lib/gitea-runner/.runner|' /etc/gitea-runner/config.yaml
|
||||
msg_ok "Configured Gitea Runner"
|
||||
|
||||
if [[ -n "${var_gitea_url:-}" ]] && [[ -n "${var_gitea_token:-}" ]]; then
|
||||
msg_info "Registering Gitea Runner"
|
||||
$STD /usr/local/bin/gitea-runner register --no-interactive --config /etc/gitea-runner/config.yaml --instance "${var_gitea_url}" --token "${var_gitea_token}" --name "$(hostname)"
|
||||
msg_ok "Registered Gitea Runner"
|
||||
fi
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<'EOF' >/etc/init.d/gitea-runner
|
||||
#!/sbin/openrc-run
|
||||
name="gitea-runner"
|
||||
description="Gitea Actions Runner"
|
||||
|
||||
export HOME="/var/lib/gitea-runner"
|
||||
command="/usr/local/bin/gitea-runner"
|
||||
command_args="daemon --config /etc/gitea-runner/config.yaml"
|
||||
directory="/var/lib/gitea-runner"
|
||||
command_background="yes"
|
||||
pidfile="/run/gitea-runner.pid"
|
||||
output_log="/var/log/gitea-runner.log"
|
||||
error_log="/var/log/gitea-runner.log"
|
||||
|
||||
depend() {
|
||||
need net docker
|
||||
after firewall
|
||||
}
|
||||
EOF
|
||||
chmod +x /etc/init.d/gitea-runner
|
||||
$STD rc-update add gitea-runner default
|
||||
if [[ -s /var/lib/gitea-runner/.runner ]]; then
|
||||
$STD rc-service gitea-runner start
|
||||
fi
|
||||
msg_ok "Created Service"
|
||||
}
|
||||
|
||||
run_os_setup
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -17,8 +17,8 @@ msg_info "Installing Dependencies"
|
||||
if [[ "$(arch_resolve)" == "arm64" ]]; then
|
||||
$STD apt install -y libicu-dev libssl-dev gettext-base
|
||||
curl -fsSL https://dot.net/v1/dotnet-install.sh -o /tmp/dotnet-install.sh
|
||||
$STD bash /tmp/dotnet-install.sh --channel 10.0 --install-dir /usr/lib/dotnet10
|
||||
ln -sf /usr/lib/dotnet10/dotnet /usr/bin/dotnet
|
||||
$STD bash /tmp/dotnet-install.sh --channel 8.0 --install-dir /usr/lib/dotnet8
|
||||
ln -sf /usr/lib/dotnet8/dotnet /usr/bin/dotnet
|
||||
rm -f /tmp/dotnet-install.sh
|
||||
else
|
||||
setup_deb822_repo \
|
||||
@@ -31,8 +31,8 @@ else
|
||||
libicu-dev \
|
||||
libssl-dev \
|
||||
gettext-base \
|
||||
dotnet-sdk-10.0 \
|
||||
aspnetcore-runtime-10.0
|
||||
dotnet-sdk-8.0 \
|
||||
aspnetcore-runtime-8.0
|
||||
fi
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ MARIADB_DB_NAME="itsmng_db" MARIADB_DB_USER="itsmng" MARIADB_DB_EXTRA_GRANTS="GR
|
||||
msg_info "Installing ITSM-NG"
|
||||
setup_deb822_repo \
|
||||
"itsm-ng" \
|
||||
"https://deb.itsm-ng.org/pubkey.gpg" \
|
||||
"https://deb.itsm-ng.org/$(get_os_info id)/" \
|
||||
"http://deb.itsm-ng.org/pubkey.gpg" \
|
||||
"http://deb.itsm-ng.org/$(get_os_info id)/" \
|
||||
"$(get_os_info codename)"
|
||||
$STD apt install -y itsm-ng
|
||||
cd /usr/share/itsm-ng
|
||||
|
||||
@@ -1,183 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/netalertx/NetAlertX
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y \
|
||||
nginx \
|
||||
sqlite3 \
|
||||
arp-scan \
|
||||
nmap \
|
||||
fping \
|
||||
nbtscan \
|
||||
traceroute \
|
||||
mtr-tiny \
|
||||
iw \
|
||||
snmp \
|
||||
dnsutils \
|
||||
net-tools \
|
||||
avahi-utils \
|
||||
libwww-perl \
|
||||
usbutils \
|
||||
psmisc \
|
||||
wget \
|
||||
zip \
|
||||
cron
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="curl,sqlite3" setup_php
|
||||
export UV_PYTHON_INSTALL_DIR="/opt/uv-python"
|
||||
PYTHON_VERSION="3.13" setup_uv
|
||||
fetch_and_deploy_gh_release "netalertx" "netalertx/NetAlertX" "tarball"
|
||||
|
||||
msg_info "Setting up NetAlertX"
|
||||
cd /opt/netalertx
|
||||
$STD uv venv --python 3.13 .venv
|
||||
$STD uv pip install --python .venv/bin/python -r requirements.txt
|
||||
ln -sfn /opt/netalertx/install/production-filesystem/services /opt/netalertx/services
|
||||
ln -sfn /opt/netalertx /app
|
||||
echo "v$(cat ~/.netalertx)" >/opt/netalertx/.VERSION
|
||||
date +%s >/opt/netalertx/front/buildtimestamp.txt
|
||||
mkdir -p /opt/netalertx_data/{config,db,log/plugins,api,tmp}
|
||||
touch /opt/netalertx_data/log/{app.log,execution_queue.log,app_front.log,app.php_errors.log,stderr.log,db_is_locked.log}
|
||||
install -m 600 /opt/netalertx/back/app.conf /opt/netalertx_data/config/app.conf
|
||||
cp /opt/netalertx/back/app.db /opt/netalertx_data/db/app.db
|
||||
NETALERTX_PASSWORD=$(random_password)
|
||||
sed -i "s|^TIMEZONE=.*|TIMEZONE='$(timedatectl show -p Timezone --value 2>/dev/null || echo Etc/UTC)'|" /opt/netalertx_data/config/app.conf
|
||||
cat <<EOF >>/opt/netalertx_data/config/app.conf
|
||||
ARPSCAN_ARGS='arp-scan --ignoredups --retry=6'
|
||||
NMAPDEV_ARGS='nmap --privileged -sn -PR -oX - '
|
||||
SETPWD_enable_password=True
|
||||
SETPWD_password='$(echo -n "$NETALERTX_PASSWORD" | sha256sum | awk '{print $1}')'
|
||||
EOF
|
||||
cat <<EOF >/opt/netalertx_data/.env
|
||||
NETALERTX_PASSWORD=${NETALERTX_PASSWORD}
|
||||
NETALERTX_APP=/opt/netalertx
|
||||
NETALERTX_DATA=/opt/netalertx_data
|
||||
NETALERTX_CONFIG=/opt/netalertx_data/config
|
||||
NETALERTX_DB=/opt/netalertx_data/db
|
||||
NETALERTX_API=/opt/netalertx_data/api
|
||||
NETALERTX_LOG=/opt/netalertx_data/log
|
||||
NETALERTX_TMP=/opt/netalertx_data/tmp
|
||||
SYSTEM_SERVICES_RUN_TMP=/opt/netalertx_data/tmp
|
||||
VENDORSPATH_NEWEST=/opt/netalertx_data/tmp/ieee-oui.txt
|
||||
LOG_EXECUTION_QUEUE=/opt/netalertx_data/log/execution_queue.log
|
||||
PYTHONPATH=/opt/netalertx:/opt/netalertx/server:/opt/netalertx/server/plugins
|
||||
PATH=/opt/netalertx/.venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
PYTHONUNBUFFERED=1
|
||||
NMAP_PRIVILEGED=1
|
||||
EOF
|
||||
chmod 600 /opt/netalertx_data/.env
|
||||
chown -R www-data:www-data /opt/netalertx_data
|
||||
msg_ok "Set up NetAlertX"
|
||||
|
||||
msg_info "Configuring PHP-FPM and Nginx"
|
||||
cat <<EOF >/etc/php/8.4/fpm/pool.d/netalertx.conf
|
||||
[netalertx]
|
||||
user = www-data
|
||||
group = www-data
|
||||
listen = /run/php/netalertx.sock
|
||||
listen.owner = www-data
|
||||
listen.group = www-data
|
||||
pm = dynamic
|
||||
pm.max_children = 10
|
||||
pm.start_servers = 2
|
||||
pm.min_spare_servers = 1
|
||||
pm.max_spare_servers = 3
|
||||
env[NETALERTX_CONFIG] = /opt/netalertx_data/config
|
||||
env[NETALERTX_DB] = /opt/netalertx_data/db
|
||||
env[NETALERTX_API] = /opt/netalertx_data/api
|
||||
env[NETALERTX_LOG] = /opt/netalertx_data/log
|
||||
php_admin_value[memory_limit] = 256M
|
||||
EOF
|
||||
systemctl restart php8.4-fpm
|
||||
cat <<'EOF' >/etc/nginx/sites-available/netalertx
|
||||
map "$http_referer|$http_host" $sec_legacy {
|
||||
"~^https?://(?<ref_host>[^/:]+)(?::\d+)?/.*\|\k<ref_host>(?::\d+)?$" "TRUSTED";
|
||||
default "UNTRUSTED";
|
||||
}
|
||||
map $http_sec_fetch_site $is_trusted {
|
||||
"same-origin" "TRUSTED";
|
||||
"" $sec_legacy;
|
||||
default "UNTRUSTED";
|
||||
}
|
||||
server {
|
||||
listen 20211 default_server;
|
||||
large_client_header_buffers 4 16k;
|
||||
root /opt/netalertx/front;
|
||||
index index.php;
|
||||
add_header X-Forwarded-Prefix "/app" always;
|
||||
|
||||
location /server/ {
|
||||
error_page 403 /403_internal.html;
|
||||
if ($is_trusted != "TRUSTED") {
|
||||
return 403;
|
||||
}
|
||||
rewrite ^/server/(.*)$ /$1 break;
|
||||
proxy_pass http://127.0.0.1:20212;
|
||||
proxy_buffering off;
|
||||
proxy_cache off;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection "";
|
||||
client_max_body_size 50m;
|
||||
proxy_read_timeout 3600s;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
location ~* \.php$ {
|
||||
add_header Cache-Control "no-store";
|
||||
fastcgi_pass unix:/run/php/netalertx.sock;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
||||
fastcgi_read_timeout 600;
|
||||
}
|
||||
}
|
||||
EOF
|
||||
nginx_enable_site "netalertx"
|
||||
msg_ok "Configured PHP-FPM and Nginx"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/netalertx.service
|
||||
[Unit]
|
||||
Description=NetAlertX Backend
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=www-data
|
||||
Group=www-data
|
||||
WorkingDirectory=/opt/netalertx
|
||||
EnvironmentFile=/opt/netalertx_data/.env
|
||||
AmbientCapabilities=CAP_NET_RAW CAP_NET_ADMIN CAP_NET_BIND_SERVICE
|
||||
ExecStart=/opt/netalertx/.venv/bin/python3 -m server
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
cat <<EOF >/etc/cron.d/netalertx
|
||||
* * * * * www-data LOG_EXECUTION_QUEUE=/opt/netalertx_data/log/execution_queue.log /opt/netalertx/services/scripts/cron_script.sh >/dev/null 2>&1
|
||||
EOF
|
||||
systemctl enable -q --now netalertx
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -70,7 +70,7 @@ $STD sudo -u cool coolconfig set-admin-password --user=admin --password="$COOLPA
|
||||
echo "$COOLPASS" >~/.coolpass
|
||||
msg_ok "Installed Collabora Online"
|
||||
|
||||
fetch_and_deploy_gh_release "OpenCloud" "opencloud-eu/opencloud" "singlefile" "v9.1.1" "/usr/bin" "opencloud-*-linux-$(arch_resolve)"
|
||||
fetch_and_deploy_gh_release "OpenCloud" "opencloud-eu/opencloud" "singlefile" "v9.0.0" "/usr/bin" "opencloud-*-linux-$(arch_resolve)"
|
||||
mv /usr/bin/OpenCloud /usr/bin/opencloud
|
||||
|
||||
msg_info "Configuring OpenCloud"
|
||||
|
||||
@@ -26,8 +26,6 @@ PG_DB_NAME="portabase" PG_DB_USER="portabase" setup_postgresql_db
|
||||
|
||||
fetch_and_deploy_gh_release "portabase" "Portabase/portabase" "tarball"
|
||||
fetch_and_deploy_gh_release "tusd" "tus/tusd" "prebuild" "latest" "/opt/tusd" "tusd_linux_$(arch_resolve).tar.gz"
|
||||
fetch_and_deploy_gh_release "rclone" "rclone/rclone" "binary" "latest" "" "rclone-v*-linux-$(arch_resolve).deb"
|
||||
fetch_and_deploy_gh_release "restic" "restic/restic" "singlefile" "latest" "/usr/local/bin" "restic_*_linux_$(arch_resolve).bz2"
|
||||
|
||||
msg_info "Configuring Portabase"
|
||||
mkdir -p /opt/portabase-data/uploads/tmp
|
||||
@@ -143,24 +141,6 @@ server {
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
|
||||
location /storage/restic/ {
|
||||
proxy_pass http://127.0.0.1:1081;
|
||||
proxy_request_buffering off;
|
||||
proxy_buffering off;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
|
||||
location /storage/sync/ {
|
||||
proxy_pass http://127.0.0.1:1082;
|
||||
proxy_request_buffering off;
|
||||
proxy_buffering off;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
|
||||
location = /api/tus/hooks {
|
||||
deny all;
|
||||
return 404;
|
||||
|
||||
@@ -130,12 +130,6 @@ function install() {
|
||||
msg_info "Starting ${APP}"
|
||||
cd "$INSTALL_PATH"
|
||||
$STD docker compose up -d
|
||||
local ADMIN_PASS=""
|
||||
for _ in {1..30}; do
|
||||
ADMIN_PASS=$(docker cp arcane:/app/data/initial-admin-password - 2>/dev/null | tar -xO 2>/dev/null || true)
|
||||
[[ -n "$ADMIN_PASS" ]] && break
|
||||
sleep 1
|
||||
done
|
||||
msg_ok "Started ${APP}"
|
||||
|
||||
# Create update script
|
||||
@@ -154,7 +148,7 @@ UPDATEEOF
|
||||
echo -e "Arcane Credentials"
|
||||
echo -e "=================="
|
||||
echo -e "User: arcane"
|
||||
echo -e "Password: ${ADMIN_PASS:-run 'docker cp arcane:/app/data/initial-admin-password - | tar -xO'}"
|
||||
echo -e "Password: arcane-admin"
|
||||
echo ""
|
||||
msg_warn "On first access, you'll be prompted to change your password."
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user