mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-08-26 18:15:49 +00:00
Compare commits
1 Commits
fix-scanop
...
add-script
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bd878edc18 |
209
.github/workflows/pocketbase-bot.yml
generated
vendored
209
.github/workflows/pocketbase-bot.yml
generated
vendored
@@ -33,10 +33,6 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
FRONTEND_URL: ${{ secrets.FRONTEND_URL }}
|
||||
REVALIDATE_SECRET: ${{ secrets.REVALIDATE_SECRET }}
|
||||
# Screenshot attaching is delegated to the frontend, which owns the
|
||||
# fetching and validation. Without this the subcommand says so rather
|
||||
# than failing halfway.
|
||||
SCREENSHOT_IMPORT_SECRET: ${{ secrets.SCREENSHOT_IMPORT_SECRET }}
|
||||
run: |
|
||||
node << 'ENDSCRIPT'
|
||||
(async function () {
|
||||
@@ -327,21 +323,11 @@ jobs:
|
||||
'/pocketbase <slug> method remove <type>\n' +
|
||||
'```\n' +
|
||||
'Method fields: `cpu` `ram` `hdd` `os` `version` `config_path` `script`\n\n' +
|
||||
'`cpu` `ram` `hdd` `os` `version` also work without `method` — they go to the\n' +
|
||||
'default install method, e.g. `/pocketbase <slug> hdd=25`\n\n' +
|
||||
'**Editable fields:** `name` `description` `logo` `documentation` `website` `project_url` `repository` ' +
|
||||
'`config_path` `port` `default_user` `default_passwd` ' +
|
||||
'`updateable` `privileged` `is_dev` `has_arm` ' +
|
||||
'`updateable` `privileged` `is_dev` ' +
|
||||
'`architectures` (amd64,arm64) `platforms` (pve,incus) ' +
|
||||
'`execute_in` (pve,lxc,pbs,vm,pmg,pdm) `categories` (names or ids) ' +
|
||||
'`type` (ct, vm, addon, …) ' +
|
||||
'`is_disabled` `disable_message` `is_deleted` `deleted_message`\n\n' +
|
||||
'**Screenshots:**\n' +
|
||||
'```\n' +
|
||||
'/pocketbase <slug> screenshot https://example.com/one.png https://example.com/two.png\n' +
|
||||
'```\n\n' +
|
||||
'`slug` is deliberately not editable: it is the URL, the JSON filename and the\n' +
|
||||
'ct/<slug>.sh path all at once, so renaming it is a migration rather than an edit.';
|
||||
'`is_disabled` `disable_message` `is_deleted` `deleted_message`';
|
||||
|
||||
if (!withoutCmd) {
|
||||
await addReaction('-1');
|
||||
@@ -504,7 +490,6 @@ jobs:
|
||||
const noteMatch = rest.match(/^note\s+(list|add|edit|remove)\b/i);
|
||||
const methodMatch = rest.match(/^method\b/i);
|
||||
const setMatch = rest.match(/^set\s+(\S+)/i);
|
||||
const shotMatch = rest.match(/^screenshots?\s+(.+)$/i);
|
||||
|
||||
if (infoMatch) {
|
||||
// ── INFO SUBCOMMAND ──────────────────────────────────────────────
|
||||
@@ -550,44 +535,6 @@ jobs:
|
||||
await addReaction('+1');
|
||||
await postComment(out.join('\n'));
|
||||
|
||||
} else if (shotMatch) {
|
||||
// ── SCREENSHOT SUBCOMMAND ────────────────────────────────────────
|
||||
// Delegated to the frontend rather than reimplemented here: it
|
||||
// already fetches the URL, checks the content type and size, and
|
||||
// attaches the file to PocketBase. Doing that a second time in a
|
||||
// workflow would be a second set of bugs.
|
||||
const shotUrls = shotMatch[1].split(/[\s,]+/).map(function (u) { return u.trim(); }).filter(Boolean);
|
||||
const bad = shotUrls.filter(function (u) { return !/^https?:\/\//i.test(u); });
|
||||
if (bad.length > 0) {
|
||||
await addReaction('-1');
|
||||
await postComment('❌ **PocketBase Bot**: not a URL: `' + bad.join('`, `') + '`');
|
||||
process.exit(0);
|
||||
}
|
||||
const frontendUrl = process.env.FRONTEND_URL;
|
||||
const shotSecret = process.env.SCREENSHOT_IMPORT_SECRET;
|
||||
if (!frontendUrl || !shotSecret) {
|
||||
await addReaction('-1');
|
||||
await postComment('❌ **PocketBase Bot**: screenshot import is not configured (FRONTEND_URL / SCREENSHOT_IMPORT_SECRET).');
|
||||
process.exit(1);
|
||||
}
|
||||
const shotRes = await request(frontendUrl.replace(/\/$/, '') + '/api/screenshots', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ slug: slug, secret: shotSecret, urls: shotUrls })
|
||||
});
|
||||
if (!shotRes.ok) {
|
||||
await addReaction('-1');
|
||||
await postComment('❌ **PocketBase Bot**: screenshot import failed:\n```\n' + shotRes.body + '\n```');
|
||||
process.exit(1);
|
||||
}
|
||||
await revalidate(slug);
|
||||
await addReaction('+1');
|
||||
await postComment(
|
||||
'✅ **PocketBase Bot**: attached ' + shotUrls.length + ' screenshot' + (shotUrls.length === 1 ? '' : 's') +
|
||||
' to **`' + slug + '`**\n\n' + shotUrls.map(function (u) { return '- ' + u; }).join('\n') +
|
||||
'\n\n*Executed by @' + actor + '*'
|
||||
);
|
||||
|
||||
} else if (noteMatch) {
|
||||
// ── NOTE SUBCOMMAND ──────────────────────────────────────────────
|
||||
const noteAction = noteMatch[1].toLowerCase();
|
||||
@@ -891,20 +838,15 @@ jobs:
|
||||
} else if (setMatch) {
|
||||
// ── SET SUBCOMMAND (value from code block) ───────────────────────
|
||||
const fieldName = setMatch[1].toLowerCase();
|
||||
// app_vars is a JSON column, so it rides the code-block path like
|
||||
// the long text fields - but its content is parsed, not stored
|
||||
// verbatim, or PocketBase ends up with a string where an object
|
||||
// belongs and every reader has to guess.
|
||||
const SET_ALLOWED = {
|
||||
name: 'string', description: 'string', logo: 'string',
|
||||
documentation: 'string', website: 'string', project_url: 'string', repository: 'string',
|
||||
config_path: 'string', disable_message: 'string', deleted_message: 'string',
|
||||
app_vars: 'json'
|
||||
config_path: 'string', disable_message: 'string', deleted_message: 'string'
|
||||
};
|
||||
if (!SET_ALLOWED[fieldName]) {
|
||||
await addReaction('-1');
|
||||
await postComment(
|
||||
'❌ **PocketBase Bot**: `set` only supports text and JSON fields.\n\n' +
|
||||
'❌ **PocketBase Bot**: `set` only supports text fields.\n\n' +
|
||||
'**Allowed:** `' + Object.keys(SET_ALLOWED).join('`, `') + '`\n\n' +
|
||||
'For boolean/number fields use `field=value` syntax instead.'
|
||||
);
|
||||
@@ -919,21 +861,7 @@ jobs:
|
||||
process.exit(0);
|
||||
}
|
||||
const setPayload = {};
|
||||
if (SET_ALLOWED[fieldName] === 'json') {
|
||||
let parsedJson;
|
||||
try {
|
||||
parsedJson = JSON.parse(codeBlockValue);
|
||||
} catch (e) {
|
||||
await addReaction('-1');
|
||||
await postComment(
|
||||
'❌ **PocketBase Bot**: `' + fieldName + '` must be valid JSON.\n\n```\n' + e.message + '\n```'
|
||||
);
|
||||
process.exit(0);
|
||||
}
|
||||
setPayload[fieldName] = parsedJson;
|
||||
} else {
|
||||
setPayload[fieldName] = codeBlockValue;
|
||||
}
|
||||
setPayload[fieldName] = codeBlockValue;
|
||||
const setPatchRes = await request(recordsUrl + '/' + record.id, {
|
||||
method: 'PATCH',
|
||||
headers: { 'Authorization': token, 'Content-Type': 'application/json' },
|
||||
@@ -973,10 +901,6 @@ jobs:
|
||||
privileged: 'boolean',
|
||||
architectures: 'select_list',
|
||||
platforms: 'select_list',
|
||||
execute_in: 'select_list',
|
||||
has_arm: 'boolean',
|
||||
categories: 'relation_list',
|
||||
type: 'relation_single',
|
||||
is_dev: 'boolean',
|
||||
is_disabled: 'boolean',
|
||||
disable_message: 'string',
|
||||
@@ -986,18 +910,7 @@ jobs:
|
||||
|
||||
const parsedFields = parseKVPairs(rest);
|
||||
|
||||
// cpu/ram/hdd/os/version live inside install_methods, not on the
|
||||
// record itself. "/pocketbase immich hdd=25" is how people ask for
|
||||
// it, so route those keys there instead of rejecting them as
|
||||
// unknown fields. Everything else stays a plain record field.
|
||||
const TOP_RESOURCE_KEYS = { cpu: 'number', ram: 'number', hdd: 'number', os: 'string', version: 'string' };
|
||||
const resourceFields = {};
|
||||
const scriptFields = {};
|
||||
for (const [rk, rv] of Object.entries(parsedFields)) {
|
||||
if (TOP_RESOURCE_KEYS[rk]) resourceFields[rk] = rv; else scriptFields[rk] = rv;
|
||||
}
|
||||
|
||||
const unknownFields = Object.keys(scriptFields).filter(function (f) { return !ALLOWED_FIELDS[f]; });
|
||||
const unknownFields = Object.keys(parsedFields).filter(function (f) { return !ALLOWED_FIELDS[f]; });
|
||||
if (unknownFields.length > 0) {
|
||||
await addReaction('-1');
|
||||
await postComment(
|
||||
@@ -1017,10 +930,9 @@ jobs:
|
||||
const SELECT_VALUES = {
|
||||
architectures: ['amd64', 'arm64'],
|
||||
platforms: ['pve', 'incus'],
|
||||
execute_in: ['pve', 'lxc', 'pbs', 'vm', 'pmg', 'pdm'],
|
||||
};
|
||||
const payload = {};
|
||||
for (const [key, rawVal] of Object.entries(scriptFields)) {
|
||||
for (const [key, rawVal] of Object.entries(parsedFields)) {
|
||||
const type = ALLOWED_FIELDS[key];
|
||||
if (type === 'boolean') {
|
||||
if (rawVal === 'true') payload[key] = true;
|
||||
@@ -1050,65 +962,6 @@ jobs:
|
||||
process.exit(0);
|
||||
}
|
||||
payload[key] = values;
|
||||
} else if (type === 'relation_list') {
|
||||
// categories is a relation, so the stored value is a list of
|
||||
// record ids. People write category names, so resolve them —
|
||||
// and accept ids too, which is what a copy out of the
|
||||
// PocketBase UI gives you.
|
||||
const wanted = rawVal.split(',').map(function (v) { return v.trim(); }).filter(Boolean);
|
||||
const catRes = await request(apiBase + '/collections/script_categories/records?perPage=500&fields=id,name', {
|
||||
headers: { 'Authorization': token }
|
||||
});
|
||||
if (!catRes.ok) {
|
||||
await addReaction('-1');
|
||||
await postComment('❌ **PocketBase Bot**: could not read `script_categories` to resolve `' + key + '`.');
|
||||
process.exit(1);
|
||||
}
|
||||
const cats = JSON.parse(catRes.body).items || [];
|
||||
const byName = {};
|
||||
const ids = {};
|
||||
cats.forEach(function (c) { byName[String(c.name).toLowerCase()] = c.id; ids[c.id] = true; });
|
||||
const resolved = [];
|
||||
const unknownCats = [];
|
||||
wanted.forEach(function (w) {
|
||||
if (ids[w]) { resolved.push(w); return; }
|
||||
const id = byName[w.toLowerCase()];
|
||||
if (id) resolved.push(id); else unknownCats.push(w);
|
||||
});
|
||||
if (unknownCats.length > 0) {
|
||||
await addReaction('-1');
|
||||
await postComment(
|
||||
'❌ **PocketBase Bot**: unknown ' + key + ': `' + unknownCats.join('`, `') + '`\n\n' +
|
||||
'**Available:** `' + cats.map(function (c) { return c.name; }).sort().join('`, `') + '`'
|
||||
);
|
||||
process.exit(0);
|
||||
}
|
||||
payload[key] = resolved;
|
||||
} else if (type === 'relation_single') {
|
||||
// type points at one z_ref_script_types record. People write
|
||||
// "ct" or "vm", not a 15-character id.
|
||||
const typeRes = await request(apiBase + '/collections/z_ref_script_types/records?perPage=200&fields=id,type', {
|
||||
headers: { 'Authorization': token }
|
||||
});
|
||||
if (!typeRes.ok) {
|
||||
await addReaction('-1');
|
||||
await postComment('❌ **PocketBase Bot**: could not read `z_ref_script_types` to resolve `' + key + '`.');
|
||||
process.exit(1);
|
||||
}
|
||||
const types = JSON.parse(typeRes.body).items || [];
|
||||
const wantType = rawVal.trim().toLowerCase();
|
||||
const hit = types.find(function (t) {
|
||||
return t.id === rawVal.trim() || String(t.type).toLowerCase() === wantType;
|
||||
});
|
||||
if (!hit) {
|
||||
await addReaction('-1');
|
||||
await postComment(
|
||||
'❌ **PocketBase Bot**: unknown type `' + rawVal + '`\n\n' +
|
||||
'**Available:** `' + types.map(function (t) { return t.type; }).sort().join('`, `') + '`'
|
||||
);
|
||||
process.exit(0);
|
||||
}
|
||||
payload[key] = hit.id;
|
||||
} else if (type === 'nullable_string') {
|
||||
payload[key] = rawVal === '' ? null : rawVal;
|
||||
} else {
|
||||
@@ -1116,42 +969,6 @@ jobs:
|
||||
}
|
||||
}
|
||||
|
||||
// Resources go into install_methods. Which method: the only one if
|
||||
// there is only one, otherwise the non-Alpine default — and the
|
||||
// reply says which, so nobody has to guess where 25 GB landed.
|
||||
const resourceKeys = Object.keys(resourceFields);
|
||||
let resourceTargetType = null;
|
||||
if (resourceKeys.length > 0) {
|
||||
const methodsArr = readJsonBlob(record.install_methods) || [];
|
||||
if (methodsArr.length === 0) {
|
||||
await addReaction('-1');
|
||||
await postComment(
|
||||
'❌ **PocketBase Bot**: `' + slug + '` has no install methods, so there is nowhere to put `' +
|
||||
resourceKeys.join('`, `') + '`.\n\nAdd one first: `/pocketbase ' + slug + ' method add default cpu=2 ram=2048 hdd=8`'
|
||||
);
|
||||
process.exit(0);
|
||||
}
|
||||
let target = methodsArr.find(function (m) {
|
||||
return String(m.type || '').toLowerCase() !== 'alpine';
|
||||
}) || methodsArr[0];
|
||||
resourceTargetType = target.type || 'default';
|
||||
if (!target.resources) target.resources = {};
|
||||
for (const [rk, rv] of Object.entries(resourceFields)) {
|
||||
if (TOP_RESOURCE_KEYS[rk] === 'number') {
|
||||
const n = parseInt(rv, 10);
|
||||
if (isNaN(n)) {
|
||||
await addReaction('-1');
|
||||
await postComment('❌ **PocketBase Bot**: `' + rk + '` must be a number, got: `' + rv + '`');
|
||||
process.exit(0);
|
||||
}
|
||||
target.resources[rk] = n;
|
||||
} else {
|
||||
target.resources[rk] = rv;
|
||||
}
|
||||
}
|
||||
payload.install_methods = methodsArr;
|
||||
}
|
||||
|
||||
const patchRes = await request(recordsUrl + '/' + record.id, {
|
||||
method: 'PATCH',
|
||||
headers: { 'Authorization': token, 'Content-Type': 'application/json' },
|
||||
@@ -1164,16 +981,10 @@ jobs:
|
||||
}
|
||||
await revalidate(slug);
|
||||
const FIELD_TO_CT_VAR = { tags: 'var_tags', unprivileged: 'var_unprivileged' };
|
||||
const RESOURCE_CT_VAR = { cpu: 'var_cpu', ram: 'var_ram', hdd: 'var_disk', os: 'var_os', version: 'var_version' };
|
||||
const fieldCtChanges = {};
|
||||
for (const [k, v] of Object.entries(payload)) {
|
||||
if (FIELD_TO_CT_VAR[k]) fieldCtChanges[FIELD_TO_CT_VAR[k]] = v;
|
||||
}
|
||||
// Resources belong in the CT script too, exactly as the `method`
|
||||
// path syncs them - otherwise PocketBase and ct/<slug>.sh drift.
|
||||
for (const [k, v] of Object.entries(resourceFields)) {
|
||||
if (RESOURCE_CT_VAR[k]) fieldCtChanges[RESOURCE_CT_VAR[k]] = v;
|
||||
}
|
||||
let fieldCtSync = null;
|
||||
try {
|
||||
fieldCtSync = await upsertCtDefaultsPr(slug, fieldCtChanges);
|
||||
@@ -1181,14 +992,8 @@ jobs:
|
||||
fieldCtSync = { status: 'skipped', reason: 'CT sync failed: ' + e.message };
|
||||
}
|
||||
await addReaction('+1');
|
||||
// install_methods is skipped here: dumping the whole array as JSON
|
||||
// buries the one number that actually changed.
|
||||
const changesLines = Object.entries(payload)
|
||||
.filter(function (e) { return e[0] !== 'install_methods'; })
|
||||
.map(function ([k, v]) { return '- `' + k + '` → `' + JSON.stringify(v) + '`'; })
|
||||
.concat(Object.entries(resourceFields).map(function ([k, v]) {
|
||||
return '- `' + k + '` → `' + v + '` *(install method `' + resourceTargetType + '`)*';
|
||||
}))
|
||||
.join('\n');
|
||||
await postComment(
|
||||
'✅ **PocketBase Bot**: Updated **`' + slug + '`** successfully!\n\n' +
|
||||
|
||||
14
CHANGELOG.md
14
CHANGELOG.md
@@ -531,19 +531,7 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- CentOS ([#16772](https://github.com/community-scripts/ProxmoxVE/pull/16772))
|
||||
- AlmaLinux ([#16771](https://github.com/community-scripts/ProxmoxVE/pull/16771))
|
||||
- Fedora ([#16770](https://github.com/community-scripts/ProxmoxVE/pull/16770))
|
||||
- Devuan ([#16773](https://github.com/community-scripts/ProxmoxVE/pull/16773))
|
||||
- OpenEuler ([#16774](https://github.com/community-scripts/ProxmoxVE/pull/16774))
|
||||
- Gentoo ([#16775](https://github.com/community-scripts/ProxmoxVE/pull/16775))
|
||||
- openSUSE ([#16776](https://github.com/community-scripts/ProxmoxVE/pull/16776))
|
||||
- Directus ([#16779](https://github.com/community-scripts/ProxmoxVE/pull/16779))
|
||||
- HAProxy ([#16760](https://github.com/community-scripts/ProxmoxVE/pull/16760))
|
||||
|
||||
### 📂 Github
|
||||
|
||||
- github: teach the PocketBase bot every field [@MickLesk](https://github.com/MickLesk) ([#16781](https://github.com/community-scripts/ProxmoxVE/pull/16781))
|
||||
- HAProxy ([#16760](https://github.com/community-scripts/ProxmoxVE/pull/16760))
|
||||
|
||||
## 2026-08-25
|
||||
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||
_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://almalinux.org/
|
||||
|
||||
APP="AlmaLinux"
|
||||
var_tags="${var_tags:-os}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-512}"
|
||||
var_disk="${var_disk:-4}"
|
||||
var_os="${var_os:-almalinux}"
|
||||
var_version="${var_version:-10}"
|
||||
var_arm64="${var_arm64:-no}"
|
||||
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 /var ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "Updating AlmaLinux"
|
||||
$STD dnf -y upgrade
|
||||
msg_ok "Updated AlmaLinux"
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed successfully!"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
44
ct/centos.sh
44
ct/centos.sh
@@ -1,44 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||
_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://www.centos.org/centos-stream/
|
||||
|
||||
APP="CentOS"
|
||||
var_tags="${var_tags:-os}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-512}"
|
||||
var_disk="${var_disk:-4}"
|
||||
var_os="${var_os:-centos}"
|
||||
var_version="${var_version:-10}"
|
||||
var_arm64="${var_arm64:-no}"
|
||||
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 /var ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "Updating CentOS LXC"
|
||||
$STD dnf -y upgrade
|
||||
msg_ok "Updated CentOS LXC"
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed successfully!"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
46
ct/devuan.sh
46
ct/devuan.sh
@@ -1,46 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||
_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://www.devuan.org/
|
||||
|
||||
APP="Devuan"
|
||||
var_tags="${var_tags:-os}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-512}"
|
||||
var_disk="${var_disk:-4}"
|
||||
var_os="${var_os:-devuan}"
|
||||
var_version="${var_version:-5.0}"
|
||||
#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 /var ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "Updating Devuan LXC"
|
||||
$STD apt update
|
||||
$STD apt -y upgrade
|
||||
msg_ok "Updated Devuan LXC"
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed successfully!"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
44
ct/fedora.sh
44
ct/fedora.sh
@@ -1,44 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||
_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://fedoraproject.org/
|
||||
|
||||
APP="Fedora"
|
||||
var_tags="${var_tags:-os}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-512}"
|
||||
var_disk="${var_disk:-4}"
|
||||
var_os="${var_os:-fedora}"
|
||||
var_version="${var_version:-43}"
|
||||
var_arm64="${var_arm64:-no}"
|
||||
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 /var ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "Updating Fedora LXC"
|
||||
$STD dnf -y upgrade
|
||||
msg_ok "Updated Fedora LXC"
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed successfully!"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
46
ct/gentoo.sh
46
ct/gentoo.sh
@@ -1,46 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||
_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://www.gentoo.org/
|
||||
|
||||
APP="Gentoo"
|
||||
var_tags="${var_tags:-os}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-10}"
|
||||
var_os="${var_os:-gentoo}"
|
||||
var_version="${var_version:-current}"
|
||||
#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 /var ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "Updating Gentoo LXC"
|
||||
$STD emerge --sync
|
||||
$STD emerge --quiet --update --deep @world
|
||||
msg_ok "Updated Gentoo LXC"
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed successfully!"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
@@ -1,6 +0,0 @@
|
||||
___ __ __ _
|
||||
/ | / /___ ___ ____ _/ / (_)___ __ ___ __
|
||||
/ /| | / / __ `__ \/ __ `/ / / / __ \/ / / / |/_/
|
||||
/ ___ |/ / / / / / / /_/ / /___/ / / / / /_/ /> <
|
||||
/_/ |_/_/_/ /_/ /_/\__,_/_____/_/_/ /_/\__,_/_/|_|
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
______ __ ____ _____
|
||||
/ ____/__ ____ / /_/ __ \/ ___/
|
||||
/ / / _ \/ __ \/ __/ / / /\__ \
|
||||
/ /___/ __/ / / / /_/ /_/ /___/ /
|
||||
\____/\___/_/ /_/\__/\____//____/
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
____
|
||||
/ __ \___ _ ____ ______ _____
|
||||
/ / / / _ \ | / / / / / __ `/ __ \
|
||||
/ /_/ / __/ |/ / /_/ / /_/ / / / /
|
||||
/_____/\___/|___/\__,_/\__,_/_/ /_/
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
______ __
|
||||
/ ____/__ ____/ /___ _________ _
|
||||
/ /_ / _ \/ __ / __ \/ ___/ __ `/
|
||||
/ __/ / __/ /_/ / /_/ / / / /_/ /
|
||||
/_/ \___/\__,_/\____/_/ \__,_/
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
______ __
|
||||
/ ____/__ ____ / /_____ ____
|
||||
/ / __/ _ \/ __ \/ __/ __ \/ __ \
|
||||
/ /_/ / __/ / / / /_/ /_/ / /_/ /
|
||||
\____/\___/_/ /_/\__/\____/\____/
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
______ __
|
||||
____ ____ ___ ____ / ____/_ __/ /__ _____
|
||||
/ __ \/ __ \/ _ \/ __ \/ __/ / / / / / _ \/ ___/
|
||||
/ /_/ / /_/ / __/ / / / /___/ /_/ / / __/ /
|
||||
\____/ .___/\___/_/ /_/_____/\__,_/_/\___/_/
|
||||
/_/
|
||||
@@ -1,6 +0,0 @@
|
||||
_____ __ _______ ______
|
||||
____ ____ ___ ____ / ___// / / / ___// ____/
|
||||
/ __ \/ __ \/ _ \/ __ \\__ \/ / / /\__ \/ __/
|
||||
/ /_/ / /_/ / __/ / / /__/ / /_/ /___/ / /___
|
||||
\____/ .___/\___/_/ /_/____/\____//____/_____/
|
||||
/_/
|
||||
@@ -1,46 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||
_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://www.openeuler.org/
|
||||
|
||||
APP="openEuler"
|
||||
var_tags="${var_tags:-os}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-512}"
|
||||
var_disk="${var_disk:-4}"
|
||||
var_os="${var_os:-openeuler}"
|
||||
var_version="${var_version:-25.03}"
|
||||
#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 /var ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "Updating OpenEuler LXC"
|
||||
$STD dnf -y upgrade
|
||||
msg_ok "Updated OpenEuler LXC"
|
||||
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,46 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||
_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://www.opensuse.org/
|
||||
|
||||
APP="openSUSE"
|
||||
var_tags="${var_tags:-os}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-512}"
|
||||
var_disk="${var_disk:-4}"
|
||||
var_os="${var_os:-opensuse}"
|
||||
var_version="${var_version:-16.0}"
|
||||
#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 /var ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "Updating OpenSUSE LXC"
|
||||
$STD zypper -n update
|
||||
msg_ok "Updated OpenSUSE LXC"
|
||||
msg_ok "Updated successfully!"
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed successfully!\n"
|
||||
msg_custom "🚀" "${GN}" "${APP} setup has been successfully initialized!"
|
||||
@@ -51,13 +51,12 @@ function update_script() {
|
||||
fi
|
||||
sed -i 's|_TARGET=.*$|_URL=http://127.0.0.1:60072|' /opt/scanopy/.env
|
||||
|
||||
fetch_and_deploy_gh_release "scanopy-server" "scanopy/scanopy" "singlefile" "latest" "/usr/bin" "scanopy-server-linux-$(arch_resolve)"
|
||||
|
||||
msg_info "Generating UI Fixtures (patience)"
|
||||
msg_info "Building Scanopy Server (patience)"
|
||||
cd /opt/scanopy/backend
|
||||
CARGO_PROFILE_RELEASE_LTO=false CARGO_PROFILE_RELEASE_CODEGEN_UNITS=16 CARGO_BUILD_JOBS="$(get_parallel_jobs)" $STD cargo build --release --bin generate-fixtures
|
||||
CARGO_BUILD_JOBS="$(get_parallel_jobs)" $STD cargo build --release --bin server --bin generate-fixtures
|
||||
$STD ./target/release/generate-fixtures --output-dir /opt/scanopy/ui/src/lib/data
|
||||
msg_ok "Generated UI Fixtures"
|
||||
mv ./target/release/server /usr/bin/scanopy-server
|
||||
msg_ok "Built Scanopy Server"
|
||||
|
||||
msg_info "Creating frontend UI"
|
||||
export PUBLIC_SERVER_HOSTNAME=default
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://almalinux.org/
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://www.centos.org/centos-stream/
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://www.devuan.org/
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://fedoraproject.org/
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://www.gentoo.org/
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://www.openeuler.org/
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://www.opensuse.org/
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -27,13 +27,12 @@ fetch_and_deploy_gh_release "Scanopy" "scanopy/scanopy" "tarball" "latest" "/opt
|
||||
TOOLCHAIN="$(grep "channel" /opt/scanopy/backend/rust-toolchain.toml | awk -F\" '{print $2}')"
|
||||
RUST_TOOLCHAIN=$TOOLCHAIN setup_rust
|
||||
|
||||
fetch_and_deploy_gh_release "scanopy-server" "scanopy/scanopy" "singlefile" "latest" "/usr/bin" "scanopy-server-linux-$(arch_resolve)"
|
||||
|
||||
msg_info "Generating UI Fixtures (patience)"
|
||||
msg_info "Building Scanopy Server (patience)"
|
||||
cd /opt/scanopy/backend
|
||||
CARGO_PROFILE_RELEASE_LTO=false CARGO_PROFILE_RELEASE_CODEGEN_UNITS=16 CARGO_BUILD_JOBS="$(get_parallel_jobs)" $STD cargo build --release --bin generate-fixtures
|
||||
CARGO_BUILD_JOBS="$(get_parallel_jobs)" $STD cargo build --release --bin server --bin generate-fixtures
|
||||
$STD ./target/release/generate-fixtures --output-dir /opt/scanopy/ui/src/lib/data
|
||||
msg_ok "Generated UI Fixtures"
|
||||
mv ./target/release/server /usr/bin/scanopy-server
|
||||
msg_ok "Built Scanopy Server"
|
||||
|
||||
msg_info "Creating frontend UI"
|
||||
export PUBLIC_SERVER_HOSTNAME=default
|
||||
|
||||
Reference in New Issue
Block a user