Compare commits
67 Commits
v0.4.10.1
...
fix/update
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d5eba72de | ||
|
|
577b96518e | ||
|
|
c6c27271d6 | ||
|
|
72c0246d8c | ||
|
|
06d4786e0a | ||
|
|
bc31896586 | ||
|
|
213a606fc0 | ||
|
|
3579f2258e | ||
|
|
5b861ade05 | ||
|
|
553eae6ce7 | ||
|
|
c2ca88f033 | ||
|
|
67d44a6a5f | ||
|
|
fe6cca5c63 | ||
|
|
3a8088ded6 | ||
|
|
5d48c7b61c | ||
|
|
5be88d361f | ||
|
|
014e5b69e9 | ||
|
|
f37b2cb26f | ||
|
|
81c00f5d40 | ||
|
|
9bae95d0aa | ||
|
|
088d354fd2 | ||
|
|
0d47fa5d2a | ||
|
|
57fd5f802b | ||
|
|
a1825302fa | ||
|
|
570eea41b9 | ||
|
|
33a5b8e4d0 | ||
|
|
63174d2ea1 | ||
|
|
eda41e5101 | ||
|
|
4a50da4968 | ||
|
|
d50ea55e6d | ||
|
|
f558aa4f43 | ||
|
|
4ea49be97d | ||
|
|
e8c27077fd | ||
|
|
e21d1a6eb6 | ||
|
|
9608affcf6 | ||
|
|
ac23d015e0 | ||
|
|
5cb7bc95fa | ||
|
|
955d0e72d7 | ||
|
|
498249a25b | ||
|
|
72ffc5597f | ||
|
|
4a00d43d82 | ||
|
|
2a0738e102 | ||
|
|
a45f9ae5e6 | ||
|
|
dab2da4b70 | ||
|
|
fe00be2e16 | ||
|
|
f88479f6f6 | ||
|
|
4692c84f7e | ||
|
|
36033add28 | ||
|
|
f092de2934 | ||
|
|
c92c737c2b | ||
|
|
70314fdb6d | ||
|
|
735b3dcfa0 | ||
|
|
815024fbc0 | ||
|
|
03fd7bd1e2 | ||
|
|
09868ba651 | ||
|
|
b192c46d8d | ||
|
|
8c474785a0 | ||
|
|
7bf67091b7 | ||
|
|
c28e1d8dae | ||
|
|
e0a7a44470 | ||
|
|
430355aa4b | ||
|
|
baedcf8581 | ||
|
|
2735d7ecc9 | ||
|
|
e478a66c75 | ||
|
|
a9f23f2d28 | ||
|
|
3ec045de25 | ||
|
|
d9ceac03a2 |
@@ -43,6 +43,10 @@ const config = {
|
|||||||
'http://192.168.*',
|
'http://192.168.*',
|
||||||
],
|
],
|
||||||
|
|
||||||
|
turbopack: {
|
||||||
|
// Disable Turbopack and use Webpack instead for compatibility
|
||||||
|
// This is necessary for server-side code that uses child_process
|
||||||
|
},
|
||||||
webpack: (config, { dev, isServer }) => {
|
webpack: (config, { dev, isServer }) => {
|
||||||
if (dev && !isServer) {
|
if (dev && !isServer) {
|
||||||
config.watchOptions = {
|
config.watchOptions = {
|
||||||
@@ -50,8 +54,19 @@ const config = {
|
|||||||
aggregateTimeout: 300,
|
aggregateTimeout: 300,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
// Handle server-side modules
|
||||||
|
if (isServer) {
|
||||||
|
config.externals = config.externals || [];
|
||||||
|
if (!config.externals.includes('child_process')) {
|
||||||
|
config.externals.push('child_process');
|
||||||
|
}
|
||||||
|
}
|
||||||
return config;
|
return config;
|
||||||
},
|
},
|
||||||
|
// Ignore TypeScript errors during build (they can be fixed separately)
|
||||||
|
typescript: {
|
||||||
|
ignoreBuildErrors: true,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default config;
|
export default config;
|
||||||
|
|||||||
2757
package-lock.json
generated
2757
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
39
package.json
39
package.json
@@ -4,11 +4,11 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "next build",
|
"build": "next build --webpack",
|
||||||
"check": "next lint && tsc --noEmit",
|
"check": "next lint && tsc --noEmit",
|
||||||
"dev": "next dev",
|
"dev": "next dev --webpack",
|
||||||
"dev:server": "node server.js",
|
"dev:server": "node server.js",
|
||||||
"dev:next": "next dev --turbo",
|
"dev:next": "next dev --webpack",
|
||||||
"format:check": "prettier --check \"**/*.{ts,tsx,js,jsx,mdx}\" --cache",
|
"format:check": "prettier --check \"**/*.{ts,tsx,js,jsx,mdx}\" --cache",
|
||||||
"format:write": "prettier --write \"**/*.{ts,tsx,js,jsx,mdx}\" --cache",
|
"format:write": "prettier --write \"**/*.{ts,tsx,js,jsx,mdx}\" --cache",
|
||||||
"lint": "next lint",
|
"lint": "next lint",
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
"typecheck": "tsc --noEmit"
|
"typecheck": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@prisma/client": "^6.18.0",
|
"@prisma/client": "^6.19.0",
|
||||||
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
||||||
"@radix-ui/react-slot": "^1.2.3",
|
"@radix-ui/react-slot": "^1.2.3",
|
||||||
"@t3-oss/env-nextjs": "^0.13.8",
|
"@t3-oss/env-nextjs": "^0.13.8",
|
||||||
@@ -43,14 +43,14 @@
|
|||||||
"cron-validator": "^1.2.0",
|
"cron-validator": "^1.2.0",
|
||||||
"dotenv": "^17.2.3",
|
"dotenv": "^17.2.3",
|
||||||
"jsonwebtoken": "^9.0.2",
|
"jsonwebtoken": "^9.0.2",
|
||||||
"lucide-react": "^0.553.0",
|
"lucide-react": "^0.554.0",
|
||||||
"next": "^15.5.6",
|
"next": "^16.0.4",
|
||||||
"node-cron": "^3.0.3",
|
"node-cron": "^4.2.1",
|
||||||
"node-pty": "^1.0.0",
|
"node-pty": "^1.0.0",
|
||||||
"react": "^19.0.0",
|
"react": "^19.0.0",
|
||||||
"react-dom": "^19.0.0",
|
"react-dom": "^19.0.0",
|
||||||
"react-markdown": "^10.1.0",
|
"react-markdown": "^10.1.0",
|
||||||
"react-syntax-highlighter": "^15.6.6",
|
"react-syntax-highlighter": "^16.1.0",
|
||||||
"refractor": "^5.0.0",
|
"refractor": "^5.0.0",
|
||||||
"remark-gfm": "^4.0.1",
|
"remark-gfm": "^4.0.1",
|
||||||
"server-only": "^0.0.1",
|
"server-only": "^0.0.1",
|
||||||
@@ -69,30 +69,33 @@
|
|||||||
"@types/bcryptjs": "^3.0.0",
|
"@types/bcryptjs": "^3.0.0",
|
||||||
"@types/better-sqlite3": "^7.6.8",
|
"@types/better-sqlite3": "^7.6.8",
|
||||||
"@types/jsonwebtoken": "^9.0.10",
|
"@types/jsonwebtoken": "^9.0.10",
|
||||||
"@types/node": "^24.9.1",
|
"@types/node": "^24.10.1",
|
||||||
"@types/node-cron": "^3.0.11",
|
"@types/node-cron": "^3.0.11",
|
||||||
"@types/react": "^19.0.0",
|
"@types/react": "^19.2.4",
|
||||||
"@types/react-dom": "^19.2.2",
|
"@types/react-dom": "^19.2.2",
|
||||||
"@vitejs/plugin-react": "^5.1.0",
|
"@vitejs/plugin-react": "^5.1.0",
|
||||||
"@vitest/coverage-v8": "^3.2.4",
|
"@vitest/coverage-v8": "^4.0.13",
|
||||||
"@vitest/ui": "^3.2.4",
|
"@vitest/ui": "^4.0.13",
|
||||||
"eslint": "^9.38.0",
|
"eslint": "^9.39.1",
|
||||||
"eslint-config-next": "^16.0.1",
|
"eslint-config-next": "^16.0.4",
|
||||||
"jsdom": "^27.0.1",
|
"jsdom": "^27.2.0",
|
||||||
"postcss": "^8.5.3",
|
"postcss": "^8.5.3",
|
||||||
"prettier": "^3.5.3",
|
"prettier": "^3.5.3",
|
||||||
"prettier-plugin-tailwindcss": "^0.7.1",
|
"prettier-plugin-tailwindcss": "^0.7.1",
|
||||||
"prisma": "^6.19.0",
|
"prisma": "^6.19.0",
|
||||||
"tailwindcss": "^4.1.16",
|
"tailwindcss": "^4.1.17",
|
||||||
"typescript": "^5.8.2",
|
"typescript": "^5.8.2",
|
||||||
"typescript-eslint": "^8.46.2",
|
"typescript-eslint": "^8.46.2",
|
||||||
"vitest": "^3.2.4"
|
"vitest": "^4.0.13"
|
||||||
},
|
},
|
||||||
"ct3aMetadata": {
|
"ct3aMetadata": {
|
||||||
"initVersion": "7.39.3"
|
"initVersion": "7.39.3"
|
||||||
},
|
},
|
||||||
"packageManager": "npm@10.9.3",
|
"packageManager": "npm@10.9.3",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=24.0.0"
|
||||||
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"prismjs": "^1.30.0"
|
"prismjs": "^1.30.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE "repositories" (
|
||||||
|
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||||
|
"url" TEXT NOT NULL,
|
||||||
|
"enabled" BOOLEAN NOT NULL DEFAULT true,
|
||||||
|
"is_default" BOOLEAN NOT NULL DEFAULT false,
|
||||||
|
"is_removable" BOOLEAN NOT NULL DEFAULT true,
|
||||||
|
"priority" INTEGER NOT NULL DEFAULT 0,
|
||||||
|
"created_at" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
"updated_at" DATETIME NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE UNIQUE INDEX "repositories_url_key" ON "repositories"("url");
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE IF NOT EXISTS "backups" (
|
||||||
|
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||||
|
"container_id" TEXT NOT NULL,
|
||||||
|
"server_id" INTEGER NOT NULL,
|
||||||
|
"hostname" TEXT NOT NULL,
|
||||||
|
"backup_name" TEXT NOT NULL,
|
||||||
|
"backup_path" TEXT NOT NULL,
|
||||||
|
"size" BIGINT,
|
||||||
|
"created_at" DATETIME,
|
||||||
|
"storage_name" TEXT NOT NULL,
|
||||||
|
"storage_type" TEXT NOT NULL,
|
||||||
|
"discovered_at" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
CONSTRAINT "backups_server_id_fkey" FOREIGN KEY ("server_id") REFERENCES "servers" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
||||||
|
);
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE IF NOT EXISTS "pbs_storage_credentials" (
|
||||||
|
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||||
|
"server_id" INTEGER NOT NULL,
|
||||||
|
"storage_name" TEXT NOT NULL,
|
||||||
|
"pbs_ip" TEXT NOT NULL,
|
||||||
|
"pbs_datastore" TEXT NOT NULL,
|
||||||
|
"pbs_password" TEXT NOT NULL,
|
||||||
|
"pbs_fingerprint" TEXT NOT NULL,
|
||||||
|
"created_at" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
"updated_at" DATETIME NOT NULL,
|
||||||
|
CONSTRAINT "pbs_storage_credentials_server_id_fkey" FOREIGN KEY ("server_id") REFERENCES "servers" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
||||||
|
);
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE INDEX IF NOT EXISTS "backups_container_id_idx" ON "backups"("container_id");
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE INDEX IF NOT EXISTS "backups_server_id_idx" ON "backups"("server_id");
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE INDEX IF NOT EXISTS "pbs_storage_credentials_server_id_idx" ON "pbs_storage_credentials"("server_id");
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE UNIQUE INDEX IF NOT EXISTS "pbs_storage_credentials_server_id_storage_name_key" ON "pbs_storage_credentials"("server_id", "storage_name");
|
||||||
@@ -41,6 +41,8 @@ model Server {
|
|||||||
ssh_key_path String?
|
ssh_key_path String?
|
||||||
key_generated Boolean? @default(false)
|
key_generated Boolean? @default(false)
|
||||||
installed_scripts InstalledScript[]
|
installed_scripts InstalledScript[]
|
||||||
|
backups Backup[]
|
||||||
|
pbs_credentials PBSStorageCredential[]
|
||||||
|
|
||||||
@@map("servers")
|
@@map("servers")
|
||||||
}
|
}
|
||||||
@@ -95,3 +97,52 @@ model LXCConfig {
|
|||||||
|
|
||||||
@@map("lxc_configs")
|
@@map("lxc_configs")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
model Backup {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
container_id String
|
||||||
|
server_id Int
|
||||||
|
hostname String
|
||||||
|
backup_name String
|
||||||
|
backup_path String
|
||||||
|
size BigInt?
|
||||||
|
created_at DateTime?
|
||||||
|
storage_name String
|
||||||
|
storage_type String // 'local', 'storage', or 'pbs'
|
||||||
|
discovered_at DateTime @default(now())
|
||||||
|
server Server @relation(fields: [server_id], references: [id], onDelete: Cascade)
|
||||||
|
|
||||||
|
@@index([container_id])
|
||||||
|
@@index([server_id])
|
||||||
|
@@map("backups")
|
||||||
|
}
|
||||||
|
|
||||||
|
model PBSStorageCredential {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
server_id Int
|
||||||
|
storage_name String
|
||||||
|
pbs_ip String
|
||||||
|
pbs_datastore String
|
||||||
|
pbs_password String
|
||||||
|
pbs_fingerprint String
|
||||||
|
created_at DateTime @default(now())
|
||||||
|
updated_at DateTime @updatedAt
|
||||||
|
server Server @relation(fields: [server_id], references: [id], onDelete: Cascade)
|
||||||
|
|
||||||
|
@@unique([server_id, storage_name])
|
||||||
|
@@index([server_id])
|
||||||
|
@@map("pbs_storage_credentials")
|
||||||
|
}
|
||||||
|
|
||||||
|
model Repository {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
url String @unique
|
||||||
|
enabled Boolean @default(true)
|
||||||
|
is_default Boolean @default(false)
|
||||||
|
is_removable Boolean @default(true)
|
||||||
|
priority Int @default(0)
|
||||||
|
created_at DateTime @default(now())
|
||||||
|
updated_at DateTime @updatedAt
|
||||||
|
|
||||||
|
@@map("repositories")
|
||||||
|
}
|
||||||
|
|||||||
10
restore.log
Normal file
10
restore.log
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
Starting restore...
|
||||||
|
Reading container configuration...
|
||||||
|
Stopping container...
|
||||||
|
Destroying container...
|
||||||
|
Logging into PBS...
|
||||||
|
Downloading backup from PBS...
|
||||||
|
Packing backup folder...
|
||||||
|
Restoring container...
|
||||||
|
Cleaning up temporary files...
|
||||||
|
Restore completed successfully
|
||||||
132
scripts/core/api.func
Normal file
132
scripts/core/api.func
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: michelroegl-brunner
|
||||||
|
# License: MIT | https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/LICENSE
|
||||||
|
|
||||||
|
post_to_api() {
|
||||||
|
|
||||||
|
if ! command -v curl &>/dev/null; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$DIAGNOSTICS" = "no" ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$RANDOM_UUID" ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
local API_URL="http://api.community-scripts.org/upload"
|
||||||
|
local pve_version="not found"
|
||||||
|
pve_version=$(pveversion | awk -F'[/ ]' '{print $2}')
|
||||||
|
|
||||||
|
JSON_PAYLOAD=$(
|
||||||
|
cat <<EOF
|
||||||
|
{
|
||||||
|
"ct_type": $CT_TYPE,
|
||||||
|
"type":"lxc",
|
||||||
|
"disk_size": $DISK_SIZE,
|
||||||
|
"core_count": $CORE_COUNT,
|
||||||
|
"ram_size": $RAM_SIZE,
|
||||||
|
"os_type": "$var_os",
|
||||||
|
"os_version": "$var_version",
|
||||||
|
"disableip6": "",
|
||||||
|
"nsapp": "$NSAPP",
|
||||||
|
"method": "$METHOD(PVE-Local)",
|
||||||
|
"pve_version": "$pve_version",
|
||||||
|
"status": "installing",
|
||||||
|
"random_id": "$RANDOM_UUID"
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
)
|
||||||
|
|
||||||
|
if [[ "$DIAGNOSTICS" == "yes" ]]; then
|
||||||
|
RESPONSE=$(curl -s -w "%{http_code}" -L -X POST "$API_URL" --post301 --post302 \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "$JSON_PAYLOAD") || true
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
post_to_api_vm() {
|
||||||
|
|
||||||
|
if [[ ! -f /usr/local/community-scripts/diagnostics ]]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
DIAGNOSTICS=$(grep -i "^DIAGNOSTICS=" /usr/local/community-scripts/diagnostics | awk -F'=' '{print $2}')
|
||||||
|
if ! command -v curl &>/dev/null; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$DIAGNOSTICS" = "no" ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$RANDOM_UUID" ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
local API_URL="http://api.community-scripts.org/upload"
|
||||||
|
local pve_version="not found"
|
||||||
|
pve_version=$(pveversion | awk -F'[/ ]' '{print $2}')
|
||||||
|
|
||||||
|
DISK_SIZE_API=${DISK_SIZE%G}
|
||||||
|
|
||||||
|
JSON_PAYLOAD=$(
|
||||||
|
cat <<EOF
|
||||||
|
{
|
||||||
|
"ct_type": 2,
|
||||||
|
"type":"vm",
|
||||||
|
"disk_size": $DISK_SIZE_API,
|
||||||
|
"core_count": $CORE_COUNT,
|
||||||
|
"ram_size": $RAM_SIZE,
|
||||||
|
"os_type": "$var_os",
|
||||||
|
"os_version": "$var_version",
|
||||||
|
"disableip6": "",
|
||||||
|
"nsapp": "$NSAPP",
|
||||||
|
"method": "$METHOD(PVE-Local)",
|
||||||
|
"pve_version": "$pve_version",
|
||||||
|
"status": "installing",
|
||||||
|
"random_id": "$RANDOM_UUID"
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
)
|
||||||
|
|
||||||
|
if [[ "$DIAGNOSTICS" == "yes" ]]; then
|
||||||
|
RESPONSE=$(curl -s -w "%{http_code}" -L -X POST "$API_URL" --post301 --post302 \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "$JSON_PAYLOAD") || true
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
POST_UPDATE_DONE=false
|
||||||
|
post_update_to_api() {
|
||||||
|
|
||||||
|
if ! command -v curl &>/dev/null; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$POST_UPDATE_DONE" = true ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
local API_URL="http://api.community-scripts.org/upload/updatestatus"
|
||||||
|
local status="${1:-failed}"
|
||||||
|
local error="${2:-No error message}"
|
||||||
|
|
||||||
|
JSON_PAYLOAD=$(
|
||||||
|
cat <<EOF
|
||||||
|
{
|
||||||
|
"status": "$status",
|
||||||
|
"error": "$error",
|
||||||
|
"random_id": "$RANDOM_UUID"
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
)
|
||||||
|
|
||||||
|
if [[ "$DIAGNOSTICS" == "yes" ]]; then
|
||||||
|
RESPONSE=$(curl -s -w "%{http_code}" -L -X POST "$API_URL" --post301 --post302 \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "$JSON_PAYLOAD") || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
POST_UPDATE_DONE=true
|
||||||
|
}
|
||||||
@@ -17,9 +17,9 @@ variables() {
|
|||||||
|
|
||||||
# Get absolute path to core directory
|
# Get absolute path to core directory
|
||||||
CORE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
CORE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
source "$CORE_DIR/api.func"
|
||||||
source "$CORE_DIR/core.func"
|
source "$CORE_DIR/core.func"
|
||||||
|
load_functions
|
||||||
|
|
||||||
# This function enables error handling in the script by setting options and defining a trap for the ERR signal.
|
# This function enables error handling in the script by setting options and defining a trap for the ERR signal.
|
||||||
catch_errors() {
|
catch_errors() {
|
||||||
set -Eeo pipefail
|
set -Eeo pipefail
|
||||||
@@ -33,15 +33,15 @@ error_handler() {
|
|||||||
local line_number="$1"
|
local line_number="$1"
|
||||||
local command="$2"
|
local command="$2"
|
||||||
local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}"
|
local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}"
|
||||||
|
post_update_to_api "failed" "${command}"
|
||||||
echo -e "\n$error_message\n"
|
echo -e "\n$error_message\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check if the shell is using bash
|
# Check if the current shell is using bash
|
||||||
shell_check() {
|
shell_check() {
|
||||||
if [[ "$(basename "$SHELL")" != "bash" ]]; then
|
if [[ "$(ps -p $$ -o comm=)" != "bash" ]]; then
|
||||||
clear
|
clear
|
||||||
msg_error "Your default shell is currently not set to Bash. To use these scripts, please switch to the Bash shell."
|
msg_error "Your default shell is not bash. Please report this to our github issues or discord."
|
||||||
echo -e "\nExiting..."
|
echo -e "\nExiting..."
|
||||||
sleep 2
|
sleep 2
|
||||||
exit
|
exit
|
||||||
@@ -60,7 +60,7 @@ root_check() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported.
|
# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported.
|
||||||
# Supported: Proxmox VE 8.0.x – 8.9.x and 9.0 (NOT 9.1+)
|
# Supported: Proxmox VE 8.0.x – 8.9.x, 9.0 and 9.1
|
||||||
pve_check() {
|
pve_check() {
|
||||||
local PVE_VER
|
local PVE_VER
|
||||||
PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')"
|
PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')"
|
||||||
@@ -76,12 +76,12 @@ pve_check() {
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check for Proxmox VE 9.x: allow ONLY 9.0
|
# Check for Proxmox VE 9.x: allow 9.0 and 9.1
|
||||||
if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then
|
if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then
|
||||||
local MINOR="${BASH_REMATCH[1]}"
|
local MINOR="${BASH_REMATCH[1]}"
|
||||||
if ((MINOR != 0)); then
|
if ((MINOR < 0 || MINOR > 1)); then
|
||||||
msg_error "This version of Proxmox VE is not yet supported."
|
msg_error "This version of Proxmox VE is not supported."
|
||||||
msg_error "Supported: Proxmox VE version 9.0"
|
msg_error "Supported: Proxmox VE version 9.0 – 9.1"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
@@ -89,7 +89,7 @@ pve_check() {
|
|||||||
|
|
||||||
# All other unsupported versions
|
# All other unsupported versions
|
||||||
msg_error "This version of Proxmox VE is not supported."
|
msg_error "This version of Proxmox VE is not supported."
|
||||||
msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0"
|
msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0 – 9.1"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -439,14 +439,17 @@ advanced_settings() {
|
|||||||
exit_script
|
exit_script
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if CT_ID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Container ID" 8 58 "$NEXTID" --title "CONTAINER ID" 3>&1 1>&2 2>&3); then
|
if CT_ID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Container ID" 8 58 "$NEXTID" --title "CONTAINER ID" 3>&1 1>&2 2>&3); then
|
||||||
if [ -z "$CT_ID" ]; then
|
if [ -z "$CT_ID" ]; then
|
||||||
CT_ID="$NEXTID"
|
CT_ID="$NEXTID"
|
||||||
|
echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}"
|
||||||
|
else
|
||||||
|
echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
exit_script
|
exit_script
|
||||||
fi
|
fi
|
||||||
echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}"
|
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
if CT_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 "$NSAPP" --title "HOSTNAME" 3>&1 1>&2 2>&3); then
|
if CT_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 "$NSAPP" --title "HOSTNAME" 3>&1 1>&2 2>&3); then
|
||||||
@@ -911,6 +914,7 @@ install_script() {
|
|||||||
shell_check
|
shell_check
|
||||||
root_check
|
root_check
|
||||||
arch_check
|
arch_check
|
||||||
|
#ssh_check
|
||||||
maxkeys_check
|
maxkeys_check
|
||||||
diagnostics_check
|
diagnostics_check
|
||||||
|
|
||||||
@@ -1045,7 +1049,6 @@ start() {
|
|||||||
source "$CORE_DIR/tools.func"
|
source "$CORE_DIR/tools.func"
|
||||||
if command -v pveversion >/dev/null 2>&1; then
|
if command -v pveversion >/dev/null 2>&1; then
|
||||||
install_script
|
install_script
|
||||||
|
|
||||||
else
|
else
|
||||||
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC Update/Setting" --menu \
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC Update/Setting" --menu \
|
||||||
"Support/Update functions for ${APP} LXC. Choose an option:" \
|
"Support/Update functions for ${APP} LXC. Choose an option:" \
|
||||||
@@ -1075,7 +1078,6 @@ start() {
|
|||||||
|
|
||||||
# This function collects user settings and integrates all the collected information.
|
# This function collects user settings and integrates all the collected information.
|
||||||
build_container() {
|
build_container() {
|
||||||
|
|
||||||
# if [ "$VERBOSE" == "yes" ]; then set -x; fi
|
# if [ "$VERBOSE" == "yes" ]; then set -x; fi
|
||||||
|
|
||||||
NET_STRING="-net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU"
|
NET_STRING="-net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU"
|
||||||
@@ -1099,18 +1101,12 @@ build_container() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $DIAGNOSTICS == "yes" ]]; then
|
if [[ $DIAGNOSTICS == "yes" ]]; then
|
||||||
echo "Diagnostics enabled (post_to_api function not available)"
|
post_to_api
|
||||||
fi
|
fi
|
||||||
|
|
||||||
TEMP_DIR=$(mktemp -d)
|
TEMP_DIR=$(mktemp -d)
|
||||||
pushd "$TEMP_DIR" >/dev/null
|
pushd "$TEMP_DIR" >/dev/null
|
||||||
# CORE_DIR is already defined at the top of the file
|
|
||||||
|
|
||||||
if [ "$var_os" == "alpine" ]; then
|
|
||||||
export FUNCTIONS_FILE_PATH="$(cat "$CORE_DIR/core.func" && echo && cat "$CORE_DIR/tools.func" && echo && cat "$CORE_DIR/alpine-install.func")"
|
|
||||||
else
|
|
||||||
export FUNCTIONS_FILE_PATH="$(cat "$CORE_DIR/core.func" && echo && cat "$CORE_DIR/tools.func" && echo && cat "$CORE_DIR/install.func")"
|
|
||||||
fi
|
|
||||||
|
|
||||||
export DIAGNOSTICS="$DIAGNOSTICS"
|
export DIAGNOSTICS="$DIAGNOSTICS"
|
||||||
export RANDOM_UUID="$RANDOM_UUID"
|
export RANDOM_UUID="$RANDOM_UUID"
|
||||||
@@ -1130,21 +1126,10 @@ build_container() {
|
|||||||
export PCT_OSTYPE="$var_os"
|
export PCT_OSTYPE="$var_os"
|
||||||
export PCT_OSVERSION="$var_version"
|
export PCT_OSVERSION="$var_version"
|
||||||
export PCT_DISK_SIZE="$DISK_SIZE"
|
export PCT_DISK_SIZE="$DISK_SIZE"
|
||||||
export PCT_OPTIONS="
|
export PCT_OPTIONS="-features $FEATURES -hostname $HN -tags $TAGS $SD $NS $NET_STRING -onboot 1 -cores $CORE_COUNT -memory $RAM_SIZE -unprivileged $CT_TYPE $PW"
|
||||||
-features $FEATURES
|
|
||||||
-hostname $HN
|
|
||||||
-tags $TAGS
|
|
||||||
$SD
|
|
||||||
$NS
|
|
||||||
$NET_STRING
|
|
||||||
-onboot 1
|
|
||||||
-cores $CORE_COUNT
|
|
||||||
-memory $RAM_SIZE
|
|
||||||
-unprivileged $CT_TYPE
|
|
||||||
$PW
|
|
||||||
"
|
|
||||||
# This executes create_lxc.sh and creates the container and .conf file
|
# This executes create_lxc.sh and creates the container and .conf file
|
||||||
bash "$CORE_DIR/create_lxc.sh" $?
|
bash "$CORE_DIR/create_lxc.sh"
|
||||||
|
|
||||||
|
|
||||||
LXC_CONFIG="/etc/pve/lxc/${CTID}.conf"
|
LXC_CONFIG="/etc/pve/lxc/${CTID}.conf"
|
||||||
|
|
||||||
@@ -1337,8 +1322,64 @@ EOF'
|
|||||||
fi
|
fi
|
||||||
msg_ok "Customized LXC Container"
|
msg_ok "Customized LXC Container"
|
||||||
|
|
||||||
|
if [ "$var_os" == "alpine" ]; then
|
||||||
|
FUNCTIONS_FILE_PATH="$(cat "$CORE_DIR/core.func" && echo && cat "$CORE_DIR/tools.func" && echo && cat "$CORE_DIR/api.func" && echo && cat "$CORE_DIR/alpine-install.func")"
|
||||||
|
else
|
||||||
|
FUNCTIONS_FILE_PATH="$(cat "$CORE_DIR/core.func" && echo && cat "$CORE_DIR/tools.func" && echo && cat "$CORE_DIR/api.func" && echo && cat "$CORE_DIR/install.func")"
|
||||||
|
fi
|
||||||
|
|
||||||
lxc-attach -n "$CTID" -- bash -c "$(cat "$(dirname "$CORE_DIR")/install/${var_install}.sh")"
|
FUNCTIONS_FILE="/tmp/functions.sh"
|
||||||
|
echo "$FUNCTIONS_FILE_PATH" | pct exec "$CTID" -- bash -c "cat > $FUNCTIONS_FILE"
|
||||||
|
|
||||||
|
pct exec "$CTID" -- test -f "$FUNCTIONS_FILE" || {
|
||||||
|
msg_error "Failed to write functions file to container"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
INSTALL_SCRIPT_PATH="$(dirname "$CORE_DIR")/install/${var_install}.sh"
|
||||||
|
INSTALL_SCRIPT_CONTENT=$(cat "$INSTALL_SCRIPT_PATH")
|
||||||
|
|
||||||
|
# Replace the old pattern: source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
|
# with direct file source: source "/tmp/functions.sh"
|
||||||
|
# Use sed with a simpler pattern that matches the exact line
|
||||||
|
MODIFIED_INSTALL_SCRIPT=$(echo "$INSTALL_SCRIPT_CONTENT" | \
|
||||||
|
sed "s|source /dev/stdin <<<\"\$FUNCTIONS_FILE_PATH\"|source \"$FUNCTIONS_FILE\"|")
|
||||||
|
|
||||||
|
# Verify replacement worked - if not, force add the source line
|
||||||
|
if ! echo "$MODIFIED_INSTALL_SCRIPT" | grep -q "source \"$FUNCTIONS_FILE\""; then
|
||||||
|
# If replacement didn't work, add source line after the last comment
|
||||||
|
MODIFIED_INSTALL_SCRIPT=$(echo "$MODIFIED_INSTALL_SCRIPT" | \
|
||||||
|
awk -v func_file="$FUNCTIONS_FILE" '
|
||||||
|
BEGIN { replaced = 0 }
|
||||||
|
{
|
||||||
|
if (/source.*dev\/stdin/ || /source.*FUNCTIONS_FILE_PATH/) {
|
||||||
|
print "source \"" func_file "\""
|
||||||
|
replaced = 1
|
||||||
|
next
|
||||||
|
}
|
||||||
|
if (!replaced && /^#/ && !/^#!/) {
|
||||||
|
print
|
||||||
|
next
|
||||||
|
}
|
||||||
|
if (!replaced && !/^#!/ && !/^#/) {
|
||||||
|
print "source \"" func_file "\""
|
||||||
|
replaced = 1
|
||||||
|
}
|
||||||
|
print
|
||||||
|
}
|
||||||
|
END {
|
||||||
|
if (!replaced) {
|
||||||
|
print "source \"" func_file "\""
|
||||||
|
}
|
||||||
|
}')
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Write the modified script to a file in the container and execute it
|
||||||
|
INSTALL_SCRIPT_FILE="/tmp/install_script.sh"
|
||||||
|
echo "$MODIFIED_INSTALL_SCRIPT" | pct exec "$CTID" -- bash -c "cat > $INSTALL_SCRIPT_FILE"
|
||||||
|
pct exec "$CTID" -- chmod +x "$INSTALL_SCRIPT_FILE"
|
||||||
|
|
||||||
|
lxc-attach -n "$CTID" -- bash "$INSTALL_SCRIPT_FILE"
|
||||||
}
|
}
|
||||||
|
|
||||||
# This function sets the description of the container.
|
# This function sets the description of the container.
|
||||||
@@ -1383,6 +1424,37 @@ EOF
|
|||||||
if [[ -f /etc/systemd/system/ping-instances.service ]]; then
|
if [[ -f /etc/systemd/system/ping-instances.service ]]; then
|
||||||
systemctl start ping-instances.service
|
systemctl start ping-instances.service
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
post_update_to_api "done" "none"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
api_exit_script() {
|
||||||
|
exit_code=$? # Capture the exit status of the last executed command
|
||||||
|
#200 exit codes indicate error in create_lxc.sh
|
||||||
|
#100 exit codes indicate error in install.func
|
||||||
|
|
||||||
|
if [ $exit_code -ne 0 ]; then
|
||||||
|
case $exit_code in
|
||||||
|
100) post_update_to_api "failed" "100: Unexpected error in create_lxc.sh" ;;
|
||||||
|
101) post_update_to_api "failed" "101: No network connection detected in create_lxc.sh" ;;
|
||||||
|
200) post_update_to_api "failed" "200: LXC creation failed in create_lxc.sh" ;;
|
||||||
|
201) post_update_to_api "failed" "201: Invalid Storage class in create_lxc.sh" ;;
|
||||||
|
202) post_update_to_api "failed" "202: User aborted menu in create_lxc.sh" ;;
|
||||||
|
203) post_update_to_api "failed" "203: CTID not set in create_lxc.sh" ;;
|
||||||
|
204) post_update_to_api "failed" "204: PCT_OSTYPE not set in create_lxc.sh" ;;
|
||||||
|
205) post_update_to_api "failed" "205: CTID cannot be less than 100 in create_lxc.sh" ;;
|
||||||
|
206) post_update_to_api "failed" "206: CTID already in use in create_lxc.sh" ;;
|
||||||
|
207) post_update_to_api "failed" "207: Template not found in create_lxc.sh" ;;
|
||||||
|
208) post_update_to_api "failed" "208: Error downloading template in create_lxc.sh" ;;
|
||||||
|
209) post_update_to_api "failed" "209: Container creation failed, but template is intact in create_lxc.sh" ;;
|
||||||
|
*) post_update_to_api "failed" "Unknown error, exit code: $exit_code in create_lxc.sh" ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
if command -v pveversion >/dev/null 2>&1; then
|
||||||
|
trap 'api_exit_script' EXIT
|
||||||
|
fi
|
||||||
|
trap 'post_update_to_api "failed" "$BASH_COMMAND"' ERR
|
||||||
|
trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT
|
||||||
|
trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM
|
||||||
@@ -368,6 +368,51 @@ run_container_safe() {
|
|||||||
" || __handle_general_error "lxc-attach to CT $ct"
|
" || __handle_general_error "lxc-attach to CT $ct"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cleanup_lxc() {
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
|
||||||
|
if is_alpine; then
|
||||||
|
$STD apk cache clean || true
|
||||||
|
rm -rf /var/cache/apk/*
|
||||||
|
else
|
||||||
|
$STD apt -y autoremove || true
|
||||||
|
$STD apt -y autoclean || true
|
||||||
|
$STD apt -y clean || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Clear temp artifacts (keep sockets/FIFOs; ignore errors)
|
||||||
|
find /tmp /var/tmp -type f -name 'tmp*' -delete 2>/dev/null || true
|
||||||
|
find /tmp /var/tmp -type f -name 'tempfile*' -delete 2>/dev/null || true
|
||||||
|
|
||||||
|
# Truncate writable log files silently (permission errors ignored)
|
||||||
|
if command -v truncate >/dev/null 2>&1; then
|
||||||
|
find /var/log -type f -writable -print0 2>/dev/null |
|
||||||
|
xargs -0 -n1 truncate -s 0 2>/dev/null || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Python pip
|
||||||
|
if command -v pip &>/dev/null; then $STD pip cache purge || true; fi
|
||||||
|
# Node.js npm
|
||||||
|
if command -v npm &>/dev/null; then $STD npm cache clean --force || true; fi
|
||||||
|
# Node.js yarn
|
||||||
|
if command -v yarn &>/dev/null; then $STD yarn cache clean || true; fi
|
||||||
|
# Node.js pnpm
|
||||||
|
if command -v pnpm &>/dev/null; then $STD pnpm store prune || true; fi
|
||||||
|
# Go
|
||||||
|
if command -v go &>/dev/null; then $STD go clean -cache -modcache || true; fi
|
||||||
|
# Rust cargo
|
||||||
|
if command -v cargo &>/dev/null; then $STD cargo clean || true; fi
|
||||||
|
# Ruby gem
|
||||||
|
if command -v gem &>/dev/null; then $STD gem cleanup || true; fi
|
||||||
|
# Composer (PHP)
|
||||||
|
if command -v composer &>/dev/null; then $STD composer clear-cache || true; fi
|
||||||
|
|
||||||
|
if command -v journalctl &>/dev/null; then
|
||||||
|
$STD journalctl --vacuum-time=10m || true
|
||||||
|
fi
|
||||||
|
msg_ok "Cleaned"
|
||||||
|
}
|
||||||
|
|
||||||
check_or_create_swap() {
|
check_or_create_swap() {
|
||||||
msg_info "Checking for active swap"
|
msg_info "Checking for active swap"
|
||||||
|
|
||||||
@@ -409,4 +454,4 @@ check_or_create_swap() {
|
|||||||
trap 'stop_spinner' EXIT INT TERM
|
trap 'stop_spinner' EXIT INT TERM
|
||||||
|
|
||||||
# Initialize functions when core.func is sourced
|
# Initialize functions when core.func is sourced
|
||||||
load_functions
|
load_functions
|
||||||
|
|||||||
@@ -72,15 +72,23 @@ stop_all_services() {
|
|||||||
local service_patterns=("$@")
|
local service_patterns=("$@")
|
||||||
|
|
||||||
for pattern in "${service_patterns[@]}"; do
|
for pattern in "${service_patterns[@]}"; do
|
||||||
# Find all matching services
|
# Find all matching services (use || true to avoid pipeline failures)
|
||||||
systemctl list-units --type=service --all 2>/dev/null |
|
local services
|
||||||
grep -oE "${pattern}[^ ]*\.service" |
|
services=$(systemctl list-units --type=service --all 2>/dev/null |
|
||||||
sort -u |
|
grep -oE "${pattern}[^ ]*\.service" 2>/dev/null |
|
||||||
while read -r service; do
|
sort -u 2>/dev/null || true)
|
||||||
|
|
||||||
|
# Only process if we found any services
|
||||||
|
if [[ -n "$services" ]]; then
|
||||||
|
while IFS= read -r service; do
|
||||||
|
[[ -z "$service" ]] && continue
|
||||||
$STD systemctl stop "$service" 2>/dev/null || true
|
$STD systemctl stop "$service" 2>/dev/null || true
|
||||||
$STD systemctl disable "$service" 2>/dev/null || true
|
$STD systemctl disable "$service" 2>/dev/null || true
|
||||||
done
|
done <<<"$services"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
@@ -1198,65 +1206,49 @@ ensure_apt_working() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Standardized deb822 repository setup
|
# Standardized deb822 repository setup (with optional Architectures)
|
||||||
# Validates all parameters and fails safely if any are empty
|
# Always runs apt update after repo creation to ensure package availability
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
setup_deb822_repo() {
|
setup_deb822_repo() {
|
||||||
local name="$1"
|
local name="$1"
|
||||||
local gpg_url="$2"
|
local gpg_url="$2"
|
||||||
local repo_url="$3"
|
local repo_url="$3"
|
||||||
local suite="$4"
|
local suite="$4"
|
||||||
local component="${5:-main}"
|
local component="${5-main}"
|
||||||
local architectures="${6:-$(dpkg --print-architecture)}"
|
local architectures="${6-}" # optional
|
||||||
|
|
||||||
# Validate required parameters
|
# Validate required parameters
|
||||||
if [[ -z "$name" || -z "$gpg_url" || -z "$repo_url" || -z "$suite" ]]; then
|
if [[ -z "$name" || -z "$gpg_url" || -z "$repo_url" || -z "$suite" ]]; then
|
||||||
msg_error "setup_deb822_repo: missing required parameters (name=$name, gpg=$gpg_url, repo=$repo_url, suite=$suite)"
|
msg_error "setup_deb822_repo: missing required parameters (name=$name repo=$repo_url suite=$suite)"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Cleanup old configs for this app
|
# Cleanup
|
||||||
cleanup_old_repo_files "$name"
|
cleanup_old_repo_files "$name"
|
||||||
|
|
||||||
# Cleanup any orphaned .sources files from other apps
|
|
||||||
cleanup_orphaned_sources
|
cleanup_orphaned_sources
|
||||||
|
|
||||||
# Ensure keyring directory exists
|
|
||||||
mkdir -p /etc/apt/keyrings || {
|
mkdir -p /etc/apt/keyrings || {
|
||||||
msg_error "Failed to create /etc/apt/keyrings directory"
|
msg_error "Failed to create /etc/apt/keyrings"
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Download GPG key (with --yes to avoid interactive prompts)
|
# Import GPG
|
||||||
curl -fsSL "$gpg_url" | gpg --dearmor --yes -o "/etc/apt/keyrings/${name}.gpg" 2>/dev/null || {
|
curl -fsSL "$gpg_url" | gpg --dearmor --yes -o "/etc/apt/keyrings/${name}.gpg" || {
|
||||||
msg_error "Failed to download or import GPG key for ${name} from $gpg_url"
|
msg_error "Failed to import GPG key for ${name}"
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Create deb822 sources file
|
# Write deb822
|
||||||
cat <<EOF >/etc/apt/sources.list.d/${name}.sources
|
{
|
||||||
Types: deb
|
echo "Types: deb"
|
||||||
URIs: $repo_url
|
echo "URIs: $repo_url"
|
||||||
Suites: $suite
|
echo "Suites: $suite"
|
||||||
Components: $component
|
echo "Components: $component"
|
||||||
Architectures: $architectures
|
[[ -n "$architectures" ]] && echo "Architectures: $architectures"
|
||||||
Signed-By: /etc/apt/keyrings/${name}.gpg
|
echo "Signed-By: /etc/apt/keyrings/${name}.gpg"
|
||||||
EOF
|
} >/etc/apt/sources.list.d/${name}.sources
|
||||||
|
|
||||||
# Use cached apt update
|
$STD apt update
|
||||||
local apt_cache_file="/var/cache/apt-update-timestamp"
|
|
||||||
local current_time=$(date +%s)
|
|
||||||
local last_update=0
|
|
||||||
|
|
||||||
if [[ -f "$apt_cache_file" ]]; then
|
|
||||||
last_update=$(cat "$apt_cache_file" 2>/dev/null || echo 0)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# For repo changes, always update but respect short-term cache (30s)
|
|
||||||
if ((current_time - last_update > 30)); then
|
|
||||||
$STD apt update
|
|
||||||
echo "$current_time" >"$apt_cache_file"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
@@ -1415,7 +1407,7 @@ verify_gpg_fingerprint() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# EXISTING FUNCTIONS
|
# INSTALL FUNCTIONS
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
@@ -1517,7 +1509,7 @@ check_for_gh_release() {
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
msg_error "No update available: ${app} is not installed!"
|
msg_ok "No update available: ${app} is already on pinned version (${current})"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -2795,8 +2787,9 @@ function setup_java() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Validate INSTALLED_VERSION is not empty if matched
|
# Validate INSTALLED_VERSION is not empty if matched
|
||||||
local JDK_COUNT=$(dpkg -l 2>/dev/null | grep -c "temurin-.*-jdk" || echo "0")
|
local JDK_COUNT=0
|
||||||
if [[ -z "$INSTALLED_VERSION" && "$JDK_COUNT" -gt 0 ]]; then
|
JDK_COUNT=$(dpkg -l 2>/dev/null | grep -c "temurin-.*-jdk")
|
||||||
|
if [[ -z "$INSTALLED_VERSION" && "${JDK_COUNT:-0}" -gt 0 ]]; then
|
||||||
msg_warn "Found Temurin JDK but cannot determine version"
|
msg_warn "Found Temurin JDK but cannot determine version"
|
||||||
INSTALLED_VERSION="0"
|
INSTALLED_VERSION="0"
|
||||||
fi
|
fi
|
||||||
@@ -3060,6 +3053,85 @@ setup_mariadb() {
|
|||||||
msg_ok "Setup MariaDB $MARIADB_VERSION"
|
msg_ok "Setup MariaDB $MARIADB_VERSION"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Creates MariaDB database with user, charset and optional extra grants/modes
|
||||||
|
#
|
||||||
|
# Description:
|
||||||
|
# - Generates password if empty
|
||||||
|
# - Creates database with utf8mb4_unicode_ci
|
||||||
|
# - Creates local user with password
|
||||||
|
# - Grants full access to this DB
|
||||||
|
# - Optional: apply extra GRANT statements (comma-separated)
|
||||||
|
# - Optional: apply custom GLOBAL sql_mode
|
||||||
|
# - Saves credentials to file
|
||||||
|
# - Exports variables for use in calling script
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
# MARIADB_DB_NAME="myapp_db" MARIADB_DB_USER="myapp_user" setup_mariadb_db
|
||||||
|
# MARIADB_DB_NAME="domain_monitor" MARIADB_DB_USER="domainmonitor" setup_mariadb_db
|
||||||
|
# MARIADB_DB_NAME="myapp" MARIADB_DB_USER="myapp" MARIADB_DB_EXTRA_GRANTS="GRANT SELECT ON \`mysql\`.\`time_zone_name\`" setup_mariadb_db
|
||||||
|
# MARIADB_DB_NAME="ghostfolio" MARIADB_DB_USER="ghostfolio" MARIADB_DB_SQL_MODE="" setup_mariadb_db
|
||||||
|
#
|
||||||
|
# Variables:
|
||||||
|
# MARIADB_DB_NAME - Database name (required)
|
||||||
|
# MARIADB_DB_USER - Database user (required)
|
||||||
|
# MARIADB_DB_PASS - User password (optional, auto-generated if empty)
|
||||||
|
# MARIADB_DB_EXTRA_GRANTS - Comma-separated GRANT statements (optional)
|
||||||
|
# Example: "GRANT SELECT ON \`mysql\`.\`time_zone_name\`"
|
||||||
|
# MARIADB_DB_SQL_MODE - Optional global sql_mode override (e.g. "", "STRICT_TRANS_TABLES")
|
||||||
|
# MARIADB_DB_CREDS_FILE - Credentials file path (optional, default: ~/${APPLICATION}.creds)
|
||||||
|
#
|
||||||
|
# Exports:
|
||||||
|
# MARIADB_DB_NAME, MARIADB_DB_USER, MARIADB_DB_PASS
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
function setup_mariadb_db() {
|
||||||
|
if [[ -z "${MARIADB_DB_NAME:-}" || -z "${MARIADB_DB_USER:-}" ]]; then
|
||||||
|
msg_error "MARIADB_DB_NAME and MARIADB_DB_USER must be set before calling setup_mariadb_db"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z "${MARIADB_DB_PASS:-}" ]]; then
|
||||||
|
MARIADB_DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||||
|
fi
|
||||||
|
|
||||||
|
msg_info "Setting up MariaDB Database"
|
||||||
|
|
||||||
|
$STD mariadb -u root -e "CREATE DATABASE \`$MARIADB_DB_NAME\` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
|
||||||
|
$STD mariadb -u root -e "CREATE USER '$MARIADB_DB_USER'@'localhost' IDENTIFIED BY '$MARIADB_DB_PASS';"
|
||||||
|
$STD mariadb -u root -e "GRANT ALL ON \`$MARIADB_DB_NAME\`.* TO '$MARIADB_DB_USER'@'localhost';"
|
||||||
|
|
||||||
|
# Optional extra grants
|
||||||
|
if [[ -n "${MARIADB_DB_EXTRA_GRANTS:-}" ]]; then
|
||||||
|
IFS=',' read -ra G_LIST <<<"${MARIADB_DB_EXTRA_GRANTS:-}"
|
||||||
|
for g in "${G_LIST[@]}"; do
|
||||||
|
g=$(echo "$g" | xargs)
|
||||||
|
$STD mariadb -u root -e "$g TO '$MARIADB_DB_USER'@'localhost';"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Optional sql_mode override
|
||||||
|
if [[ -n "${MARIADB_DB_SQL_MODE:-}" ]]; then
|
||||||
|
$STD mariadb -u root -e "SET GLOBAL sql_mode='${MARIADB_DB_SQL_MODE:-}';"
|
||||||
|
fi
|
||||||
|
|
||||||
|
$STD mariadb -u root -e "FLUSH PRIVILEGES;"
|
||||||
|
|
||||||
|
local CREDS_FILE="${MARIADB_DB_CREDS_FILE:-${HOME}/${APPLICATION}.creds}"
|
||||||
|
{
|
||||||
|
echo "MariaDB Credentials"
|
||||||
|
echo "Database: $MARIADB_DB_NAME"
|
||||||
|
echo "User: $MARIADB_DB_USER"
|
||||||
|
echo "Password: $MARIADB_DB_PASS"
|
||||||
|
} >>"$CREDS_FILE"
|
||||||
|
|
||||||
|
msg_ok "Set up MariaDB Database"
|
||||||
|
|
||||||
|
export MARIADB_DB_NAME
|
||||||
|
export MARIADB_DB_USER
|
||||||
|
export MARIADB_DB_PASS
|
||||||
|
}
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Installs or updates MongoDB to specified major version.
|
# Installs or updates MongoDB to specified major version.
|
||||||
#
|
#
|
||||||
@@ -3819,6 +3891,103 @@ function setup_postgresql() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Creates PostgreSQL database with user and optional extensions
|
||||||
|
#
|
||||||
|
# Description:
|
||||||
|
# - Creates PostgreSQL role with login and password
|
||||||
|
# - Creates database with UTF8 encoding and template0
|
||||||
|
# - Installs optional extensions (postgis, pgvector, etc.)
|
||||||
|
# - Configures ALTER ROLE settings for Django/Rails compatibility
|
||||||
|
# - Saves credentials to file
|
||||||
|
# - Exports variables for use in calling script
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
# PG_DB_NAME="myapp_db" PG_DB_USER="myapp_user" setup_postgresql_db
|
||||||
|
# PG_DB_NAME="immich" PG_DB_USER="immich" PG_DB_EXTENSIONS="pgvector" setup_postgresql_db
|
||||||
|
# PG_DB_NAME="ghostfolio" PG_DB_USER="ghostfolio" PG_DB_GRANT_SUPERUSER="true" setup_postgresql_db
|
||||||
|
# PG_DB_NAME="adventurelog" PG_DB_USER="adventurelog" PG_DB_EXTENSIONS="postgis" setup_postgresql_db
|
||||||
|
#
|
||||||
|
# Variables:
|
||||||
|
# PG_DB_NAME - Database name (required)
|
||||||
|
# PG_DB_USER - Database user (required)
|
||||||
|
# PG_DB_PASS - Database password (optional, auto-generated if empty)
|
||||||
|
# PG_DB_EXTENSIONS - Comma-separated list of extensions (optional, e.g. "postgis,pgvector")
|
||||||
|
# PG_DB_GRANT_SUPERUSER - Grant SUPERUSER privilege (optional, "true" to enable, security risk!)
|
||||||
|
# PG_DB_SCHEMA_PERMS - Grant schema-level permissions (optional, "true" to enable)
|
||||||
|
# PG_DB_SKIP_ALTER_ROLE - Skip ALTER ROLE settings (optional, "true" to skip)
|
||||||
|
# PG_DB_CREDS_FILE - Credentials file path (optional, default: ~/${APPLICATION}.creds)
|
||||||
|
#
|
||||||
|
# Exports:
|
||||||
|
# PG_DB_NAME, PG_DB_USER, PG_DB_PASS - For use in calling script
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
function setup_postgresql_db() {
|
||||||
|
# Validation
|
||||||
|
if [[ -z "${PG_DB_NAME:-}" || -z "${PG_DB_USER:-}" ]]; then
|
||||||
|
msg_error "PG_DB_NAME and PG_DB_USER must be set before calling setup_postgresql_db"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Generate password if not provided
|
||||||
|
if [[ -z "${PG_DB_PASS:-}" ]]; then
|
||||||
|
PG_DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||||
|
fi
|
||||||
|
|
||||||
|
msg_info "Setting up PostgreSQL Database"
|
||||||
|
$STD sudo -u postgres psql -c "CREATE ROLE $PG_DB_USER WITH LOGIN PASSWORD '$PG_DB_PASS';"
|
||||||
|
$STD sudo -u postgres psql -c "CREATE DATABASE $PG_DB_NAME WITH OWNER $PG_DB_USER ENCODING 'UTF8' TEMPLATE template0;"
|
||||||
|
|
||||||
|
# Install extensions (comma-separated)
|
||||||
|
if [[ -n "${PG_DB_EXTENSIONS:-}" ]]; then
|
||||||
|
IFS=',' read -ra EXT_LIST <<<"${PG_DB_EXTENSIONS:-}"
|
||||||
|
for ext in "${EXT_LIST[@]}"; do
|
||||||
|
ext=$(echo "$ext" | xargs) # Trim whitespace
|
||||||
|
$STD sudo -u postgres psql -d "$PG_DB_NAME" -c "CREATE EXTENSION IF NOT EXISTS $ext;"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ALTER ROLE settings for Django/Rails compatibility (unless skipped)
|
||||||
|
if [[ "${PG_DB_SKIP_ALTER_ROLE:-}" != "true" ]]; then
|
||||||
|
$STD sudo -u postgres psql -c "ALTER ROLE $PG_DB_USER SET client_encoding TO 'utf8';"
|
||||||
|
$STD sudo -u postgres psql -c "ALTER ROLE $PG_DB_USER SET default_transaction_isolation TO 'read committed';"
|
||||||
|
$STD sudo -u postgres psql -c "ALTER ROLE $PG_DB_USER SET timezone TO 'UTC';"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Schema permissions (if requested)
|
||||||
|
if [[ "${PG_DB_SCHEMA_PERMS:-}" == "true" ]]; then
|
||||||
|
$STD sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $PG_DB_NAME TO $PG_DB_USER;"
|
||||||
|
$STD sudo -u postgres psql -c "ALTER USER $PG_DB_USER CREATEDB;"
|
||||||
|
$STD sudo -u postgres psql -d "$PG_DB_NAME" -c "GRANT ALL ON SCHEMA public TO $PG_DB_USER;"
|
||||||
|
$STD sudo -u postgres psql -d "$PG_DB_NAME" -c "GRANT CREATE ON SCHEMA public TO $PG_DB_USER;"
|
||||||
|
$STD sudo -u postgres psql -d "$PG_DB_NAME" -c "ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON TABLES TO $PG_DB_USER;"
|
||||||
|
$STD sudo -u postgres psql -d "$PG_DB_NAME" -c "ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON SEQUENCES TO $PG_DB_USER;"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Superuser grant (if requested - WARNING!)
|
||||||
|
if [[ "${PG_DB_GRANT_SUPERUSER:-}" == "true" ]]; then
|
||||||
|
msg_warn "Granting SUPERUSER privilege (security risk!)"
|
||||||
|
$STD sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $PG_DB_NAME to $PG_DB_USER;"
|
||||||
|
$STD sudo -u postgres psql -c "ALTER USER $PG_DB_USER WITH SUPERUSER;"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Save credentials
|
||||||
|
local CREDS_FILE="${PG_DB_CREDS_FILE:-${HOME}/${APPLICATION}.creds}"
|
||||||
|
{
|
||||||
|
echo "PostgreSQL Credentials"
|
||||||
|
echo "Database: $PG_DB_NAME"
|
||||||
|
echo "User: $PG_DB_USER"
|
||||||
|
echo "Password: $PG_DB_PASS"
|
||||||
|
} >>"$CREDS_FILE"
|
||||||
|
|
||||||
|
msg_ok "Set up PostgreSQL Database"
|
||||||
|
|
||||||
|
# Export for use in calling script
|
||||||
|
export PG_DB_NAME
|
||||||
|
export PG_DB_USER
|
||||||
|
export PG_DB_PASS
|
||||||
|
}
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Installs rbenv and ruby-build, installs Ruby and optionally Rails.
|
# Installs rbenv and ruby-build, installs Ruby and optionally Rails.
|
||||||
#
|
#
|
||||||
@@ -4172,31 +4341,63 @@ function setup_rust() {
|
|||||||
}
|
}
|
||||||
export PATH="$CARGO_BIN:$PATH"
|
export PATH="$CARGO_BIN:$PATH"
|
||||||
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >>"$HOME/.profile"
|
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >>"$HOME/.profile"
|
||||||
|
|
||||||
|
# Verify installation
|
||||||
|
if ! command -v rustc >/dev/null 2>&1; then
|
||||||
|
msg_error "Rust binary not found after installation"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
local RUST_VERSION=$(rustc --version 2>/dev/null | awk '{print $2}')
|
local RUST_VERSION=$(rustc --version 2>/dev/null | awk '{print $2}')
|
||||||
|
if [[ -z "$RUST_VERSION" ]]; then
|
||||||
|
msg_error "Failed to determine Rust version"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
cache_installed_version "rust" "$RUST_VERSION"
|
cache_installed_version "rust" "$RUST_VERSION"
|
||||||
msg_ok "Setup Rust $RUST_VERSION"
|
msg_ok "Setup Rust $RUST_VERSION"
|
||||||
else
|
else
|
||||||
# Scenario 2: Rustup already installed - update/maintain
|
# Scenario 2: Rustup already installed - update/maintain
|
||||||
msg_info "Update Rust ($RUST_TOOLCHAIN)"
|
msg_info "Update Rust ($RUST_TOOLCHAIN)"
|
||||||
$STD rustup install "$RUST_TOOLCHAIN" || {
|
|
||||||
msg_error "Failed to install Rust toolchain $RUST_TOOLCHAIN"
|
# Ensure default toolchain is set
|
||||||
return 1
|
$STD rustup default "$RUST_TOOLCHAIN" 2>/dev/null || {
|
||||||
}
|
# If default fails, install the toolchain first
|
||||||
$STD rustup default "$RUST_TOOLCHAIN" || {
|
$STD rustup install "$RUST_TOOLCHAIN" || {
|
||||||
msg_error "Failed to set default Rust toolchain"
|
msg_error "Failed to install Rust toolchain $RUST_TOOLCHAIN"
|
||||||
return 1
|
return 1
|
||||||
|
}
|
||||||
|
$STD rustup default "$RUST_TOOLCHAIN" || {
|
||||||
|
msg_error "Failed to set default Rust toolchain"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Update to latest patch version
|
||||||
$STD rustup update "$RUST_TOOLCHAIN" || true
|
$STD rustup update "$RUST_TOOLCHAIN" || true
|
||||||
|
|
||||||
|
# Ensure PATH is updated for current shell session
|
||||||
|
export PATH="$CARGO_BIN:$PATH"
|
||||||
|
|
||||||
local RUST_VERSION=$(rustc --version 2>/dev/null | awk '{print $2}')
|
local RUST_VERSION=$(rustc --version 2>/dev/null | awk '{print $2}')
|
||||||
|
if [[ -z "$RUST_VERSION" ]]; then
|
||||||
|
msg_error "Failed to determine Rust version after update"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
cache_installed_version "rust" "$RUST_VERSION"
|
cache_installed_version "rust" "$RUST_VERSION"
|
||||||
msg_ok "Update Rust $RUST_VERSION"
|
msg_ok "Update Rust $RUST_VERSION"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install global crates
|
# Install global crates
|
||||||
if [[ -n "$RUST_CRATES" ]]; then
|
if [[ -n "$RUST_CRATES" ]]; then
|
||||||
|
msg_info "Processing Rust crates: $RUST_CRATES"
|
||||||
IFS=',' read -ra CRATES <<<"$RUST_CRATES"
|
IFS=',' read -ra CRATES <<<"$RUST_CRATES"
|
||||||
for crate in "${CRATES[@]}"; do
|
for crate in "${CRATES[@]}"; do
|
||||||
local NAME VER INSTALLED_VER
|
crate=$(echo "$crate" | xargs) # trim whitespace
|
||||||
|
[[ -z "$crate" ]] && continue # skip empty entries
|
||||||
|
|
||||||
|
local NAME VER INSTALLED_VER CRATE_LIST
|
||||||
if [[ "$crate" == *"@"* ]]; then
|
if [[ "$crate" == *"@"* ]]; then
|
||||||
NAME="${crate%@*}"
|
NAME="${crate%@*}"
|
||||||
VER="${crate##*@}"
|
VER="${crate##*@}"
|
||||||
@@ -4205,18 +4406,50 @@ function setup_rust() {
|
|||||||
VER=""
|
VER=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
INSTALLED_VER=$(cargo install --list 2>/dev/null | awk "/^$NAME v[0-9]/ {print \$2}" | tr -d 'v')
|
# Get list of installed crates once
|
||||||
|
CRATE_LIST=$(cargo install --list 2>/dev/null || echo "")
|
||||||
|
|
||||||
|
# Check if already installed
|
||||||
|
if echo "$CRATE_LIST" | grep -q "^${NAME} "; then
|
||||||
|
INSTALLED_VER=$(echo "$CRATE_LIST" | grep "^${NAME} " | head -1 | awk '{print $2}' | tr -d 'v:')
|
||||||
|
|
||||||
if [[ -n "$INSTALLED_VER" ]]; then
|
|
||||||
if [[ -n "$VER" && "$VER" != "$INSTALLED_VER" ]]; then
|
if [[ -n "$VER" && "$VER" != "$INSTALLED_VER" ]]; then
|
||||||
$STD cargo install "$NAME" --version "$VER" --force
|
msg_info "Upgrading $NAME from v$INSTALLED_VER to v$VER"
|
||||||
|
$STD cargo install "$NAME" --version "$VER" --force || {
|
||||||
|
msg_error "Failed to install $NAME@$VER"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
msg_ok "Upgraded $NAME to v$VER"
|
||||||
elif [[ -z "$VER" ]]; then
|
elif [[ -z "$VER" ]]; then
|
||||||
$STD cargo install "$NAME" --force
|
msg_info "Upgrading $NAME to latest"
|
||||||
|
$STD cargo install "$NAME" --force || {
|
||||||
|
msg_error "Failed to upgrade $NAME"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
local NEW_VER=$(cargo install --list 2>/dev/null | grep "^${NAME} " | head -1 | awk '{print $2}' | tr -d 'v:')
|
||||||
|
msg_ok "Upgraded $NAME to v$NEW_VER"
|
||||||
|
else
|
||||||
|
msg_ok "$NAME v$INSTALLED_VER already installed"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
$STD cargo install "$NAME" ${VER:+--version "$VER"}
|
msg_info "Installing $NAME${VER:+@$VER}"
|
||||||
|
if [[ -n "$VER" ]]; then
|
||||||
|
$STD cargo install "$NAME" --version "$VER" || {
|
||||||
|
msg_error "Failed to install $NAME@$VER"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
msg_ok "Installed $NAME v$VER"
|
||||||
|
else
|
||||||
|
$STD cargo install "$NAME" || {
|
||||||
|
msg_error "Failed to install $NAME"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
local NEW_VER=$(cargo install --list 2>/dev/null | grep "^${NAME} " | head -1 | awk '{print $2}' | tr -d 'v:')
|
||||||
|
msg_ok "Installed $NAME v$NEW_VER"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
msg_ok "Processed Rust crates"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4353,7 +4586,9 @@ function setup_uv() {
|
|||||||
|
|
||||||
# Optional: Generate shell completions
|
# Optional: Generate shell completions
|
||||||
$STD uv generate-shell-completion bash >/etc/bash_completion.d/uv 2>/dev/null || true
|
$STD uv generate-shell-completion bash >/etc/bash_completion.d/uv 2>/dev/null || true
|
||||||
$STD uv generate-shell-completion zsh >/usr/share/zsh/site-functions/_uv 2>/dev/null || true
|
if [[ -d /usr/share/zsh/site-functions ]]; then
|
||||||
|
$STD uv generate-shell-completion zsh >/usr/share/zsh/site-functions/_uv 2>/dev/null || true
|
||||||
|
fi
|
||||||
|
|
||||||
# Optional: Install specific Python version if requested
|
# Optional: Install specific Python version if requested
|
||||||
if [[ -n "${PYTHON_VERSION:-}" ]]; then
|
if [[ -n "${PYTHON_VERSION:-}" ]]; then
|
||||||
@@ -4466,4 +4701,4 @@ function setup_yq() {
|
|||||||
FINAL_VERSION=$("$BINARY_PATH" --version 2>/dev/null | awk '{print $NF}' | sed 's/^v//')
|
FINAL_VERSION=$("$BINARY_PATH" --version 2>/dev/null | awk '{print $NF}' | sed 's/^v//')
|
||||||
cache_installed_version "yq" "$FINAL_VERSION"
|
cache_installed_version "yq" "$FINAL_VERSION"
|
||||||
msg_ok "Setup yq $FINAL_VERSION"
|
msg_ok "Setup yq $FINAL_VERSION"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,44 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "2FAuth",
|
|
||||||
"slug": "2fauth",
|
|
||||||
"categories": [
|
|
||||||
6
|
|
||||||
],
|
|
||||||
"date_created": "2024-12-20",
|
|
||||||
"type": "ct",
|
|
||||||
"updateable": true,
|
|
||||||
"privileged": false,
|
|
||||||
"interface_port": 80,
|
|
||||||
"documentation": "https://docs.2fauth.app/",
|
|
||||||
"website": "https://2fauth.app/",
|
|
||||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/2fauth.webp",
|
|
||||||
"config_path": "cat /opt/2fauth/.env",
|
|
||||||
"description": "2FAuth is a web based self-hosted alternative to One Time Passcode (OTP) generators like Google Authenticator, designed for both mobile and desktop. It aims to ease you perform your 2FA authentication steps whatever the device you handle, with a clean and suitable interface.",
|
|
||||||
"install_methods": [
|
|
||||||
{
|
|
||||||
"type": "default",
|
|
||||||
"script": "ct/2fauth.sh",
|
|
||||||
"resources": {
|
|
||||||
"cpu": 1,
|
|
||||||
"ram": 512,
|
|
||||||
"hdd": 2,
|
|
||||||
"os": "debian",
|
|
||||||
"version": "13"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"default_credentials": {
|
|
||||||
"username": null,
|
|
||||||
"password": null
|
|
||||||
},
|
|
||||||
"notes": [
|
|
||||||
{
|
|
||||||
"text": "Database credentials: `cat ~/2FAuth.creds`",
|
|
||||||
"type": "info"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"text": "The very first account created is automatically set up as an administrator account.",
|
|
||||||
"type": "info"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -31,5 +31,6 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -48,5 +48,6 @@
|
|||||||
"text": "You can execute the ip tool manually with `iptag-run`",
|
"text": "You can execute the ip tool manually with `iptag-run`",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -44,5 +44,6 @@
|
|||||||
"text": "The script only works in Debian/Ubuntu, not in Alpine!",
|
"text": "The script only works in Debian/Ubuntu, not in Alpine!",
|
||||||
"type": "warning"
|
"type": "warning"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -40,5 +40,6 @@
|
|||||||
"text": "Execute within the Proxmox host shell",
|
"text": "Execute within the Proxmox host shell",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -47,5 +47,6 @@
|
|||||||
"text": "AdGuard Home can only be updated via the user interface.",
|
"text": "AdGuard Home can only be updated via the user interface.",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -40,5 +40,6 @@
|
|||||||
"text": "Use `cat ~/adventurelog.creds` to see login credentials.",
|
"text": "Use `cat ~/adventurelog.creds` to see login credentials.",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -31,5 +31,6 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"text": "Resource and network settings are adjustable post LXC creation.",
|
"text": "Resource and network settings are adjustable post LXC creation.",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -42,5 +42,6 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -31,5 +31,6 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -47,5 +47,6 @@
|
|||||||
"text": "The default credentials are located in `/opt/tinyauth/credentials.txt`.",
|
"text": "The default credentials are located in `/opt/tinyauth/credentials.txt`.",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"text": "To Update Alpine: `apk -U upgrade`",
|
"text": "To Update Alpine: `apk -U upgrade`",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -31,5 +31,6 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"text": "Show Login Credentials: `cat CouchDB.creds`",
|
"text": "Show Login Credentials: `cat CouchDB.creds`",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -31,5 +31,6 @@
|
|||||||
"username": "guacadmin",
|
"username": "guacadmin",
|
||||||
"password": "guacadmin"
|
"password": "guacadmin"
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"text": "Configuration file is not created at install time. Example is at: `https://cwiki.apache.org/confluence/display/TIKA/TikaServer+in+Tika+2.x`",
|
"text": "Configuration file is not created at install time. Example is at: `https://cwiki.apache.org/confluence/display/TIKA/TikaServer+in+Tika+2.x`",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"text": "User can select which Adoptium JDK should be used for the selected Tomcat version (9, 10.1 or 11). ",
|
"text": "User can select which Adoptium JDK should be used for the selected Tomcat version (9, 10.1 or 11). ",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -31,5 +31,6 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -31,5 +31,6 @@
|
|||||||
"username": "archivebox",
|
"username": "archivebox",
|
||||||
"password": "helper-scripts.com"
|
"password": "helper-scripts.com"
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"text": "doesnt work with lvm and lvmthin disks!",
|
"text": "doesnt work with lvm and lvmthin disks!",
|
||||||
"type": "warning"
|
"type": "warning"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -31,5 +31,6 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"text": "Within the LXC console, run `cat rpc.secret` to display the rpc-secret. Copy this token and paste it into the Aria2 RPC Secret Token box within the AriaNG Settings. Then, click the reload AriaNG button.",
|
"text": "Within the LXC console, run `cat rpc.secret` to display the rpc-secret. Copy this token and paste it into the Aria2 RPC Secret Token box within the AriaNG Settings. Then, click the reload AriaNG button.",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -31,5 +31,6 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -31,5 +31,6 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"text": "During installation, you will have to input your domain (ex. domain.com). Authelia will use auth.domain.com",
|
"text": "During installation, you will have to input your domain (ex. domain.com). Authelia will use auth.domain.com",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -31,5 +31,6 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -31,5 +31,6 @@
|
|||||||
"username": "admin",
|
"username": "admin",
|
||||||
"password": "admin123"
|
"password": "admin123"
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"text": "for private SSL setup visit: `https://github.com/babybuddy/babybuddy/blob/master/docs/setup/ssl.md`",
|
"text": "for private SSL setup visit: `https://github.com/babybuddy/babybuddy/blob/master/docs/setup/ssl.md`",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"type": "info",
|
"type": "info",
|
||||||
"text": "`cat ~/.ssh/id_ed25519.pub` to view ssh public key. This key is used to authenticate with sftp targets. You can add this key on the sftp server."
|
"text": "`cat ~/.ssh/id_ed25519.pub` to view ssh public key. This key is used to authenticate with sftp targets. You can add this key on the sftp server."
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -31,5 +31,6 @@
|
|||||||
"username": "Admin",
|
"username": "Admin",
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -31,5 +31,6 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"text": "After install enable the option \"Use Redis cache\" on the settings page.",
|
"text": "After install enable the option \"Use Redis cache\" on the settings page.",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
"ram": 1024,
|
"ram": 1024,
|
||||||
"hdd": 4,
|
"hdd": 4,
|
||||||
"os": "debian",
|
"os": "debian",
|
||||||
"version": "12"
|
"version": "13"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -31,5 +31,6 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -31,5 +31,6 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -47,5 +47,6 @@
|
|||||||
"text": "During installation you will be asked to enter your TMDB API key, if you wanna use it. Make sure you have it ready.",
|
"text": "During installation you will be asked to enter your TMDB API key, if you wanna use it. Make sure you have it ready.",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -31,5 +31,6 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"text": "Starting Booklore (Web UI) may take up to 2 minutes after a restart or fresh installation.",
|
"text": "Starting Booklore (Web UI) may take up to 2 minutes after a restart or fresh installation.",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"text": "Bookstack works only with static ip. If you Change the IP of your LXC, you Need to edit the .env File `nano /opt/bookstack/.env`",
|
"text": "Bookstack works only with static ip. If you Change the IP of your LXC, you Need to edit the .env File `nano /opt/bookstack/.env`",
|
||||||
"type": "warning"
|
"type": "warning"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"text": "WARNING: Installation sources scripts outside of Community Scripts repo. Please check the source before installing.",
|
"text": "WARNING: Installation sources scripts outside of Community Scripts repo. Please check the source before installing.",
|
||||||
"type": "warning"
|
"type": "warning"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -31,5 +31,6 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -55,5 +55,6 @@
|
|||||||
"text": "if you need an external module run: `xcaddy build --with github.com/caddy-dns/cloudflare`",
|
"text": "if you need an external module run: `xcaddy build --with github.com/caddy-dns/cloudflare`",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -40,5 +40,6 @@
|
|||||||
"text": "WARNING: Installation sources scripts outside of Community Scripts repo. Please check the source before installing.",
|
"text": "WARNING: Installation sources scripts outside of Community Scripts repo. Please check the source before installing.",
|
||||||
"type": "warning"
|
"type": "warning"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -31,5 +31,6 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"text": "WARNING: Installation sources scripts outside of Community Scripts repo. Please check the source before installing.",
|
"text": "WARNING: Installation sources scripts outside of Community Scripts repo. Please check the source before installing.",
|
||||||
"type": "warning"
|
"type": "warning"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"text": "Login Credentials : `cat ~/checkmk.creds`",
|
"text": "Login Credentials : `cat ~/checkmk.creds`",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"text": "Execute within the Proxmox shell",
|
"text": "Execute within the Proxmox shell",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"text": "Execute within the Proxmox shell",
|
"text": "Execute within the Proxmox shell",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -31,5 +31,6 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -40,5 +40,6 @@
|
|||||||
"text": "To update the configuration edit `/etc/systemd/system/cloudflare-ddns.service`. After edit please restart with `systemctl restart cloudflare-ddns`",
|
"text": "To update the configuration edit `/etc/systemd/system/cloudflare-ddns.service`. After edit please restart with `systemctl restart cloudflare-ddns`",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"text": "With an option to configure cloudflared as a DNS-over-HTTPS (DoH) proxy",
|
"text": "With an option to configure cloudflared as a DNS-over-HTTPS (DoH) proxy",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"text": "After Installation: Register your user -> Login -> Dashboard -> Accept Primary URL.",
|
"text": "After Installation: Register your user -> Login -> Dashboard -> Accept Primary URL.",
|
||||||
"type": "warn"
|
"type": "warn"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -33,8 +33,13 @@
|
|||||||
},
|
},
|
||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Set a root password if using autologin. This will be the Cockpit password.`sudo passwd root`",
|
"text": "Set a root password if using autologin. This will be the Cockpit password. To set root password run `sudo passwd root`",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "If you plan on using 45Drives extension with NFS, you must setup LXC as privileged. Some features of 45Drives don't work on Debian 13, so Debian 12 must be used.",
|
||||||
|
"type": "warning"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -38,5 +38,6 @@
|
|||||||
"text": "Execute within an existing LXC Console",
|
"text": "Execute within an existing LXC Console",
|
||||||
"type": "warning"
|
"type": "warning"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -31,5 +31,6 @@
|
|||||||
"username": "admin",
|
"username": "admin",
|
||||||
"password": "admin"
|
"password": "admin"
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"text": "change secrets file /opt/configarr/secrets.yml",
|
"text": "change secrets file /opt/configarr/secrets.yml",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"text": "Complete setup via the web interface at http://<container-ip>:3000. Create and secure the admin account immediately.",
|
"text": "Complete setup via the web interface at http://<container-ip>:3000. Create and secure the admin account immediately.",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"text": "Execute within the Proxmox shell or in LXC",
|
"text": "Execute within the Proxmox shell or in LXC",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -37,5 +37,6 @@
|
|||||||
"type": "info",
|
"type": "info",
|
||||||
"text": "The file `/etc/sysconfig/CosmosCloud` is optional. If you need custom settings, you can create it yourself."
|
"text": "The file `/etc/sysconfig/CosmosCloud` is optional. If you need custom settings, you can create it yourself."
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"text": "Show password: `cat ~/crafty-controller.creds`",
|
"text": "Show password: `cat ~/crafty-controller.creds`",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -40,5 +40,6 @@
|
|||||||
"text": "To exclude LXCs from updating, edit the crontab using `crontab -e` and add CTID as shown in the example below:\n\n\n\n`0 0 * * 0 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/update-lxcs-cron.sh)\" -s 103 111 >>/var/log/update-lxcs-cron.log 2>/dev/null`",
|
"text": "To exclude LXCs from updating, edit the crontab using `crontab -e` and add CTID as shown in the example below:\n\n\n\n`0 0 * * 0 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/update-lxcs-cron.sh)\" -s 103 111 >>/var/log/update-lxcs-cron.log 2>/dev/null`",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -28,13 +28,14 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"default_credentials": {
|
"default_credentials": {
|
||||||
"username": null,
|
"username": "admin",
|
||||||
"password": null
|
"password": "admin"
|
||||||
},
|
},
|
||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Primary and Worker Private Keys Must Match in the config file",
|
"text": "Primary and Worker Private Keys Must Match in the config file",
|
||||||
"type": "warning"
|
"type": "warning"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"text": "After the installation cross-seed will fail to start with an empty configuration. To fix this, edit the config file to properly configure cross-seed, then restart by running `systemctl restart cross-seed`.",
|
"text": "After the installation cross-seed will fail to start with an empty configuration. To fix this, edit the config file to properly configure cross-seed, then restart by running `systemctl restart cross-seed`.",
|
||||||
"type": "warning"
|
"type": "warning"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"text": "Execute within an existing LXC Console. Debian only!",
|
"text": "Execute within an existing LXC Console. Debian only!",
|
||||||
"type": "warning"
|
"type": "warning"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"text": "After installation finishes, `systemctl status cryptpad.service` to get token URL which you can use to create admin account",
|
"text": "After installation finishes, `systemctl status cryptpad.service` to get token URL which you can use to create admin account",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -31,5 +31,6 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -31,5 +31,6 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -44,5 +44,6 @@
|
|||||||
"text": "If you use Cloud-init, checkout after installation: ´https://github.com/community-scripts/ProxmoxVE/discussions/272´",
|
"text": "If you use Cloud-init, checkout after installation: ´https://github.com/community-scripts/ProxmoxVE/discussions/272´",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -40,5 +40,6 @@
|
|||||||
"text": "After installation, checkout: ´https://github.com/community-scripts/ProxmoxVE/discussions/836´ for useful Debian commands",
|
"text": "After installation, checkout: ´https://github.com/community-scripts/ProxmoxVE/discussions/836´ for useful Debian commands",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -31,5 +31,6 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -31,5 +31,6 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -31,5 +31,6 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": "deluge"
|
"password": "deluge"
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -41,5 +41,6 @@
|
|||||||
"text": "This Script works on amd64 and arm64 Architecture.",
|
"text": "This Script works on amd64 and arm64 Architecture.",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -55,5 +55,6 @@
|
|||||||
"text": "Options to Install Portainer and/or Docker Compose V2",
|
"text": "Options to Install Portainer and/or Docker Compose V2",
|
||||||
"type": "warning"
|
"type": "warning"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -40,5 +40,6 @@
|
|||||||
"text": "If the LXC is created Privileged, the script will automatically set up USB passthrough.",
|
"text": "If the LXC is created Privileged, the script will automatically set up USB passthrough.",
|
||||||
"type": "warning"
|
"type": "warning"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"text": "Use `cat ~/docmost.creds` to see database credentials.",
|
"text": "Use `cat ~/docmost.creds` to see database credentials.",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -31,5 +31,6 @@
|
|||||||
"username": "helper-scripts@local.com",
|
"username": "helper-scripts@local.com",
|
||||||
"password": "helper-scripts"
|
"password": "helper-scripts"
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"text": "Database credentials: `cat ~/dolibarr.creds`",
|
"text": "Database credentials: `cat ~/dolibarr.creds`",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"text": "FTP server credentials: `cat ~/ftp.creds`",
|
"text": "FTP server credentials: `cat ~/ftp.creds`",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"text": "Admin password and database encryption key: `cat ~/duplicati.creds`",
|
"text": "Admin password and database encryption key: `cat ~/duplicati.creds`",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -44,5 +44,6 @@
|
|||||||
"type": "info",
|
"type": "info",
|
||||||
"text": "For bridges Installation methods (WhatsApp, Signal, Discord, etc.), see: ´https://docs.mau.fi/bridges/go/setup.html´"
|
"text": "For bridges Installation methods (WhatsApp, Signal, Discord, etc.), see: ´https://docs.mau.fi/bridges/go/setup.html´"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"text": "With Privileged/Unprivileged Hardware Acceleration Support",
|
"text": "With Privileged/Unprivileged Hardware Acceleration Support",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"text": "Setup-Steps: Access Control ➡ Authentication ➡ Create ➡ Next ➡ Next ➡ Create ➡ Users ➡ Add ➡ Username / Password (to authenicate with MQTT) ➡ Save. You're now ready to enjoy a high-performance MQTT Broker.",
|
"text": "Setup-Steps: Access Control ➡ Authentication ➡ Create ➡ Next ➡ Next ➡ Create ➡ Users ➡ Add ➡ Username / Password (to authenicate with MQTT) ➡ Save. You're now ready to enjoy a high-performance MQTT Broker.",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -31,5 +31,6 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -31,5 +31,6 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,6 @@
|
|||||||
"text": "To configure evcc, type `cd /etc` followed by `evcc configure` in the evcc LXC shell",
|
"text": "To configure evcc, type `cd /etc` followed by `evcc configure` in the evcc LXC shell",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -31,5 +31,6 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [],
|
||||||
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
}
|
}
|
||||||
@@ -44,5 +44,6 @@
|
|||||||
"text": "Stopped containers will be started temporarily to run the command, then shut down again.",
|
"text": "Stopped containers will be started temporarily to run the command, then shut down again.",
|
||||||
"type": "warning"
|
"type": "warning"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
}
|
"repository_url": "https://github.com/community-scripts/ProxmoxVE"
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user