mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-11-21 16:29:27 +01:00
Compare commits
88
Commits
No files matched your search
Generated
+36
@@ -203,6 +203,42 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"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
+5
-4
@@ -324,13 +324,14 @@ 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}" --json number --jq '.[].number')
|
||||
PR_EXISTS=$(gh pr list --head "${BRANCH_NAME}" --state open --json number,isCrossRepository --jq '[.[] | select(.isCrossRepository == false)][0].number // empty')
|
||||
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" \
|
||||
@@ -346,8 +347,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}" --json number --jq '.[].number')
|
||||
PR_NUMBER=$(gh pr list --head "${BRANCH_NAME}" --state open --json number,isCrossRepository --jq '[.[] | select(.isCrossRepository == false)][0].number // empty')
|
||||
if [ -n "$PR_NUMBER" ]; then
|
||||
gh pr review $PR_NUMBER --approve
|
||||
gh pr merge $PR_NUMBER --squash --admin
|
||||
gh pr review "$PR_NUMBER" --approve
|
||||
gh pr merge "$PR_NUMBER" --squash --admin --match-head-commit "$HEAD_SHA"
|
||||
fi
|
||||
Generated
+118
-67
@@ -118,9 +118,63 @@ 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());
|
||||
if (pr.user.login.includes("push-app-to-main[bot]")) {
|
||||
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]")) {
|
||||
|
||||
const scriptName = pr.title;
|
||||
try {
|
||||
@@ -128,11 +182,12 @@ jobs:
|
||||
owner: context.repo.owner,
|
||||
repo: "DevScripts",
|
||||
state: "all",
|
||||
labels: ["Started Migration To ProxmoxVE"]
|
||||
labels: ["Started Migration To ProxmoxVE"],
|
||||
per_page: 100,
|
||||
});
|
||||
|
||||
const matchingIssue = relatedIssues.find(issue =>
|
||||
issue.title.toLowerCase().includes(scriptName.toLowerCase())
|
||||
issue.title.trim().toLowerCase() === scriptName.trim().toLowerCase()
|
||||
);
|
||||
|
||||
if (matchingIssue) {
|
||||
@@ -212,75 +267,70 @@ jobs:
|
||||
|
||||
}
|
||||
|
||||
// ── 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,
|
||||
});
|
||||
// ── 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"];
|
||||
|
||||
const coreCategory = categorizedPRs.find(category =>
|
||||
category.title.includes("Core") || category.labels.includes("core"));
|
||||
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,
|
||||
});
|
||||
|
||||
// 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"];
|
||||
const category = categorizedPRs.find(c => c.title === categoryTitle);
|
||||
|
||||
for (const pr of corePulls) {
|
||||
if (!pr.merged_at) continue;
|
||||
if (new Date(pr.merged_at) <= latestDateInChangelog) continue;
|
||||
for (const pr of externalPulls) {
|
||||
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 (!coreCategory) {
|
||||
console.log(`No Core category configured; skipping core#${pr.number}`);
|
||||
continue;
|
||||
}
|
||||
if (!category) {
|
||||
console.log(`No ${categoryTitle} category configured; skipping ${prefix}#${pr.number}`);
|
||||
continue;
|
||||
}
|
||||
|
||||
// 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}))`;
|
||||
// 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}))`;
|
||||
|
||||
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;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!placed) category.notes.push(note);
|
||||
}
|
||||
if (!placed) coreCategory.notes.push(coreNote);
|
||||
} catch (error) {
|
||||
console.error(`Could not read ${repo} pull requests: ${error}`);
|
||||
}
|
||||
} 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;
|
||||
@@ -349,13 +399,14 @@ 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}" --json number --jq '.[].number')
|
||||
PR_EXISTS=$(gh pr list --head "${BRANCH_NAME}" --state open --json number,isCrossRepository --jq '[.[] | select(.isCrossRepository == false)][0].number // empty')
|
||||
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." \
|
||||
@@ -369,9 +420,9 @@ jobs:
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
PR_NUMBER=$(gh pr list --head "${BRANCH_NAME}" --json number --jq '.[].number')
|
||||
PR_NUMBER=$(gh pr list --head "${BRANCH_NAME}" --state open --json number,isCrossRepository --jq '[.[] | select(.isCrossRepository == false)][0].number // empty')
|
||||
if [ -n "$PR_NUMBER" ]; then
|
||||
gh pr review $PR_NUMBER --approve
|
||||
gh pr review "$PR_NUMBER" --approve
|
||||
fi
|
||||
|
||||
- name: Approve pull request and merge
|
||||
@@ -381,8 +432,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}" --json number --jq '.[].number')
|
||||
PR_NUMBER=$(gh pr list --head "${BRANCH_NAME}" --state open --json number,isCrossRepository --jq '[.[] | select(.isCrossRepository == false)][0].number // empty')
|
||||
if [ -n "$PR_NUMBER" ]; then
|
||||
gh pr review $PR_NUMBER --approve
|
||||
gh pr merge $PR_NUMBER --squash --admin
|
||||
gh pr review "$PR_NUMBER" --approve
|
||||
gh pr merge "$PR_NUMBER" --squash --admin --match-head-commit "$HEAD_SHA"
|
||||
fi
|
||||
Generated
+25
-3
@@ -19,6 +19,7 @@ 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"
|
||||
@@ -26,8 +27,24 @@ 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
|
||||
|
||||
# Truncate the extracted section to 5000 characters
|
||||
head -c 5000 changelog_tmp_full.md > changelog_tmp.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
|
||||
|
||||
echo "=== Extracted Changelog ==="
|
||||
cat changelog_tmp.md
|
||||
@@ -36,12 +53,17 @@ jobs:
|
||||
# Abort if no content was found
|
||||
if [ ! -s changelog_tmp.md ]; then
|
||||
echo "No changes found for $YESTERDAY, skipping release."
|
||||
exit 0
|
||||
echo "skip=true" >> "$GITHUB_OUTPUT"
|
||||
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
|
||||
+143
@@ -584,6 +584,149 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
</details>
|
||||
|
||||
## 2026-11-20
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- Grimmory [@MickLesk](https://github.com/MickLesk) ([#18880](https://github.com/community-scripts/ProxmoxVE/pull/18880))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Remove thumbnails as opencloud user [@jheyens](https://github.com/jheyens) ([#18865](https://github.com/community-scripts/ProxmoxVE/pull/18865))
|
||||
- NPMplus: hand Docker the usable DNS servers when resolv.conf has a zone ID [@MickLesk](https://github.com/MickLesk) ([#18860](https://github.com/community-scripts/ProxmoxVE/pull/18860))
|
||||
- Nginx Proxy Manager: fetch the nginx HTTP/2 patches from the GitHub API [@MickLesk](https://github.com/MickLesk) ([#18855](https://github.com/community-scripts/ProxmoxVE/pull/18855))
|
||||
- deCONZ: fetch libssl1.1 over HTTPS on arm64 [@MickLesk](https://github.com/MickLesk) ([#18798](https://github.com/community-scripts/ProxmoxVE/pull/18798))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- Stalwart: migrate to v1 with stalwart-migrate [@MickLesk](https://github.com/MickLesk) ([#18794](https://github.com/community-scripts/ProxmoxVE/pull/18794))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- Kasm: show the installer's last lines when it fails [@MickLesk](https://github.com/MickLesk) ([#18869](https://github.com/community-scripts/ProxmoxVE/pull/18869))
|
||||
- Immich: skip oazapfts in mise install, the build never runs it [@MickLesk](https://github.com/MickLesk) ([#18859](https://github.com/community-scripts/ProxmoxVE/pull/18859))
|
||||
- QoL - Postgres: keep installing when the Adminer prompt reads a closed console [@MickLesk](https://github.com/MickLesk) ([#18857](https://github.com/community-scripts/ProxmoxVE/pull/18857))
|
||||
- Plane: install the API from uv.lock, v1.5.0 dropped the requirements files [@MickLesk](https://github.com/MickLesk) ([#18856](https://github.com/community-scripts/ProxmoxVE/pull/18856))
|
||||
- Pi.Alert: install the crontab after the first scans [@MickLesk](https://github.com/MickLesk) ([#18858](https://github.com/community-scripts/ProxmoxVE/pull/18858))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- core: Keep the root filesystem lookup a soft failure [@MickLesk](https://github.com/MickLesk) ([core#280](https://github.com/community-scripts/core/pull/280))
|
||||
- fix: vm - name why an image step failed and open one message for the disk import [@MickLesk](https://github.com/MickLesk) ([core#279](https://github.com/community-scripts/core/pull/279))
|
||||
|
||||
### 🧰 Tools
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Install the Scrutiny collector on TrueNAS SCALE without apt [@MickLesk](https://github.com/MickLesk) ([#18870](https://github.com/community-scripts/ProxmoxVE/pull/18870))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- Refactor: Tailscale Script [@MickLesk](https://github.com/MickLesk) ([#18868](https://github.com/community-scripts/ProxmoxVE/pull/18868))
|
||||
- Report an interrupted update-apps backup as cancelled, not failed [@MickLesk](https://github.com/MickLesk) ([#18867](https://github.com/community-scripts/ProxmoxVE/pull/18867))
|
||||
- FSTrim: skip a container that will not start instead of ending fstrim [@MickLesk](https://github.com/MickLesk) ([#18864](https://github.com/community-scripts/ProxmoxVE/pull/18864))
|
||||
- Say which containers update-lxcs failed on and why [@MickLesk](https://github.com/MickLesk) ([#18863](https://github.com/community-scripts/ProxmoxVE/pull/18863))
|
||||
- clean-lxc: say which containers clean-lxcs failed on and why [@MickLesk](https://github.com/MickLesk) ([#18862](https://github.com/community-scripts/ProxmoxVE/pull/18862))
|
||||
- LXC-Executer: run the execute command once per container and keep going on failure [@MickLesk](https://github.com/MickLesk) ([#18861](https://github.com/community-scripts/ProxmoxVE/pull/18861))
|
||||
|
||||
## 2026-11-19
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- T3 Code [@lukdz](https://github.com/lukdz) ([#18845](https://github.com/community-scripts/ProxmoxVE/pull/18845))
|
||||
- Faraday [@MickLesk](https://github.com/MickLesk) ([#18844](https://github.com/community-scripts/ProxmoxVE/pull/18844))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- fix(t3code): wait for server readiness before pairing [@ps915](https://github.com/ps915) ([#18849](https://github.com/community-scripts/ProxmoxVE/pull/18849))
|
||||
- Frigate: bump to v0.18.3 [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#18841](https://github.com/community-scripts/ProxmoxVE/pull/18841))
|
||||
- Nginx Proxy Manager: patch nginx HTTP/2 CVE-2026-123007 / CVE-2026-123633 [@valentingoulier](https://github.com/valentingoulier) ([#18835](https://github.com/community-scripts/ProxmoxVE/pull/18835))
|
||||
|
||||
### 🛰️ Services
|
||||
|
||||
- Take the API reference out of the menu and cut it down [@MickLesk](https://github.com/MickLesk) ([services#21](https://github.com/community-scripts/services/pull/21))
|
||||
- Add an API reference page and offer 3 days instead of a year [@MickLesk](https://github.com/MickLesk) ([services#20](https://github.com/community-scripts/services/pull/20))
|
||||
|
||||
## 2026-11-18
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- Factorio [@LindholmLabs](https://github.com/LindholmLabs) ([#18830](https://github.com/community-scripts/ProxmoxVE/pull/18830))
|
||||
- Scrutiny [@MickLesk](https://github.com/MickLesk) ([#18827](https://github.com/community-scripts/ProxmoxVE/pull/18827))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- WireGuard: increase Alpine disk size to 2 GB [@degeens](https://github.com/degeens) ([#18831](https://github.com/community-scripts/ProxmoxVE/pull/18831))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- OpenCloud: bump to v9.2.0 [@SimKaiLong](https://github.com/SimKaiLong) ([#18822](https://github.com/community-scripts/ProxmoxVE/pull/18822))
|
||||
|
||||
### 🧰 Tools
|
||||
|
||||
- Scrutiny Collector ([#18826](https://github.com/community-scripts/ProxmoxVE/pull/18826))
|
||||
|
||||
## 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
|
||||
|
||||
- Let contributors read traces and open issues with a password of their own [@MickLesk](https://github.com/MickLesk) ([services#19](https://github.com/community-scripts/services/pull/19))
|
||||
- Rework the dashboard around triaging failures [@MickLesk](https://github.com/MickLesk) ([services#18](https://github.com/community-scripts/services/pull/18))
|
||||
- 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))
|
||||
|
||||
### ❔ Uncategorized
|
||||
|
||||
- chore(ct): sync paperclip defaults with PocketBase [@github-actions[bot]](https://github.com/github-actions[bot]) ([#18820](https://github.com/community-scripts/ProxmoxVE/pull/18820))
|
||||
|
||||
## 2026-11-16
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
Executable
+91
@@ -0,0 +1,91 @@
|
||||
#!/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}"
|
||||
+70
-38
@@ -31,7 +31,7 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
|
||||
ensure_dependencies libjpeg-dev poppler-utils file locales
|
||||
ensure_dependencies libjpeg-dev poppler-utils file locales xvfb xauth python3
|
||||
|
||||
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,56 +44,88 @@ 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
|
||||
|
||||
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"
|
||||
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"
|
||||
else
|
||||
msg_info "Updating ${APP}"
|
||||
$STD "$VENV_PATH/bin/python" -m pip install --upgrade changedetection.io playwright
|
||||
msg_ok "Updated ${APP}"
|
||||
msg_info "Updating Chrome"
|
||||
apt_update_safe
|
||||
$STD apt install -y --only-upgrade google-chrome-stable
|
||||
msg_ok "Updated Chrome"
|
||||
fi
|
||||
|
||||
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"
|
||||
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"
|
||||
fi
|
||||
|
||||
if [[ -f /etc/systemd/system/browserless.service ]]; then
|
||||
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!"
|
||||
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
|
||||
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
|
||||
msg_ok "Replaced Browserless with SockPuppetBrowser"
|
||||
fi
|
||||
|
||||
if [[ ! -f /etc/systemd/system/sockpuppetbrowser.service ]]; then
|
||||
msg_info "Creating SockPuppetBrowser Service"
|
||||
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
|
||||
systemctl daemon-reload
|
||||
systemctl enable -q sockpuppetbrowser
|
||||
msg_ok "Created SockPuppetBrowser Service"
|
||||
fi
|
||||
|
||||
systemctl daemon-reload
|
||||
systemctl restart sockpuppetbrowser
|
||||
systemctl restart changedetection
|
||||
msg_ok "Updated successfully!"
|
||||
exit
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
msg_info "Updating deCONZ"
|
||||
apt_update_safe
|
||||
$STD apt upgrade -y
|
||||
setcap -r /usr/bin/deCONZ 2>/dev/null || true
|
||||
systemctl restart deconz
|
||||
msg_ok "Updated deCONZ"
|
||||
msg_ok "Updated successfully!"
|
||||
exit
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
#!/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: William Lindholm (LindholmLabs)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://www.factorio.com/
|
||||
|
||||
APP="Factorio"
|
||||
var_tags="${var_tags:-gaming}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-8}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
var_arm64="${var_arm64:-yes}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -x /opt/factorio/bin/$(arch_resolve "x64" "arm64")/factorio ]]; then
|
||||
msg_error "No Factorio Installation Found!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
msg_info "Stopping Factorio"
|
||||
systemctl stop factorio
|
||||
msg_ok "Stopped Factorio"
|
||||
|
||||
create_backup /opt/factorio/config /opt/factorio/config-path.cfg \
|
||||
/opt/factorio/server-settings.json /opt/factorio/saves /opt/factorio/mods \
|
||||
/opt/factorio/player-data.json /opt/factorio/server-adminlist.json \
|
||||
/opt/factorio/server-banlist.json /opt/factorio/server-whitelist.json
|
||||
|
||||
fetch_and_deploy_from_url "https://factorio.com/get-download/stable/headless/$(arch_resolve "linux64" "linux-arm64")" "/opt/factorio"
|
||||
|
||||
restore_backup
|
||||
|
||||
msg_info "Starting Factorio"
|
||||
systemctl start factorio
|
||||
msg_ok "Started Factorio"
|
||||
msg_ok "Updated Factorio successfully!"
|
||||
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Factorio setup successfully!\n"
|
||||
echo -e "${INFO}${YW}Connect in Factorio using the following address (UDP):${CL}"
|
||||
echo -e "${GATEWAY}${BGN}${IP}:34197${CL}"
|
||||
@@ -0,0 +1,65 @@
|
||||
#!/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/infobyte/faraday
|
||||
|
||||
APP="Faraday"
|
||||
var_tags="${var_tags:-security;vulnerability}"
|
||||
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:-yes}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
export var_faraday_password="${var_faraday_password:-}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/faraday ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "faraday" "infobyte/faraday"; then
|
||||
msg_info "Stopping Faraday"
|
||||
systemctl stop faraday-beat faraday-worker faraday-server
|
||||
msg_ok "Stopped Faraday"
|
||||
|
||||
PYTHON_VERSION="3.11" setup_uv
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "faraday" "infobyte/faraday" "tarball"
|
||||
|
||||
msg_info "Updating Faraday"
|
||||
cd /opt/faraday
|
||||
UV_PROJECT_ENVIRONMENT=/opt/faraday/venv $STD uv sync --frozen --no-dev --no-editable
|
||||
FARADAY_HOME=/opt/faraday_data $STD venv/bin/faraday-manage migrate
|
||||
msg_ok "Updated Faraday"
|
||||
|
||||
msg_info "Starting Faraday"
|
||||
systemctl start faraday-server faraday-worker faraday-beat
|
||||
msg_ok "Started Faraday"
|
||||
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}:5985${CL}"
|
||||
@@ -0,0 +1,61 @@
|
||||
#!/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/grimmory-tools/grimmory
|
||||
|
||||
APP="Grimmory"
|
||||
var_tags="${var_tags:-books;ebooks;library}"
|
||||
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}" # release jar bundles x64-only PDFium natives
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -f /opt/grimmory/grimmory.jar ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "kepubify" "pgaskin/kepubify"; then
|
||||
fetch_and_deploy_gh_release "kepubify" "pgaskin/kepubify" "singlefile" "latest" "/usr/local/bin" "kepubify-linux-64bit"
|
||||
fi
|
||||
|
||||
if check_for_gh_release "grimmory" "grimmory-tools/grimmory"; then
|
||||
msg_info "Stopping Grimmory"
|
||||
systemctl stop grimmory
|
||||
msg_ok "Stopped Grimmory"
|
||||
|
||||
JAVA_VERSION="25" setup_java
|
||||
USE_ORIGINAL_FILENAME="true" fetch_and_deploy_gh_release "grimmory" "grimmory-tools/grimmory" "singlefile" "latest" "/opt/grimmory" "grimmory.jar"
|
||||
|
||||
msg_info "Starting Grimmory"
|
||||
systemctl start grimmory
|
||||
msg_ok "Started Grimmory"
|
||||
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}:6060${CL}"
|
||||
+1
-1
@@ -227,7 +227,7 @@ EOF
|
||||
# plugins
|
||||
cd "$SRC_DIR"
|
||||
export MISE_TRUSTED_CONFIG_PATHS="$SRC_DIR"/mise.toml
|
||||
export MISE_DISABLE_TOOLS=github:jellyfin/jellyfin-ffmpeg,java,terragrunt,opentofu,restic,npm:@openapitools/openapi-generator-cli
|
||||
export MISE_DISABLE_TOOLS=github:jellyfin/jellyfin-ffmpeg,java,terragrunt,opentofu,restic,npm:@openapitools/openapi-generator-cli,npm:oazapfts
|
||||
export MISE_LOCKFILE_MODE=merge MISE_LOCKFILE_PLATFORMS="linux-$(arch_resolve x64 arm64)"
|
||||
mise_ok=0
|
||||
for i in 1 2 3; do
|
||||
|
||||
+6
-6
@@ -31,12 +31,12 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
|
||||
if ! dotnet --list-sdks 2>/dev/null | grep -q '^8\.'; then
|
||||
msg_info "Installing .NET SDK 8.0"
|
||||
if ! dotnet --list-sdks 2>/dev/null | grep -q '^10\.'; then
|
||||
msg_info "Installing .NET SDK 10.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 8.0 --install-dir /usr/lib/dotnet8
|
||||
ln -sf /usr/lib/dotnet8/dotnet /usr/bin/dotnet
|
||||
$STD bash /tmp/dotnet-install.sh --channel 10.0 --install-dir /usr/lib/dotnet10
|
||||
ln -sf /usr/lib/dotnet10/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-8.0
|
||||
$STD apt install -y dotnet-sdk-10.0
|
||||
fi
|
||||
msg_ok "Installed .NET SDK 8.0"
|
||||
msg_ok "Installed .NET SDK 10.0"
|
||||
fi
|
||||
|
||||
if check_for_gh_release "immichframe" "immichFrame/ImmichFrame"; then
|
||||
|
||||
+10
-1
@@ -61,11 +61,20 @@ function update_script() {
|
||||
fi
|
||||
$STD apt install -y build-essential "$pcre_pkg" libssl-dev zlib1g-dev
|
||||
|
||||
OPENRESTY_VERSION="1.29.2.5"
|
||||
OPENRESTY_VERSION="1.31.8.1"
|
||||
if [[ "$(cat ~/.openresty 2>/dev/null)" != "$OPENRESTY_VERSION" ]]; then
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_from_url "https://openresty.org/download/openresty-${OPENRESTY_VERSION}.tar.gz" "/opt/openresty" ||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_from_url "https://distfiles.alpinelinux.org/distfiles/edge/openresty-${OPENRESTY_VERSION}.tar.gz" "/opt/openresty"
|
||||
|
||||
msg_info "Patching nginx HTTP/2 (CVE-2026-123007, CVE-2026-123633)"
|
||||
for commit in 61031503dc8087c2c17cd2142c9b4b19062f90c4 2df48a501d0fb8212b7d39dffeeff5876332ba59 e27f5fa84fe6e98505e70bc543b748747dad0a3b; do
|
||||
curl_with_retry "https://api.github.com/repos/nginx/nginx/commits/${commit}" "/tmp/nginx-${commit}.patch" "-HAccept:application/vnd.github.patch" ||
|
||||
curl_with_retry "https://github.com/nginx/nginx/commit/${commit}.patch" "/tmp/nginx-${commit}.patch"
|
||||
patch -d /opt/openresty/bundle/nginx-1.31.8 -p1 --forward -s <"/tmp/nginx-${commit}.patch"
|
||||
rm -f "/tmp/nginx-${commit}.patch"
|
||||
done
|
||||
msg_ok "Patched nginx HTTP/2"
|
||||
|
||||
msg_info "Building OpenResty"
|
||||
cd /opt/openresty
|
||||
$STD ./configure \
|
||||
|
||||
+2
-2
@@ -40,7 +40,7 @@ function update_script() {
|
||||
msg_ok "Allowed OpenCloud to embed Collabora"
|
||||
fi
|
||||
|
||||
RELEASE="v9.0.0"
|
||||
RELEASE="v9.2.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"
|
||||
@@ -90,7 +90,7 @@ function update_script() {
|
||||
|
||||
# 9.0: the default space quota is read only under its new name, and thumbnails are cached in thumbnails/cache
|
||||
sed -i 's/^GRAPH_SPACES_DEFAULT_QUOTA=/OC_SPACES_DEFAULT_QUOTA=/' /etc/opencloud/opencloud.env
|
||||
rm -rf /var/lib/opencloud/thumbnails/files
|
||||
sudo -u opencloud rm -rf /var/lib/opencloud/thumbnails/files
|
||||
|
||||
msg_info "Starting services"
|
||||
systemctl start opencloud opencloud-wopi
|
||||
|
||||
+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:-8192}"
|
||||
var_ram="${var_ram:-10240}"
|
||||
var_disk="${var_disk:-20}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
|
||||
+3
-2
@@ -57,10 +57,11 @@ function update_script() {
|
||||
$STD pnpm turbo run build --filter=web --filter=admin --filter=space --filter=live
|
||||
msg_ok "Rebuilt Frontend"
|
||||
|
||||
PYTHON_VERSION="3.12" UV_PROJECT_DIR="/opt/plane/apps/api" setup_uv
|
||||
|
||||
msg_info "Updating Python Dependencies"
|
||||
cd /opt/plane/apps/api
|
||||
export VIRTUAL_ENV=/opt/plane-venv
|
||||
$STD uv pip install --upgrade -r requirements/production.txt
|
||||
UV_PROJECT_ENVIRONMENT=/opt/plane-venv $STD uv sync --locked --no-default-groups --group production
|
||||
msg_ok "Updated Python Dependencies"
|
||||
|
||||
msg_info "Running Migrations"
|
||||
|
||||
@@ -31,6 +31,46 @@ 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
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
#!/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/AnalogJ/scrutiny
|
||||
|
||||
APP="Scrutiny"
|
||||
var_tags="${var_tags:-monitoring;smart;disk}"
|
||||
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 [[ ! -f /opt/scrutiny/scrutiny ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "scrutiny" "AnalogJ/scrutiny"; then
|
||||
msg_info "Stopping Scrutiny"
|
||||
systemctl stop scrutiny
|
||||
msg_ok "Stopped Scrutiny"
|
||||
|
||||
fetch_and_deploy_gh_release "scrutiny" "AnalogJ/scrutiny" "singlefile" "latest" "/opt/scrutiny" "scrutiny-web-linux-$(arch_resolve "amd64" "arm64")"
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "scrutiny-web" "AnalogJ/scrutiny" "prebuild" "latest" "/opt/scrutiny/web" "scrutiny-web-frontend.tar.gz"
|
||||
|
||||
msg_info "Starting Scrutiny"
|
||||
systemctl start scrutiny
|
||||
msg_ok "Started Scrutiny"
|
||||
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}:8080${CL}"
|
||||
+64
-3
@@ -31,13 +31,74 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
|
||||
RELEASE="v0.16.27"
|
||||
if check_for_gh_release "stalwart" "stalwartlabs/stalwart" "${RELEASE}" "Stalwart v1 changes the data store layout and requires an offline migration with stalwartlabs/stalwart-migrate; pinned until this script supports it"; then
|
||||
if [[ "$(cat ~/.stalwart 2>/dev/null)" == 0.* ]]; then
|
||||
if check_for_gh_release "stalwart" "stalwartlabs/stalwart" "v0.16.27" "v1 needs the migration below"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop stalwart
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "stalwart" "stalwartlabs/stalwart" "prebuild" "v0.16.27" "/opt/stalwart" "stalwart-$(arch_resolve x86_64 aarch64)-unknown-linux-gnu.tar.gz"
|
||||
chmod +x /opt/stalwart/stalwart
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start stalwart
|
||||
msg_ok "Started Service"
|
||||
fi
|
||||
|
||||
CONFIG_DIR="/opt/stalwart_data/etc"
|
||||
if [[ ! -t 0 ]]; then
|
||||
msg_warn "Stalwart v1 needs a migration that asks questions. Run update from the container console."
|
||||
exit
|
||||
fi
|
||||
if ! grep -q '"@type":"RocksDb"' "${CONFIG_DIR}/config.json"; then
|
||||
msg_error "This script migrates only the default RocksDB store to Stalwart v1. Migrate manually: https://stalw.art/docs/migration/upgrade-0-16/"
|
||||
exit 1
|
||||
fi
|
||||
SOURCE_PATH=$(grep -oP '"path":"\K[^"]+' "${CONFIG_DIR}/config.json")
|
||||
TARGET_PATH="${SOURCE_PATH%/}-v1/"
|
||||
DATA_KB=$(du -sk "$SOURCE_PATH" | cut -f1)
|
||||
FREE_KB=$(df -Pk "$(dirname "${SOURCE_PATH%/}")" | awk 'NR==2 {print $4}')
|
||||
if ((FREE_KB < DATA_KB * 11 / 10 + 524288)); then
|
||||
msg_error "The migration copies the data store ($((DATA_KB / 1024)) MB) but only $((FREE_KB / 1024)) MB are free. Resize the container disk and run update again."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
fetch_and_deploy_gh_release "stalwart-migrate" "stalwartlabs/stalwart-migrate" "prebuild" "latest" "/opt/stalwart-migrate" "stalwart-migrate-$(arch_resolve x86_64 aarch64)-unknown-linux-gnu.tar.xz"
|
||||
echo "{\"@type\":\"RocksDb\",\"path\":\"${TARGET_PATH}\"}" >"${CONFIG_DIR}/config-v1.json"
|
||||
|
||||
msg_warn "Stalwart v1 cannot open the v0.16 data store, so it is copied to ${TARGET_PATH}. Mail is down while the copy runs."
|
||||
echo -e "${TAB}Press Enter to accept the recommended answers."
|
||||
/opt/stalwart-migrate/stalwart-migrate prepare --source "${CONFIG_DIR}/config.json" --state /opt/stalwart_data/migrate
|
||||
|
||||
msg_info "Copying data to the v1 store"
|
||||
systemctl stop stalwart
|
||||
if ! $STD /opt/stalwart-migrate/stalwart-migrate run --final --yes --source "${CONFIG_DIR}/config.json" --target "${CONFIG_DIR}/config-v1.json" --state /opt/stalwart_data/migrate; then
|
||||
systemctl start stalwart
|
||||
msg_error "Migration failed, Stalwart v0.16 is running again. Logs: /opt/stalwart_data/migrate/logs"
|
||||
exit 1
|
||||
fi
|
||||
msg_ok "Copied data to the v1 store"
|
||||
|
||||
mv "${CONFIG_DIR}/config.json" "${CONFIG_DIR}/config-0.16.json"
|
||||
mv "${CONFIG_DIR}/config-v1.json" "${CONFIG_DIR}/config.json"
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "stalwart" "stalwartlabs/stalwart" "prebuild" "latest" "/opt/stalwart" "stalwart-$(arch_resolve x86_64 aarch64)-unknown-linux-gnu.tar.gz"
|
||||
chmod +x /opt/stalwart/stalwart
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start stalwart
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Migrated to Stalwart $(cat ~/.stalwart)"
|
||||
msg_warn "OAuth clients have to sign in again. Search results stay incomplete until v1 has rebuilt the index."
|
||||
msg_warn "The v0.16 store stays in ${SOURCE_PATH} (${CONFIG_DIR}/config-0.16.json). Delete it once v1 works."
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "stalwart" "stalwartlabs/stalwart"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop stalwart
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "stalwart" "stalwartlabs/stalwart" "prebuild" "${RELEASE}" "/opt/stalwart" "stalwart-$(arch_resolve x86_64 aarch64)-unknown-linux-gnu.tar.gz"
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "stalwart" "stalwartlabs/stalwart" "prebuild" "latest" "/opt/stalwart" "stalwart-$(arch_resolve x86_64 aarch64)-unknown-linux-gnu.tar.gz"
|
||||
chmod +x /opt/stalwart/stalwart
|
||||
|
||||
msg_info "Starting Service"
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
#!/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: lukdz
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/pingdotgg/t3code
|
||||
|
||||
APP="T3Code"
|
||||
var_tags="${var_tags:-ai;dev-tools}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-4096}"
|
||||
var_disk="${var_disk:-10}"
|
||||
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 ! command -v t3 >/dev/null 2>&1; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop t3code
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Updating T3 Code"
|
||||
$STD npm install -g t3@latest
|
||||
msg_ok "Updated T3 Code"
|
||||
|
||||
msg_info "Configuring T3 Code Service"
|
||||
mkdir -p /etc/systemd/system/t3code.service.d
|
||||
cat <<EOF >/etc/systemd/system/t3code.service.d/claude.conf
|
||||
[Service]
|
||||
# Allow Claude Full access mode as root inside the LXC.
|
||||
Environment=IS_SANDBOX=1
|
||||
EOF
|
||||
systemctl daemon-reload
|
||||
msg_ok "Configured T3 Code Service"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start t3code
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Updated successfully!"
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
+1
-1
@@ -19,7 +19,7 @@ fi
|
||||
|
||||
if [[ "${var_os:-}" == "alpine" ]]; then
|
||||
var_ram="${var_ram:-256}"
|
||||
var_disk="${var_disk:-1}"
|
||||
var_disk="${var_disk:-2}"
|
||||
var_version="${var_version:-3.24}"
|
||||
else
|
||||
var_ram="${var_ram:-1024}"
|
||||
|
||||
Executable
+97
@@ -0,0 +1,97 @@
|
||||
#!/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,32 +13,13 @@ setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies (Patience)"
|
||||
msg_info "Installing Dependencies"
|
||||
$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 \
|
||||
ca-certificates \
|
||||
xauth \
|
||||
python3 \
|
||||
locales \
|
||||
poppler-utils \
|
||||
file
|
||||
@@ -54,35 +35,25 @@ 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 /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
|
||||
$STD uv pip install --python /opt/changedetection/.venv/bin/python changedetection.io playwright
|
||||
cat <<EOF >/opt/changedetection/.env
|
||||
WEBDRIVER_URL=http://127.0.0.1:4444/wd/hub
|
||||
PLAYWRIGHT_DRIVER_URL=ws://localhost:3000/chrome?launch=eyJkZWZhdWx0Vmlld3BvcnQiOnsiaGVpZ2h0Ijo3MjAsIndpZHRoIjoxMjgwfSwiaGVhZGxlc3MiOmZhbHNlLCJzdGVhbHRoIjp0cnVlfQ==&blockAds=true
|
||||
PLAYWRIGHT_DRIVER_URL=ws://127.0.0.1:3000/?headful=true&--window-size=1920,1080
|
||||
LC_ALL=en_US.UTF-8
|
||||
EOF
|
||||
msg_ok "Installed Change Detection"
|
||||
|
||||
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 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 Font Packages"
|
||||
$STD apt install -y \
|
||||
@@ -99,30 +70,38 @@ $STD apt install -y \
|
||||
fonts-wqy-zenhei
|
||||
msg_ok "Installed Font Packages"
|
||||
|
||||
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"
|
||||
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 "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
|
||||
After=network.target browserless.service
|
||||
Wants=browserless.service
|
||||
After=network-online.target sockpuppetbrowser.service
|
||||
Wants=sockpuppetbrowser.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
@@ -133,23 +112,7 @@ ExecStart=/opt/changedetection/.venv/bin/changedetection.io -d /opt/changedetect
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
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
|
||||
systemctl enable -q --now sockpuppetbrowser changedetection
|
||||
msg_ok "Created Services"
|
||||
|
||||
motd_ssh
|
||||
|
||||
@@ -22,11 +22,13 @@ setup_deb822_repo \
|
||||
msg_ok "Setup Phoscon Repository"
|
||||
|
||||
msg_info "Installing deConz"
|
||||
pool="$(arch_resolve "https://security.ubuntu.com/ubuntu/pool/main/o/openssl/" "http://ports.ubuntu.com/ubuntu-ports/pool/main/o/openssl/")"
|
||||
libssl=$(curl -fsSL --proto '=http,https' "$pool" | grep -o "libssl1\.1_1\.1\.1f-1ubuntu2\.2[^\"]*$(arch_resolve)\.deb" | head -n1)
|
||||
curl -fsSL --proto '=http,https' "$pool$libssl" -o "$libssl"
|
||||
pool="$(arch_resolve "https://security.ubuntu.com/ubuntu/pool/main/o/openssl/" "https://ports.ubuntu.com/ubuntu-ports/pool/main/o/openssl/")"
|
||||
libssl=$(curl -fsSL --proto '=https' "$pool" | grep -o "libssl1\.1_1\.1\.1f-1ubuntu2\.2[^\"]*$(arch_resolve)\.deb" | head -n1)
|
||||
curl -fsSL --proto '=https' "$pool$libssl" -o "$libssl"
|
||||
$STD dpkg -i "$libssl"
|
||||
$STD apt install -y deconz
|
||||
# The service runs as root; the postinst file caps break exec in privileged Incus containers
|
||||
setcap -r /usr/bin/deCONZ 2>/dev/null || true
|
||||
rm -rf "$libssl"
|
||||
msg_ok "Installed deConz"
|
||||
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: William Lindholm (LindholmLabs)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://www.factorio.com/
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
fetch_and_deploy_from_url "https://factorio.com/get-download/stable/headless/$(arch_resolve "linux64" "linux-arm64")" "/opt/factorio"
|
||||
|
||||
msg_info "Configuring Factorio"
|
||||
sed 's/"public":[[:space:]]*true/"public": false/' /opt/factorio/data/server-settings.example.json >/opt/factorio/server-settings.json
|
||||
cat <<EOF >/opt/factorio/server-adminlist.json
|
||||
[]
|
||||
EOF
|
||||
msg_ok "Configured Factorio"
|
||||
|
||||
msg_info "Creating Factorio Save"
|
||||
mkdir -p /opt/factorio/saves
|
||||
$STD /opt/factorio/bin/$(arch_resolve "x64" "arm64")/factorio --create /opt/factorio/saves/save.zip
|
||||
msg_ok "Created Factorio Save"
|
||||
|
||||
msg_info "Creating Factorio Service"
|
||||
cat <<EOF >/etc/systemd/system/factorio.service
|
||||
[Unit]
|
||||
Description=Factorio Headless Server
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/factorio
|
||||
ExecStart=/opt/factorio/bin/$(arch_resolve "x64" "arm64")/factorio --start-server-load-latest --server-settings /opt/factorio/server-settings.json --server-adminlist /opt/factorio/server-adminlist.json
|
||||
KillSignal=SIGINT
|
||||
TimeoutStopSec=120
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now factorio
|
||||
|
||||
msg_ok "Created Factorio Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -0,0 +1,104 @@
|
||||
#!/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/infobyte/faraday
|
||||
|
||||
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 \
|
||||
libpq-dev \
|
||||
libmagic1 \
|
||||
redis-server
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PG_VERSION="17" setup_postgresql
|
||||
PG_DB_NAME="faraday" PG_DB_USER="faraday" PG_DB_CREDS_FILE="/dev/null" setup_postgresql_db
|
||||
PYTHON_VERSION="3.11" setup_uv
|
||||
fetch_and_deploy_gh_release "faraday" "infobyte/faraday" "tarball"
|
||||
|
||||
msg_info "Installing Faraday"
|
||||
cd /opt/faraday
|
||||
UV_PROJECT_ENVIRONMENT=/opt/faraday/venv $STD uv sync --frozen --no-dev --no-editable
|
||||
msg_ok "Installed Faraday"
|
||||
|
||||
msg_info "Configuring Faraday"
|
||||
FARADAY_PASSWORD="${var_faraday_password:-$(random_password)}"
|
||||
mkdir -p /opt/faraday_data/.faraday/config
|
||||
cat <<EOF >/opt/faraday_data/.faraday/config/server.ini
|
||||
[faraday_server]
|
||||
port = 5985
|
||||
bind_address = 0.0.0.0
|
||||
secret_key = $(random_password 32)
|
||||
|
||||
[database]
|
||||
connection_string = postgresql+psycopg2://${PG_DB_USER}:${PG_DB_PASS}@localhost/${PG_DB_NAME}
|
||||
EOF
|
||||
cat <<EOF >/opt/faraday_data/.env
|
||||
FARADAY_HOME=/opt/faraday_data
|
||||
FARADAY_USER=faraday
|
||||
FARADAY_PASSWORD=${FARADAY_PASSWORD}
|
||||
EOF
|
||||
chmod 600 /opt/faraday_data/.env /opt/faraday_data/.faraday/config/server.ini
|
||||
FARADAY_HOME=/opt/faraday_data $STD venv/bin/faraday-manage create-tables
|
||||
FARADAY_HOME=/opt/faraday_data $STD venv/bin/faraday-manage create-superuser --username faraday --email faraday@example.com --password "$FARADAY_PASSWORD"
|
||||
msg_ok "Configured Faraday"
|
||||
|
||||
msg_info "Creating Services"
|
||||
cat <<EOF >/etc/systemd/system/faraday-server.service
|
||||
[Unit]
|
||||
Description=Faraday Server
|
||||
After=network.target postgresql.service redis-server.service
|
||||
|
||||
[Service]
|
||||
Type=exec
|
||||
Environment=FARADAY_HOME=/opt/faraday_data
|
||||
ExecStart=/opt/faraday/venv/bin/faraday-server
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
cat <<EOF >/etc/systemd/system/faraday-worker.service
|
||||
[Unit]
|
||||
Description=Faraday Worker
|
||||
After=network.target postgresql.service redis-server.service
|
||||
|
||||
[Service]
|
||||
Type=exec
|
||||
Environment=FARADAY_HOME=/opt/faraday_data
|
||||
ExecStart=/opt/faraday/venv/bin/faraday-worker
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
cat <<EOF >/etc/systemd/system/faraday-beat.service
|
||||
[Unit]
|
||||
Description=Faraday Beat
|
||||
After=network.target postgresql.service redis-server.service
|
||||
|
||||
[Service]
|
||||
Type=exec
|
||||
Environment=FARADAY_HOME=/opt/faraday_data
|
||||
ExecStart=/opt/faraday/venv/bin/faraday-beat
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now faraday-server faraday-worker faraday-beat
|
||||
msg_ok "Created Services"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -110,7 +110,7 @@ export AUTOGRAPH_VERBOSITY=0
|
||||
export GLOG_minloglevel=3
|
||||
export GLOG_logtostderr=0
|
||||
|
||||
fetch_and_deploy_gh_release "frigate" "blakeblackshear/frigate" "tarball" "v0.18.2" "/opt/frigate"
|
||||
fetch_and_deploy_gh_release "frigate" "blakeblackshear/frigate" "tarball" "v0.18.3" "/opt/frigate"
|
||||
|
||||
msg_info "Building Nginx"
|
||||
$STD bash /opt/frigate/docker/main/build_nginx.sh
|
||||
@@ -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" "http://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" "https://storage.googleapis.com/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
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
#!/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/grimmory-tools/grimmory
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
setup_ffmpeg
|
||||
JAVA_VERSION="25" setup_java
|
||||
setup_mariadb
|
||||
MARIADB_DB_NAME="grimmory" MARIADB_DB_USER="grimmory" MARIADB_DB_CREDS_FILE="/dev/null" setup_mariadb_db
|
||||
fetch_and_deploy_gh_release "kepubify" "pgaskin/kepubify" "singlefile" "latest" "/usr/local/bin" "kepubify-linux-64bit"
|
||||
USE_ORIGINAL_FILENAME="true" fetch_and_deploy_gh_release "grimmory" "grimmory-tools/grimmory" "singlefile" "latest" "/opt/grimmory" "grimmory.jar"
|
||||
|
||||
msg_info "Configuring Grimmory"
|
||||
mkdir -p /opt/grimmory_data/{data,books,bookdrop}
|
||||
cat <<EOF >/opt/grimmory_data/.env
|
||||
DATABASE_HOST=localhost
|
||||
DATABASE_NAME=${MARIADB_DB_NAME}
|
||||
DATABASE_USERNAME=${MARIADB_DB_USER}
|
||||
DATABASE_PASSWORD=${MARIADB_DB_PASS}
|
||||
APP_PATH_CONFIG=/opt/grimmory_data/data
|
||||
APP_BOOKDROP_FOLDER=/opt/grimmory_data/bookdrop
|
||||
SERVER_PORT=6060
|
||||
EOF
|
||||
chmod 600 /opt/grimmory_data/.env
|
||||
msg_ok "Configured Grimmory"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/grimmory.service
|
||||
[Unit]
|
||||
Description=Grimmory
|
||||
After=network.target mariadb.service
|
||||
Requires=mariadb.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/grimmory_data
|
||||
EnvironmentFile=/opt/grimmory_data/.env
|
||||
ExecStart=/usr/bin/java -XX:+UseCompactObjectHeaders -XX:MaxRAMPercentage=60.0 -XX:+ExitOnOutOfMemoryError --enable-native-access=ALL-UNNAMED --enable-preview -jar /opt/grimmory/grimmory.jar
|
||||
SuccessExitStatus=143
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now grimmory
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -284,7 +284,7 @@ cp -a web/build "$APP_DIR"/www
|
||||
cp LICENSE "$APP_DIR"
|
||||
cd "$SRC_DIR"
|
||||
export MISE_TRUSTED_CONFIG_PATHS="$SRC_DIR"/mise.toml
|
||||
export MISE_DISABLE_TOOLS=github:jellyfin/jellyfin-ffmpeg,java,terragrunt,opentofu,restic,npm:@openapitools/openapi-generator-cli
|
||||
export MISE_DISABLE_TOOLS=github:jellyfin/jellyfin-ffmpeg,java,terragrunt,opentofu,restic,npm:@openapitools/openapi-generator-cli,npm:oazapfts
|
||||
export MISE_LOCKFILE_MODE=merge MISE_LOCKFILE_PLATFORMS="linux-$(arch_resolve x64 arm64)"
|
||||
mise_ok=0
|
||||
for i in 1 2 3; do
|
||||
|
||||
@@ -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 8.0 --install-dir /usr/lib/dotnet8
|
||||
ln -sf /usr/lib/dotnet8/dotnet /usr/bin/dotnet
|
||||
$STD bash /tmp/dotnet-install.sh --channel 10.0 --install-dir /usr/lib/dotnet10
|
||||
ln -sf /usr/lib/dotnet10/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-8.0 \
|
||||
aspnetcore-runtime-8.0
|
||||
dotnet-sdk-10.0 \
|
||||
aspnetcore-runtime-10.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" \
|
||||
"http://deb.itsm-ng.org/pubkey.gpg" \
|
||||
"http://deb.itsm-ng.org/$(get_os_info id)/" \
|
||||
"https://deb.itsm-ng.org/pubkey.gpg" \
|
||||
"https://deb.itsm-ng.org/$(get_os_info id)/" \
|
||||
"$(get_os_info codename)"
|
||||
$STD apt install -y itsm-ng
|
||||
cd /usr/share/itsm-ng
|
||||
|
||||
@@ -63,7 +63,12 @@ curl_download "/opt/kasm_release_${KASM_VERSION}.tar.gz" "$KASM_URL"
|
||||
cd /opt
|
||||
tar -xf "kasm_release_${KASM_VERSION}.tar.gz"
|
||||
chmod +x /opt/kasm_release/install.sh
|
||||
bash /opt/kasm_release/install.sh --accept-eula --no-swap-check --no-check-disk --ignore-dep-failures >~/kasm-install.output 2>&1
|
||||
bash /opt/kasm_release/install.sh --accept-eula --no-swap-check --no-check-disk --ignore-dep-failures >~/kasm-install.output 2>&1 || {
|
||||
KASM_RC=$?
|
||||
$STD tail -n 25 ~/kasm-install.output
|
||||
msg_error "The Kasm installer failed (exit ${KASM_RC}), see ~/kasm-install.output"
|
||||
exit "$KASM_RC"
|
||||
}
|
||||
awk '
|
||||
/^Kasm UI Login Credentials$/ {capture=1}
|
||||
capture {print}
|
||||
|
||||
@@ -52,7 +52,7 @@ msg_info "Configuring LibreNMS"
|
||||
$STD useradd librenms -d /opt/librenms -M -r -s "$(which bash)"
|
||||
mkdir -p /opt/librenms/{rrd,logs,bootstrap/cache,storage,html}
|
||||
cd /opt/librenms
|
||||
APP_KEY=$(openssl rand -base64 40 | tr -dc 'a-zA-Z0-9')
|
||||
APP_KEY="base64:$(openssl rand -base64 32)"
|
||||
$STD uv venv --clear .venv
|
||||
$STD source .venv/bin/activate
|
||||
$STD uv pip install -r requirements.txt
|
||||
@@ -124,7 +124,6 @@ EOF
|
||||
|
||||
$STD su - librenms -s /bin/bash -c "cd /opt/librenms && COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev"
|
||||
$STD su - librenms -s /bin/bash -c "cd /opt/librenms && php8.4 artisan migrate --force"
|
||||
$STD su - librenms -s /bin/bash -c "cd /opt/librenms && php8.4 artisan key:generate --force"
|
||||
$STD su - librenms -s /bin/bash -c "cd /opt/librenms && lnms db:seed --force"
|
||||
$STD su - librenms -s /bin/bash -c "cd /opt/librenms && lnms user:add -p ${APP_PASSWORD} ${APP_USER} --role=admin"
|
||||
|
||||
|
||||
@@ -36,10 +36,19 @@ $STD /opt/certbot/bin/pip install certbot certbot-dns-cloudflare
|
||||
ln -sf /opt/certbot/bin/certbot /usr/local/bin/certbot
|
||||
msg_ok "Set up Certbot"
|
||||
|
||||
OPENRESTY_VERSION="1.29.2.5"
|
||||
OPENRESTY_VERSION="1.31.8.1"
|
||||
fetch_and_deploy_from_url "https://openresty.org/download/openresty-${OPENRESTY_VERSION}.tar.gz" "/opt/openresty" ||
|
||||
fetch_and_deploy_from_url "https://distfiles.alpinelinux.org/distfiles/edge/openresty-${OPENRESTY_VERSION}.tar.gz" "/opt/openresty"
|
||||
|
||||
msg_info "Patching nginx HTTP/2 (CVE-2026-123007, CVE-2026-123633)"
|
||||
for commit in 61031503dc8087c2c17cd2142c9b4b19062f90c4 2df48a501d0fb8212b7d39dffeeff5876332ba59 e27f5fa84fe6e98505e70bc543b748747dad0a3b; do
|
||||
curl_with_retry "https://api.github.com/repos/nginx/nginx/commits/${commit}" "/tmp/nginx-${commit}.patch" "-HAccept:application/vnd.github.patch" ||
|
||||
curl_with_retry "https://github.com/nginx/nginx/commit/${commit}.patch" "/tmp/nginx-${commit}.patch"
|
||||
patch -d /opt/openresty/bundle/nginx-1.31.8 -p1 --forward -s <"/tmp/nginx-${commit}.patch"
|
||||
rm -f "/tmp/nginx-${commit}.patch"
|
||||
done
|
||||
msg_ok "Patched nginx HTTP/2"
|
||||
|
||||
msg_info "Building OpenResty"
|
||||
cd /opt/openresty
|
||||
$STD ./configure \
|
||||
|
||||
@@ -68,6 +68,11 @@ yq -i "
|
||||
(map(select(. != \"TZ=*\" and . != \"ACME_EMAIL=*\" and . != \"INITIAL_ADMIN_EMAIL=*\" and . != \"INITIAL_ADMIN_PASSWORD=*\")) +
|
||||
[\"TZ=$TZ_INPUT\", \"ACME_EMAIL=$ACME_EMAIL_INPUT\", \"INITIAL_ADMIN_EMAIL=admin@local.com\", \"INITIAL_ADMIN_PASSWORD=${ADMIN_PASS}\"])
|
||||
" /opt/compose.yaml
|
||||
# nginx in the NPMplus image cannot parse a link-local resolver with a zone ID (fe80::1%eth0)
|
||||
DNS_SERVERS="$(awk '/^nameserver/ && $2 !~ /%/ {print $2}' /etc/resolv.conf)"
|
||||
if grep -qE '^nameserver[[:space:]]+[^[:space:]]*%' /etc/resolv.conf && [[ -n "$DNS_SERVERS" ]]; then
|
||||
DNS_SERVERS="$DNS_SERVERS" yq -i '.services.npmplus.dns = (strenv(DNS_SERVERS) | split("\n"))' /opt/compose.yaml
|
||||
fi
|
||||
{
|
||||
echo "NPMplus Credentials"
|
||||
echo "Email: admin@local.com"
|
||||
|
||||
@@ -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.0.0" "/usr/bin" "opencloud-*-linux-$(arch_resolve)"
|
||||
fetch_and_deploy_gh_release "OpenCloud" "opencloud-eu/opencloud" "singlefile" "v9.2.0" "/usr/bin" "opencloud-*-linux-$(arch_resolve)"
|
||||
mv /usr/bin/OpenCloud /usr/bin/opencloud
|
||||
|
||||
msg_info "Configuring OpenCloud"
|
||||
|
||||
@@ -83,7 +83,6 @@ for file in pialert.vendors.log pialert.IP.log pialert.1.log pialert.cleanup.log
|
||||
done
|
||||
sed -i 's#PIALERT_PATH\s*=\s*'\''/home/pi/pialert'\''#PIALERT_PATH = '\''/opt/pialert'\''#' /opt/pialert/config/pialert.conf
|
||||
sed -i 's/$HOME/\/opt/g' /opt/pialert/install/pialert.cron
|
||||
crontab /opt/pialert/install/pialert.cron
|
||||
echo "python3 /opt/pialert/back/pialert.py 1" >/usr/bin/scan
|
||||
chmod +x /usr/bin/scan
|
||||
echo "/opt/pialert/back/pialert-cli set_permissions --lxc" >/usr/bin/permissions
|
||||
@@ -96,6 +95,7 @@ msg_info "Start Pi.Alert Scan (Patience)"
|
||||
$STD python3 /opt/pialert/back/pialert.py update_vendors
|
||||
$STD python3 /opt/pialert/back/pialert.py internet_IP
|
||||
$STD python3 /opt/pialert/back/pialert.py 1
|
||||
crontab /opt/pialert/install/pialert.cron
|
||||
msg_ok "Finished Pi.Alert Scan"
|
||||
|
||||
motd_ssh
|
||||
|
||||
@@ -96,11 +96,11 @@ $STD pnpm install --frozen-lockfile
|
||||
$STD pnpm turbo run build --filter=web --filter=admin --filter=space --filter=live
|
||||
msg_ok "Built Frontend Apps"
|
||||
|
||||
PYTHON_VERSION="3.12" UV_PROJECT_DIR="/opt/plane/apps/api" setup_uv
|
||||
|
||||
msg_info "Setting up Python API"
|
||||
setup_uv
|
||||
$STD uv venv /opt/plane-venv
|
||||
export VIRTUAL_ENV=/opt/plane-venv
|
||||
$STD uv pip install -r /opt/plane/apps/api/requirements/production.txt
|
||||
cd /opt/plane/apps/api
|
||||
UV_PROJECT_ENVIRONMENT=/opt/plane-venv $STD uv sync --locked --no-default-groups --group production
|
||||
msg_ok "Set up Python API"
|
||||
|
||||
msg_info "Configuring Plane"
|
||||
|
||||
@@ -26,6 +26,8 @@ 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
|
||||
@@ -141,6 +143,24 @@ 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;
|
||||
|
||||
@@ -127,7 +127,7 @@ EOF
|
||||
msg_ok "Installed PostgreSQL"
|
||||
|
||||
prompt="${var_postgresql_adminer:-}"
|
||||
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Adminer? <y/N> " prompt
|
||||
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Adminer? <y/N> " prompt || true
|
||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||
msg_info "Installing Adminer"
|
||||
$STD apt install -y adminer
|
||||
@@ -167,7 +167,7 @@ setup_alpine() {
|
||||
msg_ok "Configured and Restarted PostgreSQL"
|
||||
|
||||
prompt="${var_postgresql_adminer:-}"
|
||||
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to install Adminer with lighttpd? <y/N>: " prompt
|
||||
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to install Adminer with lighttpd? <y/N>: " prompt || true
|
||||
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
|
||||
msg_info "Installing Adminer and dependencies"
|
||||
$STD apk add --no-cache \
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
#!/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/AnalogJ/scrutiny
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Setting up InfluxDB Repository"
|
||||
setup_deb822_repo \
|
||||
"influxdata" \
|
||||
"https://repos.influxdata.com/influxdata-archive.key" \
|
||||
"https://repos.influxdata.com/debian" \
|
||||
"stable"
|
||||
msg_ok "Set up InfluxDB Repository"
|
||||
|
||||
msg_info "Installing InfluxDB"
|
||||
$STD apt install -y influxdb2
|
||||
systemctl enable -q --now influxdb
|
||||
for _ in {1..30}; do
|
||||
curl -fsS http://127.0.0.1:8086/health >/dev/null 2>&1 && break
|
||||
sleep 1
|
||||
done
|
||||
msg_ok "Installed InfluxDB"
|
||||
|
||||
msg_info "Configuring InfluxDB"
|
||||
INFLUX_PASS="$(random_password)"
|
||||
INFLUX_TOKEN="$(random_password 48)"
|
||||
curl -fsS -X POST http://127.0.0.1:8086/api/v2/setup \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"username\":\"admin\",\"password\":\"${INFLUX_PASS}\",\"org\":\"scrutiny\",\"bucket\":\"metrics\",\"token\":\"${INFLUX_TOKEN}\"}" >/dev/null
|
||||
mkdir -p /opt/scrutiny_data
|
||||
cat <<EOT >/opt/scrutiny_data/.env
|
||||
INFLUXDB_USER=admin
|
||||
INFLUXDB_PASSWORD=${INFLUX_PASS}
|
||||
INFLUXDB_TOKEN=${INFLUX_TOKEN}
|
||||
EOT
|
||||
chmod 600 /opt/scrutiny_data/.env
|
||||
msg_ok "Configured InfluxDB"
|
||||
|
||||
fetch_and_deploy_gh_release "scrutiny" "AnalogJ/scrutiny" "singlefile" "latest" "/opt/scrutiny" "scrutiny-web-linux-$(arch_resolve "amd64" "arm64")"
|
||||
fetch_and_deploy_gh_release "scrutiny-web" "AnalogJ/scrutiny" "prebuild" "latest" "/opt/scrutiny/web" "scrutiny-web-frontend.tar.gz"
|
||||
|
||||
msg_info "Configuring Scrutiny"
|
||||
cat <<EOT >/opt/scrutiny_data/scrutiny.yaml
|
||||
version: 1
|
||||
web:
|
||||
listen:
|
||||
port: 8080
|
||||
host: 0.0.0.0
|
||||
basepath: ''
|
||||
database:
|
||||
location: /opt/scrutiny_data/scrutiny.db
|
||||
src:
|
||||
frontend:
|
||||
path: /opt/scrutiny/web
|
||||
influxdb:
|
||||
scheme: 'http'
|
||||
host: 127.0.0.1
|
||||
port: 8086
|
||||
token: '${INFLUX_TOKEN}'
|
||||
org: 'scrutiny'
|
||||
bucket: 'metrics'
|
||||
retention_policy: true
|
||||
log:
|
||||
file: ''
|
||||
level: INFO
|
||||
EOT
|
||||
chmod 600 /opt/scrutiny_data/scrutiny.yaml
|
||||
msg_ok "Configured Scrutiny"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOT >/etc/systemd/system/scrutiny.service
|
||||
[Unit]
|
||||
Description=Scrutiny
|
||||
After=network-online.target influxdb.service
|
||||
Requires=influxdb.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/scrutiny_data
|
||||
ExecStart=/opt/scrutiny/scrutiny start --config /opt/scrutiny_data/scrutiny.yaml
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOT
|
||||
systemctl enable -q --now scrutiny
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -13,7 +13,7 @@ setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
fetch_and_deploy_gh_release "stalwart" "stalwartlabs/stalwart" "prebuild" "v0.16.27" "/opt/stalwart" "stalwart-$(arch_resolve x86_64 aarch64)-unknown-linux-gnu.tar.gz"
|
||||
fetch_and_deploy_gh_release "stalwart" "stalwartlabs/stalwart" "prebuild" "latest" "/opt/stalwart" "stalwart-$(arch_resolve x86_64 aarch64)-unknown-linux-gnu.tar.gz"
|
||||
chmod +x /opt/stalwart/stalwart
|
||||
|
||||
msg_info "Configuring Stalwart"
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: lukdz
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/pingdotgg/t3code
|
||||
|
||||
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 \
|
||||
git \
|
||||
build-essential \
|
||||
bubblewrap
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
msg_info "Installing T3 Code and Provider CLIs"
|
||||
$STD npm install -g \
|
||||
t3 \
|
||||
@openai/codex \
|
||||
@anthropic-ai/claude-code \
|
||||
@xai-official/grok \
|
||||
opencode-ai
|
||||
msg_ok "Installed T3 Code and Provider CLIs"
|
||||
|
||||
fetch_and_deploy_gh_release "gh" "cli/cli" "binary"
|
||||
|
||||
msg_info "Creating Service"
|
||||
mkdir -p /opt/t3code
|
||||
cat <<EOF >/etc/systemd/system/t3code.service
|
||||
[Unit]
|
||||
Description=T3 Code Server
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
Environment=PATH=/usr/local/bin:/usr/bin:/bin
|
||||
Environment=T3CODE_TELEMETRY_ENABLED=false
|
||||
# Allow Claude Full access mode as root inside the LXC.
|
||||
Environment=IS_SANDBOX=1
|
||||
WorkingDirectory=/opt/t3code
|
||||
ExecStart=/usr/bin/t3 serve --host 0.0.0.0 --base-dir /opt/t3code
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now t3code
|
||||
for _ in {1..60}; do
|
||||
[[ -f /opt/t3code/userdata/server-runtime.json ]] && curl -s -o /dev/null http://127.0.0.1:3773 && break
|
||||
sleep 2
|
||||
done
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -89,13 +89,22 @@ esac
|
||||
|
||||
CTID_CONFIG_PATH="/etc/pve/lxc/${CTID}.conf"
|
||||
|
||||
# Skip if already configured
|
||||
grep -q "lxc.cgroup2.devices.allow: c 10:200 rwm" "$CTID_CONFIG_PATH" || echo "lxc.cgroup2.devices.allow: c 10:200 rwm" >>"$CTID_CONFIG_PATH"
|
||||
grep -q "lxc.mount.entry: /dev/net/tun" "$CTID_CONFIG_PATH" || echo "lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file" >>"$CTID_CONFIG_PATH"
|
||||
# Snapshots follow the container's own settings as [name] sections, so a line
|
||||
# appended to the file ends up in the last snapshot instead of the container.
|
||||
CONF_MAIN=$(awk '/^\[/ {exit} {print}' "$CTID_CONFIG_PATH")
|
||||
CONF_SNAPSHOTS=$(awk '/^\[/ {s=1} s' "$CTID_CONFIG_PATH")
|
||||
CONF_ADD=""
|
||||
grep -q "^lxc.cgroup2.devices.allow: c 10:200 rwm" <<<"$CONF_MAIN" || CONF_ADD+=$'\n'"lxc.cgroup2.devices.allow: c 10:200 rwm"
|
||||
grep -q "^lxc.mount.entry: /dev/net/tun" <<<"$CONF_MAIN" || CONF_ADD+=$'\n'"lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file"
|
||||
if [[ -n "$CONF_ADD" && -n "$CONF_SNAPSHOTS" ]]; then
|
||||
printf '%s%s\n\n%s\n' "$CONF_MAIN" "$CONF_ADD" "$CONF_SNAPSHOTS" >"$CTID_CONFIG_PATH"
|
||||
elif [[ -n "$CONF_ADD" ]]; then
|
||||
printf '%s\n' "${CONF_ADD#$'\n'}" >>"$CTID_CONFIG_PATH"
|
||||
fi
|
||||
|
||||
msg_info "Installing Tailscale in CT $CTID"
|
||||
|
||||
pct exec "$CTID" -- bash -c '
|
||||
$STD pct exec "$CTID" -- bash -c '
|
||||
set -e
|
||||
|
||||
# Detect OS inside container
|
||||
@@ -119,6 +128,8 @@ if [ -f /etc/alpine-release ]; then
|
||||
else
|
||||
# ── Debian / Ubuntu ──
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
# The helpers then print apt output instead of logging it inside the container.
|
||||
export VERBOSE=yes
|
||||
|
||||
# Source os-release properly (handles quoted values)
|
||||
. /etc/os-release
|
||||
@@ -130,7 +141,8 @@ else
|
||||
# Check DNS resolution using multiple methods (dig may not be installed)
|
||||
dns_check_failed=true
|
||||
if command -v dig >/dev/null 2>&1; then
|
||||
if dig +short pkgs.tailscale.com 2>/dev/null | grep -qvE "^127\.|^0\.0\.0\.0$|^$"; then
|
||||
# dig prints its own errors (";; no servers could be reached") on stdout
|
||||
if dig +short pkgs.tailscale.com 2>/dev/null | grep -E "^[0-9.]+$" | grep -qvE "^127\.|^0\.0\.0\.0$"; then
|
||||
dns_check_failed=false
|
||||
fi
|
||||
elif command -v host >/dev/null 2>&1; then
|
||||
@@ -156,6 +168,8 @@ else
|
||||
cp "$ORIG_RESOLV" "$BACKUP_RESOLV"
|
||||
echo "nameserver 1.1.1.1" >"$ORIG_RESOLV"
|
||||
fi
|
||||
RESTORE_RESOLV="[ ! -f $BACKUP_RESOLV ] || mv -f $BACKUP_RESOLV $ORIG_RESOLV"
|
||||
trap "$RESTORE_RESOLV" EXIT
|
||||
|
||||
if ! command -v curl >/dev/null 2>&1; then
|
||||
echo "[INFO] curl not found, installing..."
|
||||
@@ -166,6 +180,13 @@ else
|
||||
# Reuse the shared repository helper instead of hand-rolling the sources entry
|
||||
source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/core.func")
|
||||
source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/lib/tools.func")
|
||||
# core.func sets its own EXIT trap
|
||||
trap "$RESTORE_RESOLV" EXIT
|
||||
# A failed download is sourced as an empty file
|
||||
if ! declare -f load_functions setup_deb822_repo >/dev/null; then
|
||||
echo "[ERROR] Could not download the community-scripts helpers inside the container. Check its network and DNS." >&2
|
||||
exit 7
|
||||
fi
|
||||
load_functions
|
||||
|
||||
# Drop the legacy keyring from the pre-deb822 layout
|
||||
@@ -178,18 +199,15 @@ else
|
||||
"${VERSION_CODENAME}" \
|
||||
"main"
|
||||
|
||||
apt-get install -y tailscale >/dev/null
|
||||
|
||||
if [ -f /tmp/resolv.conf.backup ]; then
|
||||
echo "[INFO] Restoring original /etc/resolv.conf"
|
||||
mv /tmp/resolv.conf.backup /etc/resolv.conf
|
||||
fi
|
||||
apt-get install -y tailscale
|
||||
fi
|
||||
'
|
||||
|
||||
TAGS=$(awk -F': ' '/^tags:/ {print $2}' "$CTID_CONFIG_PATH")
|
||||
TAGS="${TAGS:+$TAGS; }tailscale"
|
||||
pct set "$CTID" -tags "$TAGS"
|
||||
# The tag is cosmetic; Tailscale is installed by now.
|
||||
TAGS=$(pct config "$CTID" | awk -F': ' '/^tags:/ {print $2}')
|
||||
if [[ ";${TAGS};" != *";tailscale;"* ]] && ! TAG_OUTPUT=$(pct set "$CTID" -tags "${TAGS:+$TAGS;}tailscale" 2>&1); then
|
||||
msg_warn "Could not add the tailscale tag to CT $CTID: ${TAG_OUTPUT}"
|
||||
fi
|
||||
|
||||
msg_ok "Tailscale installed on CT $CTID"
|
||||
echo -e "${YW}Reboot the container${CL}, then run 'tailscale up' inside the container to activate."
|
||||
@@ -130,6 +130,12 @@ 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
|
||||
@@ -148,7 +154,7 @@ UPDATEEOF
|
||||
echo -e "Arcane Credentials"
|
||||
echo -e "=================="
|
||||
echo -e "User: arcane"
|
||||
echo -e "Password: arcane-admin"
|
||||
echo -e "Password: ${ADMIN_PASS:-run 'docker cp arcane:/app/data/initial-admin-password - | tar -xO'}"
|
||||
echo ""
|
||||
msg_warn "On first access, you'll be prompted to change your password."
|
||||
}
|
||||
|
||||
+36
-6
@@ -49,6 +49,11 @@ if ! excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --ti
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# The failing containers' output, for the user and for the telemetry trace.
|
||||
RUN_LOG="/tmp/clean-lxcs-$(date +%Y%m%d_%H%M%S).log"
|
||||
SILENT_LOGFILE="$RUN_LOG"
|
||||
CLEAN_OUTPUT=$(mktemp)
|
||||
|
||||
function run_lxc_clean() {
|
||||
local container=$1
|
||||
header_info
|
||||
@@ -79,7 +84,19 @@ function run_lxc_clean() {
|
||||
apt -y autoclean
|
||||
apt update
|
||||
fi
|
||||
'
|
||||
' 2>&1 | tee "$CLEAN_OUTPUT"
|
||||
}
|
||||
|
||||
# record_failure <ctid> <what> [output file] - adds the output's last error line
|
||||
function record_failure() {
|
||||
local name reason=""
|
||||
name=$(pct config "$1" 2>/dev/null | awk '/^hostname:/ {print $2}' || true)
|
||||
if [[ -s "${3:-}" ]]; then
|
||||
reason=$(sed 's/\x1b\[[0-9;]*[a-zA-Z]//g; s/\r//g' "$3" | grep -E '^(E:|ERROR|Error|error)' | tail -n1 || true)
|
||||
[[ -n "$reason" ]] || reason=$(sed 's/\x1b\[[0-9;]*[a-zA-Z]//g; s/\r//g' "$3" | grep -v '^[[:space:]]*$' | tail -n1 || true)
|
||||
{ echo "CT $1${name:+ ($name)}: $2"; tail -n 20 "$3"; echo; } >>"$RUN_LOG"
|
||||
fi
|
||||
failed_containers+=("$1${name:+ ($name)}: $2${reason:+ - $reason}")
|
||||
}
|
||||
|
||||
failed_containers=()
|
||||
@@ -107,30 +124,43 @@ for container in $(pct list | awk '{if(NR>1) print $1}'); do
|
||||
continue
|
||||
fi
|
||||
|
||||
status=$(pct status "$container")
|
||||
if ! status=$(pct status "$container" 2>&1); then
|
||||
record_failure "$container" "pct status failed: $status"
|
||||
continue
|
||||
fi
|
||||
template=$(pct config "$container" | grep -q "template:" && echo "true" || echo "false")
|
||||
|
||||
if [ "$template" == "false" ] && [ "$status" == "status: stopped" ]; then
|
||||
echo -e "${BL}[Info]${GN} Starting${BL} $container ${CL} \n"
|
||||
if ! pct start "$container"; then
|
||||
failed_containers+=("$container (start)")
|
||||
if ! pct start "$container" >"$CLEAN_OUTPUT" 2>&1; then
|
||||
cat "$CLEAN_OUTPUT"
|
||||
record_failure "$container" "did not start" "$CLEAN_OUTPUT"
|
||||
continue
|
||||
fi
|
||||
echo -e "${BL}[Info]${GN} Waiting For${BL} $container${CL}${GN} To Start ${CL} \n"
|
||||
sleep 5
|
||||
run_lxc_clean "$container" || failed_containers+=("$container")
|
||||
rc=0
|
||||
run_lxc_clean "$container" || rc=$?
|
||||
[ "$rc" -eq 0 ] || record_failure "$container" "cleaning exited with $rc" "$CLEAN_OUTPUT"
|
||||
echo -e "${BL}[Info]${GN} Shutting down${BL} $container ${CL} \n"
|
||||
pct shutdown "$container" &
|
||||
elif [ "$status" == "status: running" ]; then
|
||||
run_lxc_clean "$container" || failed_containers+=("$container")
|
||||
rc=0
|
||||
run_lxc_clean "$container" || rc=$?
|
||||
[ "$rc" -eq 0 ] || record_failure "$container" "cleaning exited with $rc" "$CLEAN_OUTPUT"
|
||||
fi
|
||||
done
|
||||
|
||||
wait
|
||||
rm -f "$CLEAN_OUTPUT"
|
||||
header_info
|
||||
if [ "${#failed_containers[@]}" -gt 0 ]; then
|
||||
echo -e "${RD}Cleaning failed in these containers:${CL}"
|
||||
printf '%s\n' "${failed_containers[@]}"
|
||||
echo ""
|
||||
[ -s "$RUN_LOG" ] && echo -e "Their output: $RUN_LOG\n"
|
||||
printf -v CS_ERROR_MSG '%s; ' "${failed_containers[@]}"
|
||||
CS_ERROR_MSG="Cleaning failed in ${#failed_containers[@]} container(s): ${CS_ERROR_MSG%; }"
|
||||
exit 1
|
||||
fi
|
||||
echo -e "${GN} Finished, Selected Containers Cleaned. ${CL} \n"
|
||||
+14
-9
@@ -51,18 +51,20 @@ header_info
|
||||
echo "One moment please...\n"
|
||||
|
||||
function execute_in() {
|
||||
container=$1
|
||||
name=$(pct exec "$container" hostname)
|
||||
echo -e "${BL}[Info]${GN} Execute inside${BL} ${name}${GN} with output: ${CL}"
|
||||
if ! pct exec "$container" -- bash -c "command ${custom_command} >/dev/null 2>&1"; then
|
||||
echo -e "${BL}[Info]${GN} Skipping ${name} ${RD}$container has no command: ${custom_command}"
|
||||
else
|
||||
pct exec "$container" -- bash -c "${custom_command}" | tee
|
||||
local container=$1 name rc=0
|
||||
name=$(pct config "$container" | awk '/^hostname:/ {print $2}')
|
||||
echo -e "${BL}[Info]${GN} Execute inside${BL} ${container} (${name})${GN} with output: ${CL}"
|
||||
# Run once; a failure in one container must not end the run for the others.
|
||||
pct exec "$container" -- bash -c "${custom_command}" | tee || rc=$?
|
||||
if [ "$rc" -eq 127 ]; then
|
||||
echo -e "${BL}[Info]${RD} ${container} (${name}) has no command: ${custom_command}${CL}"
|
||||
elif [ "$rc" -ne 0 ]; then
|
||||
echo -e "${BL}[Info]${RD} Command exited with code ${rc} in ${container} (${name})${CL}"
|
||||
fi
|
||||
}
|
||||
|
||||
for container in $(pct list | awk '{if(NR>1) print $1}'); do
|
||||
if [[ " ${excluded_containers[@]} " =~ " $container " ]]; then
|
||||
if [[ " ${excluded_containers} " == *" ${container} "* ]]; then
|
||||
echo -e "${BL}[Info]${GN} Skipping ${BL}$container${CL}"
|
||||
else
|
||||
os=$(pct config "$container" | awk '/^ostype/ {print $2}')
|
||||
@@ -75,7 +77,10 @@ for container in $(pct list | awk '{if(NR>1) print $1}'); do
|
||||
template=$(pct config "$container" | grep -q "template:" && echo "true" || echo "false")
|
||||
if [ "$template" == "false" ] && [ "$status" == "status: stopped" ]; then
|
||||
echo -e "${BL}[Info]${GN} Starting${BL} $container ${CL}"
|
||||
pct start "$container"
|
||||
if ! pct start "$container"; then
|
||||
echo -e "${BL}[Info]${RD} Skipping ${container}, it did not start${CL}"
|
||||
continue
|
||||
fi
|
||||
echo -e "${BL}[Info]${GN} Waiting For${BL} $container${CL}${GN} To Start ${CL}"
|
||||
sleep 5
|
||||
execute_in "$container"
|
||||
|
||||
+11
-1
@@ -141,6 +141,7 @@ function trim_container() {
|
||||
sleep 0.5
|
||||
}
|
||||
|
||||
NOT_STARTED=()
|
||||
for LINE in "${CTLINES[@]}"; do
|
||||
CTID=$(awk '{print $1}' <<<"$LINE")
|
||||
STATUS=$(awk '{print $2}' <<<"$LINE")
|
||||
@@ -161,7 +162,13 @@ for LINE in "${CTLINES[@]}"; do
|
||||
if [[ -n "${WAS_STOPPED[$CTID]:-}" ]]; then
|
||||
header_info
|
||||
echo -e "${BL}[Info]${GN} Starting $CTID ($NAME) for trim...${CL}"
|
||||
pct start "$CTID"
|
||||
if ! start_output=$(pct start "$CTID" 2>&1); then
|
||||
echo -e "${RD}$CTID ($NAME) did not start, skipping it: ${start_output}${CL}"
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') | CTID=$CTID | Name=$NAME | skipped, did not start: ${start_output//$'\n'/ }" >>"$LOGFILE"
|
||||
NOT_STARTED+=("$CTID ($NAME)")
|
||||
sleep 1
|
||||
continue
|
||||
fi
|
||||
sleep 2
|
||||
else
|
||||
header_info
|
||||
@@ -189,6 +196,9 @@ for LINE in "${CTLINES[@]}"; do
|
||||
done
|
||||
|
||||
header_info
|
||||
if [ ${#NOT_STARTED[@]} -gt 0 ]; then
|
||||
echo -e "${RD}Not trimmed, did not start: ${NOT_STARTED[*]}${CL}\n"
|
||||
fi
|
||||
echo -e "${GN}Finished, LXC Containers Trimmed.${CL} \n"
|
||||
echo -e "${BL}If you want to see the complete log: cat $LOGFILE${CL}"
|
||||
exit 0
|
||||
@@ -0,0 +1,164 @@
|
||||
#!/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/AnalogJ/scrutiny
|
||||
|
||||
source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/core.func")
|
||||
source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/api/api.func") 2>/dev/null || true
|
||||
source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/lib/tools.func")
|
||||
load_functions
|
||||
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "scrutiny-collector" "pve"
|
||||
|
||||
set -Eeuo pipefail
|
||||
|
||||
APP="Scrutiny-Collector"
|
||||
APP_TYPE="tools"
|
||||
BIN_DIR="/usr/local/bin"
|
||||
# TrueNAS SCALE mounts /usr read-only.
|
||||
[[ -w "$BIN_DIR" ]] || BIN_DIR="/var/lib/scrutiny"
|
||||
BIN="${BIN_DIR}/scrutiny-collector-metrics"
|
||||
CONFIG_DIR="/etc/scrutiny"
|
||||
CONFIG="${CONFIG_DIR}/collector.yaml"
|
||||
SERVICE="scrutiny-collector"
|
||||
REPO="AnalogJ/scrutiny"
|
||||
|
||||
header_info
|
||||
|
||||
function require_tool() {
|
||||
local cmd="$1" pkg="$2"
|
||||
command -v "$cmd" &>/dev/null && return 0
|
||||
# TrueNAS SCALE replaces apt with a stub that refuses to run.
|
||||
if ! apt-get --version &>/dev/null; then
|
||||
msg_error "${cmd} is missing and apt cannot install ${pkg} on this host. Install ${pkg}, then run this again."
|
||||
exit 1
|
||||
fi
|
||||
msg_info "Installing ${pkg}"
|
||||
if ! $STD apt install -y "$pkg"; then
|
||||
msg_error "apt could not install ${pkg}. Run 'apt install ${pkg}' to see why."
|
||||
exit 1
|
||||
fi
|
||||
msg_ok "Installed ${pkg}"
|
||||
}
|
||||
|
||||
if [[ "$(id -u)" -ne 0 ]]; then
|
||||
msg_error "Run this as root (sudo) on the machine that has the disks."
|
||||
exit 1
|
||||
fi
|
||||
if systemd-detect-virt -cq 2>/dev/null; then
|
||||
msg_warn "This looks like a container: only disks passed through to it can be read."
|
||||
fi
|
||||
require_tool whiptail whiptail
|
||||
|
||||
function deploy_binary() {
|
||||
# uname, not dpkg: the dpkg stub on TrueNAS SCALE prints a notice that would be read as the architecture.
|
||||
fetch_and_deploy_gh_release "scrutiny-collector-metrics" "$REPO" "singlefile" "latest" "$BIN_DIR" "scrutiny-collector-metrics-linux-$(PCT_ARCH="$(uname -m)" arch_resolve "amd64" "arm64")"
|
||||
# Only catch_errors' on_exit clears this marker, and tools run without it.
|
||||
rm -f ~/.scrutiny-collector-metrics.pending
|
||||
}
|
||||
|
||||
function install_collector() {
|
||||
local url="${var_scrutiny_url:-}"
|
||||
while true; do
|
||||
if [[ -z "$url" ]]; then
|
||||
url=$(whiptail --backtitle "Community Scripts" --title "Scrutiny URL" \
|
||||
--inputbox "URL of your Scrutiny web UI, e.g. http://192.168.1.50:8080" 10 64 "" 3>&1 1>&2 2>&3)
|
||||
fi
|
||||
url="${url%/}"
|
||||
[[ "$url" =~ ^https?://[A-Za-z0-9._-]+(:[0-9]{1,5})?(/.*)?$ ]] && break
|
||||
whiptail --backtitle "Community Scripts" --title "Scrutiny URL" \
|
||||
--msgbox "'${url}' is not a valid URL. Use http(s)://host:port" 8 64
|
||||
url=""
|
||||
done
|
||||
|
||||
if ! curl -fsS --max-time 5 "${url}/api/health" &>/dev/null; then
|
||||
msg_warn "Scrutiny does not answer at ${url}/api/health yet; the collector will retry every 15 minutes."
|
||||
fi
|
||||
|
||||
require_tool smartctl smartmontools
|
||||
msg_ok "Using $(smartctl --version 2>/dev/null | awk 'NR==1 {print $1, $2}')"
|
||||
|
||||
deploy_binary
|
||||
|
||||
msg_info "Configuring ${APP}"
|
||||
mkdir -p "$CONFIG_DIR"
|
||||
cat <<EOF >"$CONFIG"
|
||||
version: 1
|
||||
host:
|
||||
id: "$(hostname)"
|
||||
api:
|
||||
endpoint: "${url}"
|
||||
EOF
|
||||
cat <<EOF >/etc/systemd/system/${SERVICE}.service
|
||||
[Unit]
|
||||
Description=Scrutiny S.M.A.R.T. collector
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=${BIN} run --config ${CONFIG}
|
||||
EOF
|
||||
cat <<EOF >/etc/systemd/system/${SERVICE}.timer
|
||||
[Unit]
|
||||
Description=Run the Scrutiny collector every 15 minutes
|
||||
|
||||
[Timer]
|
||||
OnBootSec=2min
|
||||
OnUnitActiveSec=15min
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
EOF
|
||||
systemctl daemon-reload
|
||||
systemctl enable -q --now ${SERVICE}.timer
|
||||
systemctl start --no-block ${SERVICE}.service
|
||||
msg_ok "Configured ${APP}"
|
||||
|
||||
echo ""
|
||||
msg_ok "The disks of $(hostname) show up in Scrutiny at ${BL}${url}${CL} after the first run."
|
||||
msg_ok "Follow it with: ${BL}journalctl -u ${SERVICE} -f${CL}"
|
||||
if command -v midclt &>/dev/null; then
|
||||
msg_warn "A TrueNAS update replaces /etc and /var, which removes the collector: run this again after each update."
|
||||
fi
|
||||
}
|
||||
|
||||
function update_collector() {
|
||||
if check_for_gh_release "scrutiny-collector-metrics" "$REPO"; then
|
||||
deploy_binary
|
||||
msg_ok "Updated ${APP}"
|
||||
else
|
||||
msg_ok "${APP} is already up-to-date"
|
||||
fi
|
||||
}
|
||||
|
||||
function uninstall_collector() {
|
||||
msg_info "Removing ${APP}"
|
||||
systemctl disable -q --now ${SERVICE}.timer 2>/dev/null || true
|
||||
systemctl stop ${SERVICE}.service 2>/dev/null || true
|
||||
rm -f /etc/systemd/system/${SERVICE}.service /etc/systemd/system/${SERVICE}.timer "$BIN" ~/.scrutiny-collector-metrics
|
||||
rm -rf "$CONFIG_DIR"
|
||||
[[ "$BIN_DIR" == /usr/local/bin ]] || rmdir "$BIN_DIR" 2>/dev/null || true
|
||||
systemctl daemon-reload
|
||||
msg_ok "Removed ${APP} (smartmontools stays installed)"
|
||||
}
|
||||
|
||||
ACTION="${1:-}"
|
||||
if [[ -z "$ACTION" && -x "$BIN" ]]; then
|
||||
ACTION=$(whiptail --backtitle "Community Scripts" --title "${APP}" \
|
||||
--menu "The Scrutiny collector is installed on this host." 12 58 2 \
|
||||
"update" "Update the collector binary" \
|
||||
"uninstall" "Remove the collector" 3>&1 1>&2 2>&3)
|
||||
fi
|
||||
|
||||
case "${ACTION:-install}" in
|
||||
install) install_collector ;;
|
||||
update) update_collector ;;
|
||||
uninstall) uninstall_collector ;;
|
||||
*)
|
||||
msg_error "Unknown action '${ACTION}'. Use install, update or uninstall."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -275,7 +275,8 @@ function dry_run_container() {
|
||||
function failure_reason() {
|
||||
local reason
|
||||
reason=$(grep -m1 '^ERROR:' <<<"$1" | sed 's/^ERROR: //')
|
||||
[[ -n "$reason" ]] || reason=$(grep -v '^[[:space:]]*$' <<<"$1" | tail -n1)
|
||||
# A rejected option ends in the usage line, the option's error is above it.
|
||||
[[ -n "$reason" ]] || reason=$(grep -v -e '^[[:space:]]*$' -e '\[OPTIONS\]$' <<<"$1" | tail -n1)
|
||||
printf '%s' "$reason"
|
||||
}
|
||||
|
||||
@@ -286,6 +287,11 @@ function backup_container() {
|
||||
msg_ok "Backup created"
|
||||
else
|
||||
log_write "Container $1: vzdump failed:"$'\n'"$output"
|
||||
# Ctrl+C, or the task was stopped: the backup did not fail, it was cancelled.
|
||||
if grep -q "interrupted by signal" <<<"$output"; then
|
||||
msg_error "Backup of container $1 was interrupted (Ctrl+C or the task was stopped)"
|
||||
exit 130
|
||||
fi
|
||||
msg_error "Backup failed for container $1: $(failure_reason "$output")"
|
||||
exit 235
|
||||
fi
|
||||
|
||||
@@ -48,6 +48,11 @@ while read -r TAG ITEM; do
|
||||
done < <(pct list | awk 'NR>1')
|
||||
excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --checklist "\nSelect containers to skip from updates:\n" 16 $((MSG_MAX_LENGTH + 23)) 6 "${EXCLUDE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"')
|
||||
|
||||
# The failing containers' output, for the user and for the telemetry trace.
|
||||
RUN_LOG="/tmp/update-lxcs-$(date +%Y%m%d_%H%M%S).log"
|
||||
SILENT_LOGFILE="$RUN_LOG"
|
||||
UPDATE_OUTPUT=$(mktemp)
|
||||
|
||||
function needs_reboot() {
|
||||
local container=$1
|
||||
local os=$(pct config "$container" | awk '/^ostype/ {print $2}')
|
||||
@@ -78,9 +83,21 @@ function update_container() {
|
||||
alpine) pct exec "$container" -- ash -c "apk -U upgrade" ;;
|
||||
archlinux) pct exec "$container" -- bash -c "pacman -Syyu --noconfirm" ;;
|
||||
fedora | rocky | centos | alma) pct exec "$container" -- bash -c "dnf -y update && dnf -y upgrade" ;;
|
||||
ubuntu | debian | devuan) pct exec "$container" -- bash -c "apt-get update 2>/dev/null | grep 'packages.*upgraded'; apt list --upgradable 2>/dev/null | cat && apt-get -yq dist-upgrade 2>&1; apt-get -yq autoremove 2>&1; apt-get -yq autoclean 2>&1; rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED || true" ;;
|
||||
ubuntu | debian | devuan) pct exec "$container" -- bash -c "apt-get update 2>/dev/null | grep 'packages.*upgraded'; apt list --upgradable 2>/dev/null | cat && apt-get -yq dist-upgrade 2>&1; rc=\$?; apt-get -yq autoremove 2>&1; apt-get -yq autoclean 2>&1; rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED; exit \$rc" ;;
|
||||
opensuse) pct exec "$container" -- bash -c "zypper ref && zypper --non-interactive dup" ;;
|
||||
esac
|
||||
esac 2>&1 | tee "$UPDATE_OUTPUT"
|
||||
}
|
||||
|
||||
# record_failure <ctid> <what> [output file] - adds the output's last error line
|
||||
function record_failure() {
|
||||
local name reason=""
|
||||
name=$(pct config "$1" 2>/dev/null | awk '/^hostname:/ {print $2}' || true)
|
||||
if [[ -s "${3:-}" ]]; then
|
||||
reason=$(sed 's/\x1b\[[0-9;]*[a-zA-Z]//g; s/\r//g' "$3" | grep -E '^(E:|ERROR|Error|error)' | tail -n1 || true)
|
||||
[[ -n "$reason" ]] || reason=$(sed 's/\x1b\[[0-9;]*[a-zA-Z]//g; s/\r//g' "$3" | grep -v '^[[:space:]]*$' | tail -n1 || true)
|
||||
{ echo "CT $1${name:+ ($name)}: $2"; tail -n 20 "$3"; echo; } >>"$RUN_LOG"
|
||||
fi
|
||||
failed_containers+=("$1${name:+ ($name)}: $2${reason:+ - $reason}")
|
||||
}
|
||||
|
||||
containers_needing_reboot=()
|
||||
@@ -92,7 +109,10 @@ for container in $(pct list | awk '{if(NR>1) print $1}'); do
|
||||
echo -e "${BL}[Info]${GN} Skipping ${BL}$container${CL}"
|
||||
sleep 1
|
||||
else
|
||||
status=$(pct status $container)
|
||||
if ! status=$(pct status "$container" 2>&1); then
|
||||
record_failure "$container" "pct status failed: $status"
|
||||
continue
|
||||
fi
|
||||
if [ "$SKIP_STOPPED" == "yes" ] && [ "$status" == "status: stopped" ]; then
|
||||
header_info
|
||||
echo -e "${BL}[Info]${GN} Skipping ${BL}$container${CL}${GN} (not running)${CL}"
|
||||
@@ -102,17 +122,22 @@ for container in $(pct list | awk '{if(NR>1) print $1}'); do
|
||||
template=$(pct config $container | grep -q "template:" && echo "true" || echo "false")
|
||||
if [ "$template" == "false" ] && [ "$status" == "status: stopped" ]; then
|
||||
echo -e "${BL}[Info]${GN} Starting${BL} $container ${CL} \n"
|
||||
if ! pct start $container; then
|
||||
failed_containers+=("$container (start)")
|
||||
if ! pct start "$container" >"$UPDATE_OUTPUT" 2>&1; then
|
||||
cat "$UPDATE_OUTPUT"
|
||||
record_failure "$container" "did not start" "$UPDATE_OUTPUT"
|
||||
continue
|
||||
fi
|
||||
echo -e "${BL}[Info]${GN} Waiting For${BL} $container${CL}${GN} To Start ${CL} \n"
|
||||
sleep 5
|
||||
update_container $container || failed_containers+=("$container")
|
||||
rc=0
|
||||
update_container "$container" || rc=$?
|
||||
[ "$rc" -eq 0 ] || record_failure "$container" "update exited with $rc" "$UPDATE_OUTPUT"
|
||||
echo -e "${BL}[Info]${GN} Shutting down${BL} $container ${CL} \n"
|
||||
pct shutdown $container &
|
||||
elif [ "$status" == "status: running" ]; then
|
||||
update_container $container || failed_containers+=("$container")
|
||||
rc=0
|
||||
update_container "$container" || rc=$?
|
||||
[ "$rc" -eq 0 ] || record_failure "$container" "update exited with $rc" "$UPDATE_OUTPUT"
|
||||
fi
|
||||
if [ "$status" == "status: running" ]; then
|
||||
if pct exec "$container" -- [ -e "/var/run/reboot-required" ]; then
|
||||
@@ -129,11 +154,13 @@ for container in $(pct list | awk '{if(NR>1) print $1}'); do
|
||||
fi
|
||||
done
|
||||
wait
|
||||
rm -f "$UPDATE_OUTPUT"
|
||||
header_info
|
||||
if [ "${#failed_containers[@]}" -gt 0 ]; then
|
||||
echo -e "${RD}The update failed in these containers:${CL}"
|
||||
printf '%s\n' "${failed_containers[@]}"
|
||||
echo ""
|
||||
[ -s "$RUN_LOG" ] && echo -e "Their output: $RUN_LOG\n"
|
||||
else
|
||||
echo -e "${GN}The process is complete, and the containers have been successfully updated.${CL}\n"
|
||||
fi
|
||||
@@ -144,4 +171,8 @@ if [ "${#containers_needing_reboot[@]}" -gt 0 ]; then
|
||||
done
|
||||
fi
|
||||
echo ""
|
||||
[ "${#failed_containers[@]}" -eq 0 ] || exit 1
|
||||
if [ "${#failed_containers[@]}" -gt 0 ]; then
|
||||
printf -v CS_ERROR_MSG '%s; ' "${failed_containers[@]}"
|
||||
CS_ERROR_MSG="Update failed in ${#failed_containers[@]} container(s): ${CS_ERROR_MSG%; }"
|
||||
exit 1
|
||||
fi
|
||||
Reference in new issue
Block a user