mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-03-24 10:53:00 +01:00
Compare commits
2 Commits
refactor/t
...
copilot/fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
efb6e7fdc5 | ||
|
|
66140c714f |
180
.github/changelogs/2026/03.md
generated
vendored
180
.github/changelogs/2026/03.md
generated
vendored
@@ -1,183 +1,3 @@
|
||||
## 2026-03-21
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Anytype-server: wait for MongoDB readiness before rs.initiate() [@MickLesk](https://github.com/MickLesk) ([#13165](https://github.com/community-scripts/ProxmoxVE/pull/13165))
|
||||
- Frigate: use correct CPU model fallback path [@MickLesk](https://github.com/MickLesk) ([#13164](https://github.com/community-scripts/ProxmoxVE/pull/13164))
|
||||
- iSponsorBlockTV: Fix release fetching [@tremor021](https://github.com/tremor021) ([#13157](https://github.com/community-scripts/ProxmoxVE/pull/13157))
|
||||
- Isponsorblocktv: use quoted heredoc to prevent unbound variable error during CLI wrapper creation [@Copilot](https://github.com/Copilot) ([#13146](https://github.com/community-scripts/ProxmoxVE/pull/13146))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- Headscale: Enable TUN [@tremor021](https://github.com/tremor021) ([#13158](https://github.com/community-scripts/ProxmoxVE/pull/13158))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- core: add missing -searchdomain/-nameserver prefix in base_settings [@MickLesk](https://github.com/MickLesk) ([#13166](https://github.com/community-scripts/ProxmoxVE/pull/13166))
|
||||
|
||||
## 2026-03-20
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- iSponsorBlockTV ([#13123](https://github.com/community-scripts/ProxmoxVE/pull/13123))
|
||||
- Alpine-Wakapi ([#13119](https://github.com/community-scripts/ProxmoxVE/pull/13119))
|
||||
- teleport ([#13086](https://github.com/community-scripts/ProxmoxVE/pull/13086))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Reactive-Resume: add git dependency for v5.0.13+ [@MickLesk](https://github.com/MickLesk) ([#13133](https://github.com/community-scripts/ProxmoxVE/pull/13133))
|
||||
- Scanopy: increase default CPU, RAM, and HDD to prevent OOM during Rust build [@Copilot](https://github.com/Copilot) ([#13130](https://github.com/community-scripts/ProxmoxVE/pull/13130))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- Immich: v2.6.1 [@vhsdream](https://github.com/vhsdream) ([#13111](https://github.com/community-scripts/ProxmoxVE/pull/13111))
|
||||
- VM's: add input validation and hostname sanitization to all VM scripts [@MickLesk](https://github.com/MickLesk) ([#12973](https://github.com/community-scripts/ProxmoxVE/pull/12973))
|
||||
|
||||
### 🧰 Tools
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- Harden code-server addon install script [@MickLesk](https://github.com/MickLesk) ([#13116](https://github.com/community-scripts/ProxmoxVE/pull/13116))
|
||||
|
||||
## 2026-03-19
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- Owncast: increase default disk size from 2GB to 10GB [@Copilot](https://github.com/Copilot) ([#13079](https://github.com/community-scripts/ProxmoxVE/pull/13079))
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- fix: remove extra backslash to match single quoted here-doc [@Zelnes](https://github.com/Zelnes) ([#13108](https://github.com/community-scripts/ProxmoxVE/pull/13108))
|
||||
- Reactive-Resume: Upgrade Node to 24 and enable Corepack [@MickLesk](https://github.com/MickLesk) ([#13093](https://github.com/community-scripts/ProxmoxVE/pull/13093))
|
||||
- Increase Tracearr RAM; derive APP_VERSION [@MickLesk](https://github.com/MickLesk) ([#13087](https://github.com/community-scripts/ProxmoxVE/pull/13087))
|
||||
- ProjectSend: Update application access URL [@tremor021](https://github.com/tremor021) ([#13078](https://github.com/community-scripts/ProxmoxVE/pull/13078))
|
||||
- Dispatcharr: use npm install --no-audit --progress=false [@MickLesk](https://github.com/MickLesk) ([#13074](https://github.com/community-scripts/ProxmoxVE/pull/13074))
|
||||
- core: reorder hwaccel setup and adjust GPU group usermod [@MickLesk](https://github.com/MickLesk) ([#13072](https://github.com/community-scripts/ProxmoxVE/pull/13072))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- tools.func: display pin reason in release-check messages [@MickLesk](https://github.com/MickLesk) ([#13095](https://github.com/community-scripts/ProxmoxVE/pull/13095))
|
||||
- NocoDB: Unpin Version to latest [@MickLesk](https://github.com/MickLesk) ([#13094](https://github.com/community-scripts/ProxmoxVE/pull/13094))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- tools.func: use dpkg-query for reliable JDK version detection [@MickLesk](https://github.com/MickLesk) ([#13101](https://github.com/community-scripts/ProxmoxVE/pull/13101))
|
||||
|
||||
### 📚 Documentation
|
||||
|
||||
- Update link from helper-scripts.com to community-scripts.org [@adnanvaldes](https://github.com/adnanvaldes) ([#13098](https://github.com/community-scripts/ProxmoxVE/pull/13098))
|
||||
- github: add PocketBase bot workflow [@MickLesk](https://github.com/MickLesk) ([#13075](https://github.com/community-scripts/ProxmoxVE/pull/13075))
|
||||
|
||||
## 2026-03-18
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- Alpine-Ntfy [@MickLesk](https://github.com/MickLesk) ([#13048](https://github.com/community-scripts/ProxmoxVE/pull/13048))
|
||||
- Split-Pro ([#12975](https://github.com/community-scripts/ProxmoxVE/pull/12975))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Tdarr: use curl_with_retry and correct exit code [@MickLesk](https://github.com/MickLesk) ([#13060](https://github.com/community-scripts/ProxmoxVE/pull/13060))
|
||||
- reitti: fix: v4 [@CrazyWolf13](https://github.com/CrazyWolf13) ([#13039](https://github.com/community-scripts/ProxmoxVE/pull/13039))
|
||||
- Paperless-NGX: increase default RAM to 3GB [@MickLesk](https://github.com/MickLesk) ([#13018](https://github.com/community-scripts/ProxmoxVE/pull/13018))
|
||||
- Plex: restart service after update to apply new version [@MickLesk](https://github.com/MickLesk) ([#13017](https://github.com/community-scripts/ProxmoxVE/pull/13017))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- tools: centralize GPU group setup via setup_hwaccel [@MickLesk](https://github.com/MickLesk) ([#13044](https://github.com/community-scripts/ProxmoxVE/pull/13044))
|
||||
- Termix: add guacd build and systemd integration [@MickLesk](https://github.com/MickLesk) ([#12999](https://github.com/community-scripts/ProxmoxVE/pull/12999))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- Podman: replace deprecated commands with Quadlets [@MickLesk](https://github.com/MickLesk) ([#13052](https://github.com/community-scripts/ProxmoxVE/pull/13052))
|
||||
- Refactor: Jellyfin repo, ffmpeg package and symlinks [@MickLesk](https://github.com/MickLesk) ([#13045](https://github.com/community-scripts/ProxmoxVE/pull/13045))
|
||||
- pve-scripts-local: Increase default disk size from 4GB to 10GB [@MickLesk](https://github.com/MickLesk) ([#13009](https://github.com/community-scripts/ProxmoxVE/pull/13009))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- tools.func Implement pg_cron setup for setup_postgresql [@MickLesk](https://github.com/MickLesk) ([#13053](https://github.com/community-scripts/ProxmoxVE/pull/13053))
|
||||
- tools.func: Implement check_for_gh_tag function [@MickLesk](https://github.com/MickLesk) ([#12998](https://github.com/community-scripts/ProxmoxVE/pull/12998))
|
||||
- tools.func: Implement fetch_and_deploy_gh_tag function [@MickLesk](https://github.com/MickLesk) ([#13000](https://github.com/community-scripts/ProxmoxVE/pull/13000))
|
||||
|
||||
## 2026-03-17
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Gluetun: add OpenVPN process user and cleanup stale config [@MickLesk](https://github.com/MickLesk) ([#13016](https://github.com/community-scripts/ProxmoxVE/pull/13016))
|
||||
- Frigate: check OpenVino model files exist before configuring detector and use curl_with_retry instead of default wget [@MickLesk](https://github.com/MickLesk) ([#13019](https://github.com/community-scripts/ProxmoxVE/pull/13019))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- tools.func: Update `create_self_signed_cert()` [@tremor021](https://github.com/tremor021) ([#13008](https://github.com/community-scripts/ProxmoxVE/pull/13008))
|
||||
|
||||
## 2026-03-16
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- Gluetun ([#12976](https://github.com/community-scripts/ProxmoxVE/pull/12976))
|
||||
- Anytype-Server ([#12974](https://github.com/community-scripts/ProxmoxVE/pull/12974))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Immich: use gcc-13 for compilation & add uv python pre-install with retry logic [@MickLesk](https://github.com/MickLesk) ([#12935](https://github.com/community-scripts/ProxmoxVE/pull/12935))
|
||||
- Tautulli: add setuptools<81 constraint to update script [@MickLesk](https://github.com/MickLesk) ([#12959](https://github.com/community-scripts/ProxmoxVE/pull/12959))
|
||||
- Seerr: add missing build deps [@MickLesk](https://github.com/MickLesk) ([#12960](https://github.com/community-scripts/ProxmoxVE/pull/12960))
|
||||
- fix: yubal update [@CrazyWolf13](https://github.com/CrazyWolf13) ([#12961](https://github.com/community-scripts/ProxmoxVE/pull/12961))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- hwaccel: remove ROCm install from AMD APU setup [@MickLesk](https://github.com/MickLesk) ([#12958](https://github.com/community-scripts/ProxmoxVE/pull/12958))
|
||||
|
||||
## 2026-03-15
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- Yamtrack ([#12936](https://github.com/community-scripts/ProxmoxVE/pull/12936))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Wishlist: use --frozen-lockfile for pnpm install [@MickLesk](https://github.com/MickLesk) ([#12892](https://github.com/community-scripts/ProxmoxVE/pull/12892))
|
||||
- SparkyFitness: use --legacy-peer-deps for npm install [@MickLesk](https://github.com/MickLesk) ([#12888](https://github.com/community-scripts/ProxmoxVE/pull/12888))
|
||||
- Frigate: add fallback for OpenVino labelmap file [@MickLesk](https://github.com/MickLesk) ([#12889](https://github.com/community-scripts/ProxmoxVE/pull/12889))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- Refactor: ITSM-NG [@MickLesk](https://github.com/MickLesk) ([#12918](https://github.com/community-scripts/ProxmoxVE/pull/12918))
|
||||
- core: unify RELEASE variable for check_for_gh_release and fetch_and_deploy [@MickLesk](https://github.com/MickLesk) ([#12917](https://github.com/community-scripts/ProxmoxVE/pull/12917))
|
||||
- Standardize NSAPP names across VM scripts [@MickLesk](https://github.com/MickLesk) ([#12924](https://github.com/community-scripts/ProxmoxVE/pull/12924))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- core: retry downloads with exponential backoff [@MickLesk](https://github.com/MickLesk) ([#12896](https://github.com/community-scripts/ProxmoxVE/pull/12896))
|
||||
|
||||
### ❔ Uncategorized
|
||||
|
||||
- [go2rtc] Add ffmpeg dependency to install script [@Copilot](https://github.com/Copilot) ([#12944](https://github.com/community-scripts/ProxmoxVE/pull/12944))
|
||||
|
||||
## 2026-03-14
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
16
.github/workflows/update-script-timestamp-on-sh-change.yml
generated
vendored
16
.github/workflows/update-script-timestamp-on-sh-change.yml
generated
vendored
@@ -155,21 +155,13 @@ jobs:
|
||||
console.log('Slug not in DB, skipping: ' + slug);
|
||||
continue;
|
||||
}
|
||||
const today = new Date().toISOString().split('T')[0];
|
||||
const patchBody = {
|
||||
script_updated: today,
|
||||
last_update_commit: process.env.PR_URL || process.env.COMMIT_URL || ''
|
||||
};
|
||||
// When a dev script is merged into main, promote it to production
|
||||
if (record.is_dev === true) {
|
||||
patchBody.is_dev = false;
|
||||
patchBody.script_created = today;
|
||||
console.log('Promoting dev script to production: ' + slug);
|
||||
}
|
||||
const patchRes = await request(recordsUrl + '/' + record.id, {
|
||||
method: 'PATCH',
|
||||
headers: { 'Authorization': token, 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(patchBody)
|
||||
body: JSON.stringify({
|
||||
script_updated: new Date().toISOString().split('T')[0],
|
||||
last_update_commit: process.env.PR_URL || process.env.COMMIT_URL || ''
|
||||
})
|
||||
});
|
||||
if (!patchRes.ok) {
|
||||
console.warn('PATCH failed for slug ' + slug + ': ' + patchRes.body);
|
||||
|
||||
284
CHANGELOG.md
284
CHANGELOG.md
@@ -26,9 +26,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -42,7 +39,7 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
|
||||
<details>
|
||||
<summary><h4>March (21 entries)</h4></summary>
|
||||
<summary><h4>March (14 entries)</h4></summary>
|
||||
|
||||
[View March 2026 Changelog](.github/changelogs/2026/03.md)
|
||||
|
||||
@@ -426,83 +423,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
</details>
|
||||
|
||||
## 2026-03-23
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- Alpine-Borgbackup-Server ([#13219](https://github.com/community-scripts/ProxmoxVE/pull/13219))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- NginxProxyManager: build OpenResty from source via GitHub releases [@MickLesk](https://github.com/MickLesk) ([#13134](https://github.com/community-scripts/ProxmoxVE/pull/13134))
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Tracearr: modify service restart and modify build ressources [@MickLesk](https://github.com/MickLesk) ([#13230](https://github.com/community-scripts/ProxmoxVE/pull/13230))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- Kometa: optimize config.yml sed patterns, add Quickstart integration [@MickLesk](https://github.com/MickLesk) ([#13198](https://github.com/community-scripts/ProxmoxVE/pull/13198))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- Refactor: nginxproxymanager update and OpenResty flow [@MickLesk](https://github.com/MickLesk) ([#13216](https://github.com/community-scripts/ProxmoxVE/pull/13216))
|
||||
- Refactor: PartDB [@MickLesk](https://github.com/MickLesk) ([#13229](https://github.com/community-scripts/ProxmoxVE/pull/13229))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- core: alpine - Improve network connectivity and DNS checks [@MickLesk](https://github.com/MickLesk) ([#13222](https://github.com/community-scripts/ProxmoxVE/pull/13222))
|
||||
- core: allow /31 and /32 CIDR with out-of-subnet gateway [@MickLesk](https://github.com/MickLesk) ([#13231](https://github.com/community-scripts/ProxmoxVE/pull/13231))
|
||||
|
||||
## 2026-03-22
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- versitygw ([#13180](https://github.com/community-scripts/ProxmoxVE/pull/13180))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Adventurelog: pin DRF <3.15 to fix coreapi module removal [@MickLesk](https://github.com/MickLesk) ([#13194](https://github.com/community-scripts/ProxmoxVE/pull/13194))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- ConvertX: add libreoffice-writer for ODT/document conversions [@MickLesk](https://github.com/MickLesk) ([#13196](https://github.com/community-scripts/ProxmoxVE/pull/13196))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- iSponsorblockTV: add AVX CPU check before installation [@MickLesk](https://github.com/MickLesk) ([#13197](https://github.com/community-scripts/ProxmoxVE/pull/13197))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- core: guard against empty IPv6 address in static mode [@MickLesk](https://github.com/MickLesk) ([#13195](https://github.com/community-scripts/ProxmoxVE/pull/13195))
|
||||
|
||||
## 2026-03-21
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Anytype-server: wait for MongoDB readiness before rs.initiate() [@MickLesk](https://github.com/MickLesk) ([#13165](https://github.com/community-scripts/ProxmoxVE/pull/13165))
|
||||
- Frigate: use correct CPU model fallback path [@MickLesk](https://github.com/MickLesk) ([#13164](https://github.com/community-scripts/ProxmoxVE/pull/13164))
|
||||
- iSponsorBlockTV: Fix release fetching [@tremor021](https://github.com/tremor021) ([#13157](https://github.com/community-scripts/ProxmoxVE/pull/13157))
|
||||
- Isponsorblocktv: use quoted heredoc to prevent unbound variable error during CLI wrapper creation [@Copilot](https://github.com/Copilot) ([#13146](https://github.com/community-scripts/ProxmoxVE/pull/13146))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- Headscale: Enable TUN [@tremor021](https://github.com/tremor021) ([#13158](https://github.com/community-scripts/ProxmoxVE/pull/13158))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- core: add missing -searchdomain/-nameserver prefix in base_settings [@MickLesk](https://github.com/MickLesk) ([#13166](https://github.com/community-scripts/ProxmoxVE/pull/13166))
|
||||
|
||||
## 2026-03-20
|
||||
|
||||
### 🆕 New Scripts
|
||||
@@ -1299,4 +1219,204 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
- #### 📝 Script Information
|
||||
|
||||
- fixen broken link to dawarich documentation [@RiX012](https://github.com/RiX012) ([#12103](https://github.com/community-scripts/ProxmoxVE/pull/12103))
|
||||
- fixen broken link to dawarich documentation [@RiX012](https://github.com/RiX012) ([#12103](https://github.com/community-scripts/ProxmoxVE/pull/12103))
|
||||
|
||||
## 2026-02-19
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- TrueNAS-VM ([#12059](https://github.com/community-scripts/ProxmoxVE/pull/12059))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- add: patchmon breaking change msg [@CrazyWolf13](https://github.com/CrazyWolf13) ([#12075](https://github.com/community-scripts/ProxmoxVE/pull/12075))
|
||||
- LibreNMS: Various fixes [@tremor021](https://github.com/tremor021) ([#12089](https://github.com/community-scripts/ProxmoxVE/pull/12089))
|
||||
|
||||
### 🌐 Website
|
||||
|
||||
- #### 📝 Script Information
|
||||
|
||||
- truenas-vm: slug fix for source code link [@juronja](https://github.com/juronja) ([#12088](https://github.com/community-scripts/ProxmoxVE/pull/12088))
|
||||
|
||||
## 2026-02-18
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 💥 Breaking Changes
|
||||
|
||||
- [Fix] PatchMon: use `SERVER_PORT` in Nginx config if set in env [@vhsdream](https://github.com/vhsdream) ([#12053](https://github.com/community-scripts/ProxmoxVE/pull/12053))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- core: Execution ID & Telemetry Improvements [@MickLesk](https://github.com/MickLesk) ([#12041](https://github.com/community-scripts/ProxmoxVE/pull/12041))
|
||||
|
||||
## 2026-02-17
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- Databasus ([#12018](https://github.com/community-scripts/ProxmoxVE/pull/12018))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- [Hotfix] Cleanuparr: backup config before update [@vhsdream](https://github.com/vhsdream) ([#12039](https://github.com/community-scripts/ProxmoxVE/pull/12039))
|
||||
- fix: pterodactyl-panel add symlink [@CrazyWolf13](https://github.com/CrazyWolf13) ([#11997](https://github.com/community-scripts/ProxmoxVE/pull/11997))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- core: call get_lxc_ip in start() before updates [@MickLesk](https://github.com/MickLesk) ([#12015](https://github.com/community-scripts/ProxmoxVE/pull/12015))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- tools/pve: add data analytics / formatting / linting [@MickLesk](https://github.com/MickLesk) ([#12034](https://github.com/community-scripts/ProxmoxVE/pull/12034))
|
||||
- core: smart recovery for failed installs | extend exit_codes [@MickLesk](https://github.com/MickLesk) ([#11221](https://github.com/community-scripts/ProxmoxVE/pull/11221))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- core: error-handler improvements | better exit_code handling | better tools.func source check [@MickLesk](https://github.com/MickLesk) ([#12019](https://github.com/community-scripts/ProxmoxVE/pull/12019))
|
||||
|
||||
### 🧰 Tools
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- Immich Public Proxy: centralize and fix systemd service creation [@MickLesk](https://github.com/MickLesk) ([#12025](https://github.com/community-scripts/ProxmoxVE/pull/12025))
|
||||
|
||||
### 📚 Documentation
|
||||
|
||||
- fix contribution/setup-fork [@andreasabeck](https://github.com/andreasabeck) ([#12047](https://github.com/community-scripts/ProxmoxVE/pull/12047))
|
||||
|
||||
## 2026-02-16
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- RomM ([#11987](https://github.com/community-scripts/ProxmoxVE/pull/11987))
|
||||
- LinkDing ([#11976](https://github.com/community-scripts/ProxmoxVE/pull/11976))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- Opencloud: Pin version to 5.1.0 [@vhsdream](https://github.com/vhsdream) ([#12004](https://github.com/community-scripts/ProxmoxVE/pull/12004))
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Tududi: Fix sed command for DB_FILE configuration [@tremor021](https://github.com/tremor021) ([#11988](https://github.com/community-scripts/ProxmoxVE/pull/11988))
|
||||
- slskd: fix exit position [@MickLesk](https://github.com/MickLesk) ([#11963](https://github.com/community-scripts/ProxmoxVE/pull/11963))
|
||||
- cryptpad: restore config earlier and run onlyoffice upgrade [@MickLesk](https://github.com/MickLesk) ([#11964](https://github.com/community-scripts/ProxmoxVE/pull/11964))
|
||||
- jellyseerr/overseerr: Migrate update script to Seerr; prompt rerun [@MickLesk](https://github.com/MickLesk) ([#11965](https://github.com/community-scripts/ProxmoxVE/pull/11965))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- core/vm's: ensure script state is sent on script exit [@MickLesk](https://github.com/MickLesk) ([#11991](https://github.com/community-scripts/ProxmoxVE/pull/11991))
|
||||
- Vaultwarden: export VW_VERSION as version number [@MickLesk](https://github.com/MickLesk) ([#11966](https://github.com/community-scripts/ProxmoxVE/pull/11966))
|
||||
- Zabbix: Improve zabbix-agent service detection [@MickLesk](https://github.com/MickLesk) ([#11968](https://github.com/community-scripts/ProxmoxVE/pull/11968))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- tools.func: ensure /usr/local/bin PATH persists for pct enter sessions [@MickLesk](https://github.com/MickLesk) ([#11970](https://github.com/community-scripts/ProxmoxVE/pull/11970))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- core: remove duplicate error handler from alpine-install.func [@MickLesk](https://github.com/MickLesk) ([#11971](https://github.com/community-scripts/ProxmoxVE/pull/11971))
|
||||
|
||||
### 📂 Github
|
||||
|
||||
- github: add "website" label if "json" changed [@MickLesk](https://github.com/MickLesk) ([#11975](https://github.com/community-scripts/ProxmoxVE/pull/11975))
|
||||
|
||||
### 🌐 Website
|
||||
|
||||
- #### 📝 Script Information
|
||||
|
||||
- Update Wishlist LXC webpage to include reverse proxy info [@summoningpixels](https://github.com/summoningpixels) ([#11973](https://github.com/community-scripts/ProxmoxVE/pull/11973))
|
||||
- Update OpenCloud LXC webpage to include services ports [@summoningpixels](https://github.com/summoningpixels) ([#11969](https://github.com/community-scripts/ProxmoxVE/pull/11969))
|
||||
|
||||
## 2026-02-15
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- ebusd ([#11942](https://github.com/community-scripts/ProxmoxVE/pull/11942))
|
||||
- add: seer script and migrations [@CrazyWolf13](https://github.com/CrazyWolf13) ([#11930](https://github.com/community-scripts/ProxmoxVE/pull/11930))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Fix seerr URL in jellyseerr script [@lucacome](https://github.com/lucacome) ([#11951](https://github.com/community-scripts/ProxmoxVE/pull/11951))
|
||||
- Fix jellyseer and overseer script replacement [@lucacome](https://github.com/lucacome) ([#11949](https://github.com/community-scripts/ProxmoxVE/pull/11949))
|
||||
- Tautulli: Add setuptools < 81 [@tremor021](https://github.com/tremor021) ([#11943](https://github.com/community-scripts/ProxmoxVE/pull/11943))
|
||||
|
||||
- #### 💥 Breaking Changes
|
||||
|
||||
- Refactor: Patchmon [@vhsdream](https://github.com/vhsdream) ([#11888](https://github.com/community-scripts/ProxmoxVE/pull/11888))
|
||||
|
||||
## 2026-02-14
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Increase disk allocation for OpenWebUI and Ollama to prevent installation failures [@Copilot](https://github.com/Copilot) ([#11920](https://github.com/community-scripts/ProxmoxVE/pull/11920))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- core: handle missing RAM speed in nested VMs [@MickLesk](https://github.com/MickLesk) ([#11913](https://github.com/community-scripts/ProxmoxVE/pull/11913))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- core: overwriteable app version [@CrazyWolf13](https://github.com/CrazyWolf13) ([#11753](https://github.com/community-scripts/ProxmoxVE/pull/11753))
|
||||
- core: validate container IDs cluster-wide across all nodes [@MickLesk](https://github.com/MickLesk) ([#11906](https://github.com/community-scripts/ProxmoxVE/pull/11906))
|
||||
- core: improve error reporting with structured error strings and better categorization + output formatting [@MickLesk](https://github.com/MickLesk) ([#11907](https://github.com/community-scripts/ProxmoxVE/pull/11907))
|
||||
- core: unified logging system with combined logs [@MickLesk](https://github.com/MickLesk) ([#11761](https://github.com/community-scripts/ProxmoxVE/pull/11761))
|
||||
|
||||
### 🧰 Tools
|
||||
|
||||
- lxc-updater: add patchmon aware [@failure101](https://github.com/failure101) ([#11905](https://github.com/community-scripts/ProxmoxVE/pull/11905))
|
||||
|
||||
### 🌐 Website
|
||||
|
||||
- #### 📝 Script Information
|
||||
|
||||
- Disable UniFi script - APT packages no longer available [@Copilot](https://github.com/Copilot) ([#11898](https://github.com/community-scripts/ProxmoxVE/pull/11898))
|
||||
|
||||
## 2026-02-13
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- OpenWebUI: pin numba constraint [@MickLesk](https://github.com/MickLesk) ([#11874](https://github.com/community-scripts/ProxmoxVE/pull/11874))
|
||||
- Planka: add migrate step to update function [@ZimmermannLeon](https://github.com/ZimmermannLeon) ([#11877](https://github.com/community-scripts/ProxmoxVE/pull/11877))
|
||||
- Pangolin: switch sqlite-specific back to generic [@MickLesk](https://github.com/MickLesk) ([#11868](https://github.com/community-scripts/ProxmoxVE/pull/11868))
|
||||
- [Hotfix] Jotty: Copy contents of config backup into /opt/jotty/config [@vhsdream](https://github.com/vhsdream) ([#11864](https://github.com/community-scripts/ProxmoxVE/pull/11864))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- Refactor: Radicale [@vhsdream](https://github.com/vhsdream) ([#11850](https://github.com/community-scripts/ProxmoxVE/pull/11850))
|
||||
- chore(donetick): add config entry for v0.1.73 [@tomfrenzel](https://github.com/tomfrenzel) ([#11872](https://github.com/community-scripts/ProxmoxVE/pull/11872))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- core: retry reporting with fallback payloads [@MickLesk](https://github.com/MickLesk) ([#11885](https://github.com/community-scripts/ProxmoxVE/pull/11885))
|
||||
|
||||
### 📡 API
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- error-handler: Implement json_escape and enhance error handling [@MickLesk](https://github.com/MickLesk) ([#11875](https://github.com/community-scripts/ProxmoxVE/pull/11875))
|
||||
|
||||
### 🌐 Website
|
||||
|
||||
- #### 📝 Script Information
|
||||
|
||||
- SQLServer-2025: add PVE9/Kernel 6.x incompatibility warning [@MickLesk](https://github.com/MickLesk) ([#11829](https://github.com/community-scripts/ProxmoxVE/pull/11829))
|
||||
@@ -56,7 +56,6 @@ function update_script() {
|
||||
fi
|
||||
$STD .venv/bin/python -m pip install --upgrade pip
|
||||
$STD .venv/bin/python -m pip install -r requirements.txt
|
||||
$STD .venv/bin/python -m pip install 'djangorestframework<3.15'
|
||||
$STD .venv/bin/python -m manage collectstatic --noinput
|
||||
$STD .venv/bin/python -m manage migrate
|
||||
|
||||
|
||||
@@ -1,107 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: Sander Koenders (sanderkoenders)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://www.borgbackup.org/
|
||||
|
||||
APP="Alpine-BorgBackup-Server"
|
||||
var_tags="${var_tags:-alpine;backup}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-1024}"
|
||||
var_disk="${var_disk:-20}"
|
||||
var_os="${var_os:-alpine}"
|
||||
var_version="${var_version:-3.23}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
if [[ ! -f /usr/bin/borg ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
CHOICE=$(msg_menu "BorgBackup Server Update Options" \
|
||||
"1" "Update BorgBackup Server" \
|
||||
"2" "Reset SSH Access" \
|
||||
"3" "Enable password authentication for backup user (not recommended, use SSH key instead)" \
|
||||
"4" "Disable password authentication for backup user (recommended for security, use SSH key)")
|
||||
|
||||
case $CHOICE in
|
||||
1)
|
||||
msg_info "Updating $APP LXC"
|
||||
$STD apk -U upgrade
|
||||
msg_ok "Updated $APP LXC successfully!"
|
||||
;;
|
||||
2)
|
||||
if [[ "${PHS_SILENT:-0}" == "1" ]]; then
|
||||
msg_warn "Reset SSH Public key requires interactive mode, skipping."
|
||||
exit
|
||||
fi
|
||||
|
||||
msg_info "Setting up SSH Public Key for backup user"
|
||||
|
||||
msg_info "Please paste your SSH public key (e.g., ssh-rsa AAAAB3... user@host): \n"
|
||||
read -p "Key: " SSH_PUBLIC_KEY
|
||||
echo
|
||||
|
||||
if [[ -z "$SSH_PUBLIC_KEY" ]]; then
|
||||
msg_error "No SSH public key provided!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! "$SSH_PUBLIC_KEY" =~ ^(ssh-rsa|ssh-dss|ssh-ed25519|ecdsa-sha2-) ]]; then
|
||||
msg_error "Invalid SSH public key format!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
msg_info "Setting up SSH access"
|
||||
mkdir -p /home/backup/.ssh
|
||||
echo "$SSH_PUBLIC_KEY" >/home/backup/.ssh/authorized_keys
|
||||
|
||||
chown -R backup:backup /home/backup/.ssh
|
||||
chmod 700 /home/backup/.ssh
|
||||
chmod 600 /home/backup/.ssh/authorized_keys
|
||||
|
||||
msg_ok "SSH access configured for backup user"
|
||||
;;
|
||||
3)
|
||||
if [[ "${PHS_SILENT:-0}" == "1" ]]; then
|
||||
msg_warn "Enabling password authentication requires interactive mode, skipping."
|
||||
exit
|
||||
fi
|
||||
|
||||
msg_info "Enabling password authentication for backup user"
|
||||
msg_warn "Password authentication is less secure than using SSH keys. Consider using SSH keys instead."
|
||||
passwd backup
|
||||
sed -i 's/^#*\s*PasswordAuthentication\s\+\(yes\|no\)/PasswordAuthentication yes/' /etc/ssh/sshd_config
|
||||
rc-service sshd restart
|
||||
msg_ok "Password authentication enabled for backup user"
|
||||
;;
|
||||
4)
|
||||
msg_info "Disabling password authentication for backup user"
|
||||
sed -i 's/^#*\s*PasswordAuthentication\s\+\(yes\|no\)/PasswordAuthentication no/' /etc/ssh/sshd_config
|
||||
rc-service sshd restart
|
||||
msg_ok "Password authentication disabled for backup user"
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW}Connection information:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}ssh backup@${IP}${CL}"
|
||||
echo -e "${TAB}${VERIFYPW}${YW}To set SSH key, run this script with the 'update' option and select option 2${CL}"
|
||||
@@ -24,7 +24,7 @@ function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /opt/convertx ]]; then
|
||||
if [[ ! -d /var ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
@@ -33,8 +33,6 @@ function update_script() {
|
||||
systemctl stop convertx
|
||||
msg_info "Stopped Service"
|
||||
|
||||
ensure_dependencies libreoffice-writer
|
||||
|
||||
msg_info "Move data-Folder"
|
||||
if [[ -d /opt/convertx/data ]]; then
|
||||
mv /opt/convertx/data /opt/data
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
___ __ _ ____ ____ __ _____
|
||||
/ | / /___ (_)___ ___ / __ )____ _________ _/ __ )____ ______/ /____ ______ / ___/___ ______ _____ _____
|
||||
/ /| | / / __ \/ / __ \/ _ \______/ __ / __ \/ ___/ __ `/ __ / __ `/ ___/ //_/ / / / __ \______\__ \/ _ \/ ___/ | / / _ \/ ___/
|
||||
/ ___ |/ / /_/ / / / / / __/_____/ /_/ / /_/ / / / /_/ / /_/ / /_/ / /__/ ,< / /_/ / /_/ /_____/__/ / __/ / | |/ / __/ /
|
||||
/_/ |_/_/ .___/_/_/ /_/\___/ /_____/\____/_/ \__, /_____/\__,_/\___/_/|_|\__,_/ .___/ /____/\___/_/ |___/\___/_/
|
||||
/_/ /____/ /_/
|
||||
@@ -1,6 +0,0 @@
|
||||
_ __ _ __ _______ __
|
||||
| | / /__ __________(_) /___ __/ ____/ | / /
|
||||
| | / / _ \/ ___/ ___/ / __/ / / / / __ | | /| / /
|
||||
| |/ / __/ / (__ ) / /_/ /_/ / /_/ / | |/ |/ /
|
||||
|___/\___/_/ /____/_/\__/\__, /\____/ |__/|__/
|
||||
/____/
|
||||
@@ -13,7 +13,6 @@ var_disk="${var_disk:-2}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
var_tun="${var_tun:-yes}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
|
||||
@@ -35,7 +35,7 @@ function update_script() {
|
||||
systemctl stop isponsorblocktv
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "isponsorblocktv" "dmunozv04/iSponsorBlockTV" "singlefile" "latest" "/opt/isponsorblocktv" "iSponsorBlockTV-x86_64-linux"
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "isponsorblocktv" "dmunozv04/iSponsorBlockTV" "singlefile" "latest" "/opt/isponsorblocktv" "iSponsorBlockTV-*-linux"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start isponsorblocktv
|
||||
|
||||
@@ -61,5 +61,5 @@ description
|
||||
|
||||
msg_ok "Completed successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access Kometa Quickstart:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:7171${CL}"
|
||||
echo -e "${INFO}${YW} Access the LXC at following IP address:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}${IP}${CL}"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: tteck (tteckster) | Co-Author: CrazyWolf13, MickLesk (CanbiZ)
|
||||
# Author: tteck (tteckster) | Co-Author: CrazyWolf13
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://nginxproxymanager.com/ | Github: https://github.com/NginxProxyManager/nginx-proxy-manager
|
||||
|
||||
@@ -38,8 +38,8 @@ function update_script() {
|
||||
CURRENT_NODE_VERSION=$(node --version | cut -d'v' -f2 | cut -d'.' -f1)
|
||||
if [[ "$CURRENT_NODE_VERSION" != "22" ]]; then
|
||||
systemctl stop openresty
|
||||
$STD apt purge -y nodejs npm
|
||||
$STD apt autoremove -y
|
||||
apt-get purge -y nodejs npm
|
||||
apt-get autoremove -y
|
||||
rm -rf /usr/local/bin/node /usr/local/bin/npm
|
||||
rm -rf /usr/local/lib/node_modules
|
||||
rm -rf ~/.npm
|
||||
@@ -49,149 +49,92 @@ function update_script() {
|
||||
|
||||
NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs
|
||||
|
||||
if dpkg -s openresty &>/dev/null 2>&1; then
|
||||
msg_info "Migrating from packaged OpenResty to source"
|
||||
rm -f /etc/apt/trusted.gpg.d/openresty-archive-keyring.gpg /etc/apt/trusted.gpg.d/openresty.gpg
|
||||
rm -f /etc/apt/sources.list.d/openresty.list /etc/apt/sources.list.d/openresty.sources
|
||||
$STD apt remove -y openresty
|
||||
$STD apt autoremove -y
|
||||
rm -f ~/.openresty
|
||||
msg_ok "Migrated from packaged OpenResty to source"
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest |
|
||||
grep "tag_name" |
|
||||
awk '{print substr($2, 3, length($2)-4) }')
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "nginxproxymanager" "NginxProxyManager/nginx-proxy-manager" "tarball" "v${RELEASE}" "/opt/nginxproxymanager"
|
||||
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop openresty
|
||||
systemctl stop npm
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
msg_info "Cleaning old files"
|
||||
$STD rm -rf /app \
|
||||
/var/www/html \
|
||||
/etc/nginx \
|
||||
/var/log/nginx \
|
||||
/var/lib/nginx \
|
||||
/var/cache/nginx
|
||||
msg_ok "Cleaned old files"
|
||||
|
||||
msg_info "Setting up Environment"
|
||||
ln -sf /usr/bin/python3 /usr/bin/python
|
||||
ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx
|
||||
ln -sf /usr/local/openresty/nginx/ /etc/nginx
|
||||
sed -i "s|\"version\": \"2.0.0\"|\"version\": \"$RELEASE\"|" /opt/nginxproxymanager/backend/package.json
|
||||
sed -i "s|\"version\": \"2.0.0\"|\"version\": \"$RELEASE\"|" /opt/nginxproxymanager/frontend/package.json
|
||||
sed -i 's+^daemon+#daemon+g' /opt/nginxproxymanager/docker/rootfs/etc/nginx/nginx.conf
|
||||
NGINX_CONFS=$(find /opt/nginxproxymanager -type f -name "*.conf")
|
||||
for NGINX_CONF in $NGINX_CONFS; do
|
||||
sed -i 's+include conf.d+include /etc/nginx/conf.d+g' "$NGINX_CONF"
|
||||
done
|
||||
|
||||
mkdir -p /var/www/html /etc/nginx/logs
|
||||
cp -r /opt/nginxproxymanager/docker/rootfs/var/www/html/* /var/www/html/
|
||||
cp -r /opt/nginxproxymanager/docker/rootfs/etc/nginx/* /etc/nginx/
|
||||
cp /opt/nginxproxymanager/docker/rootfs/etc/letsencrypt.ini /etc/letsencrypt.ini
|
||||
cp /opt/nginxproxymanager/docker/rootfs/etc/logrotate.d/nginx-proxy-manager /etc/logrotate.d/nginx-proxy-manager
|
||||
ln -sf /etc/nginx/nginx.conf /etc/nginx/conf/nginx.conf
|
||||
rm -f /etc/nginx/conf.d/dev.conf
|
||||
|
||||
mkdir -p /tmp/nginx/body \
|
||||
/run/nginx \
|
||||
/data/nginx \
|
||||
/data/custom_ssl \
|
||||
/data/logs \
|
||||
/data/access \
|
||||
/data/nginx/default_host \
|
||||
/data/nginx/default_www \
|
||||
/data/nginx/proxy_host \
|
||||
/data/nginx/redirection_host \
|
||||
/data/nginx/stream \
|
||||
/data/nginx/dead_host \
|
||||
/data/nginx/temp \
|
||||
/var/lib/nginx/cache/public \
|
||||
/var/lib/nginx/cache/private \
|
||||
/var/cache/nginx/proxy_temp
|
||||
|
||||
chmod -R 777 /var/cache/nginx
|
||||
chown root /tmp/nginx
|
||||
|
||||
echo resolver "$(awk 'BEGIN{ORS=" "} $1=="nameserver" {print ($2 ~ ":")? "["$2"]": $2}' /etc/resolv.conf);" >/etc/nginx/conf.d/include/resolvers.conf
|
||||
|
||||
if [ ! -f /data/nginx/dummycert.pem ] || [ ! -f /data/nginx/dummykey.pem ]; then
|
||||
$STD openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -subj "/O=Nginx Proxy Manager/OU=Dummy Certificate/CN=localhost" -keyout /data/nginx/dummykey.pem -out /data/nginx/dummycert.pem
|
||||
fi
|
||||
|
||||
local pcre_pkg="libpcre3-dev"
|
||||
if grep -qE 'VERSION_ID="1[3-9]"' /etc/os-release 2>/dev/null; then
|
||||
pcre_pkg="libpcre2-dev"
|
||||
fi
|
||||
$STD apt install -y build-essential "$pcre_pkg" libssl-dev zlib1g-dev
|
||||
mkdir -p /app/frontend/images
|
||||
cp -r /opt/nginxproxymanager/backend/* /app
|
||||
msg_ok "Set up Environment"
|
||||
|
||||
if check_for_gh_release "openresty" "openresty/openresty"; then
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "openresty" "openresty/openresty" "prebuild" "${CHECK_UPDATE_RELEASE}" "/opt/openresty" "openresty-*.tar.gz"
|
||||
msg_info "Building Frontend"
|
||||
export NODE_OPTIONS="--max_old_space_size=2048 --openssl-legacy-provider"
|
||||
cd /opt/nginxproxymanager/frontend
|
||||
# Replace node-sass with sass in package.json before installation
|
||||
sed -E -i 's/"node-sass" *: *"([^"]*)"/"sass": "\1"/g' package.json
|
||||
$STD yarn install --network-timeout 600000
|
||||
$STD yarn locale-compile
|
||||
$STD yarn build
|
||||
cp -r /opt/nginxproxymanager/frontend/dist/* /app/frontend
|
||||
cp -r /opt/nginxproxymanager/frontend/public/images/* /app/frontend/images
|
||||
msg_ok "Built Frontend"
|
||||
|
||||
msg_info "Building OpenResty"
|
||||
cd /opt/openresty
|
||||
$STD ./configure \
|
||||
--with-http_v2_module \
|
||||
--with-http_realip_module \
|
||||
--with-http_stub_status_module \
|
||||
--with-http_ssl_module \
|
||||
--with-http_sub_module \
|
||||
--with-http_auth_request_module \
|
||||
--with-pcre-jit \
|
||||
--with-stream \
|
||||
--with-stream_ssl_module
|
||||
$STD make -j"$(nproc)"
|
||||
$STD make install
|
||||
rm -rf /opt/openresty
|
||||
cat <<'EOF' >/lib/systemd/system/openresty.service
|
||||
[Unit]
|
||||
Description=The OpenResty Application Platform
|
||||
After=syslog.target network-online.target remote-fs.target nss-lookup.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStartPre=/usr/local/openresty/nginx/sbin/nginx -t
|
||||
ExecStart=/usr/local/openresty/nginx/sbin/nginx -g 'daemon off;'
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl daemon-reload
|
||||
systemctl restart openresty
|
||||
msg_ok "Built OpenResty"
|
||||
fi
|
||||
|
||||
if [ -d /opt/certbot ]; then
|
||||
msg_info "Updating Certbot"
|
||||
$STD /opt/certbot/bin/pip install --upgrade pip setuptools wheel
|
||||
$STD /opt/certbot/bin/pip install --upgrade certbot certbot-dns-cloudflare
|
||||
msg_ok "Updated Certbot"
|
||||
fi
|
||||
|
||||
if check_for_gh_release "nginxproxymanager" "NginxProxyManager/nginx-proxy-manager"; then
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop openresty
|
||||
systemctl stop npm
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "nginxproxymanager" "NginxProxyManager/nginx-proxy-manager" "tarball" "${CHECK_UPDATE_RELEASE}" "/opt/nginxproxymanager"
|
||||
|
||||
msg_info "Cleaning old files"
|
||||
$STD rm -rf /app \
|
||||
/var/www/html \
|
||||
/etc/nginx \
|
||||
/var/log/nginx \
|
||||
/var/lib/nginx \
|
||||
/var/cache/nginx
|
||||
msg_ok "Cleaned old files"
|
||||
|
||||
local RELEASE="${CHECK_UPDATE_RELEASE#v}"
|
||||
msg_info "Setting up Environment"
|
||||
ln -sf /usr/bin/python3 /usr/bin/python
|
||||
ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx
|
||||
ln -sf /usr/local/openresty/nginx/ /etc/nginx
|
||||
sed -i "0,/\"version\": \"[^\"]*\"/s|\"version\": \"[^\"]*\"|\"version\": \"$RELEASE\"|" /opt/nginxproxymanager/backend/package.json
|
||||
sed -i "0,/\"version\": \"[^\"]*\"/s|\"version\": \"[^\"]*\"|\"version\": \"$RELEASE\"|" /opt/nginxproxymanager/frontend/package.json
|
||||
sed -i 's+^daemon+#daemon+g' /opt/nginxproxymanager/docker/rootfs/etc/nginx/nginx.conf
|
||||
NGINX_CONFS=$(find /opt/nginxproxymanager -type f -name "*.conf")
|
||||
for NGINX_CONF in $NGINX_CONFS; do
|
||||
sed -i 's+include conf.d+include /etc/nginx/conf.d+g' "$NGINX_CONF"
|
||||
done
|
||||
|
||||
mkdir -p /var/www/html /etc/nginx/logs
|
||||
cp -r /opt/nginxproxymanager/docker/rootfs/var/www/html/* /var/www/html/
|
||||
cp -r /opt/nginxproxymanager/docker/rootfs/etc/nginx/* /etc/nginx/
|
||||
cp /opt/nginxproxymanager/docker/rootfs/etc/letsencrypt.ini /etc/letsencrypt.ini
|
||||
cp /opt/nginxproxymanager/docker/rootfs/etc/logrotate.d/nginx-proxy-manager /etc/logrotate.d/nginx-proxy-manager
|
||||
ln -sf /etc/nginx/nginx.conf /etc/nginx/conf/nginx.conf
|
||||
rm -f /etc/nginx/conf.d/dev.conf
|
||||
|
||||
mkdir -p /tmp/nginx/body \
|
||||
/run/nginx \
|
||||
/data/nginx \
|
||||
/data/custom_ssl \
|
||||
/data/logs \
|
||||
/data/access \
|
||||
/data/nginx/default_host \
|
||||
/data/nginx/default_www \
|
||||
/data/nginx/proxy_host \
|
||||
/data/nginx/redirection_host \
|
||||
/data/nginx/stream \
|
||||
/data/nginx/dead_host \
|
||||
/data/nginx/temp \
|
||||
/var/lib/nginx/cache/public \
|
||||
/var/lib/nginx/cache/private \
|
||||
/var/cache/nginx/proxy_temp
|
||||
|
||||
chmod -R 777 /var/cache/nginx
|
||||
chown root /tmp/nginx
|
||||
|
||||
echo resolver "$(awk 'BEGIN{ORS=" "} $1=="nameserver" {print ($2 ~ ":")? "["$2"]": $2}' /etc/resolv.conf);" >/etc/nginx/conf.d/include/resolvers.conf
|
||||
|
||||
if [ ! -f /data/nginx/dummycert.pem ] || [ ! -f /data/nginx/dummykey.pem ]; then
|
||||
$STD openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -subj "/O=Nginx Proxy Manager/OU=Dummy Certificate/CN=localhost" -keyout /data/nginx/dummykey.pem -out /data/nginx/dummycert.pem
|
||||
fi
|
||||
|
||||
mkdir -p /app/frontend/images
|
||||
cp -r /opt/nginxproxymanager/backend/* /app
|
||||
msg_ok "Set up Environment"
|
||||
|
||||
msg_info "Building Frontend"
|
||||
export NODE_OPTIONS="--max_old_space_size=2048 --openssl-legacy-provider"
|
||||
cd /opt/nginxproxymanager/frontend
|
||||
sed -E -i 's/"node-sass" *: *"([^"]*)"/"sass": "\1"/g' package.json
|
||||
$STD yarn install --network-timeout 600000
|
||||
$STD yarn locale-compile
|
||||
$STD yarn build
|
||||
cp -r /opt/nginxproxymanager/frontend/dist/* /app/frontend
|
||||
cp -r /opt/nginxproxymanager/frontend/public/images/* /app/frontend/images
|
||||
msg_ok "Built Frontend"
|
||||
|
||||
msg_info "Initializing Backend"
|
||||
rm -rf /app/config/default.json
|
||||
if [ ! -f /app/config/production.json ]; then
|
||||
cat <<'EOF' >/app/config/production.json
|
||||
msg_info "Initializing Backend"
|
||||
rm -rf /app/config/default.json
|
||||
if [ ! -f /app/config/production.json ]; then
|
||||
cat <<'EOF' >/app/config/production.json
|
||||
{
|
||||
"database": {
|
||||
"engine": "knex-native",
|
||||
@@ -205,21 +148,40 @@ EOF
|
||||
}
|
||||
}
|
||||
EOF
|
||||
fi
|
||||
sed -i 's/"client": "sqlite3"/"client": "better-sqlite3"/' /app/config/production.json
|
||||
cd /app
|
||||
$STD yarn install --network-timeout 600000
|
||||
msg_ok "Initialized Backend"
|
||||
|
||||
msg_info "Starting Services"
|
||||
sed -i 's/user npm/user root/g; s/^pid/#pid/g' /usr/local/openresty/nginx/conf/nginx.conf
|
||||
sed -r -i 's/^([[:space:]]*)su npm npm/\1#su npm npm/g;' /etc/logrotate.d/nginx-proxy-manager
|
||||
systemctl daemon-reload
|
||||
systemctl enable -q --now openresty
|
||||
systemctl enable -q --now npm
|
||||
msg_ok "Started Services"
|
||||
msg_ok "Updated successfully!"
|
||||
fi
|
||||
sed -i 's/"client": "sqlite3"/"client": "better-sqlite3"/' /app/config/production.json
|
||||
cd /app
|
||||
$STD yarn install --network-timeout 600000
|
||||
msg_ok "Initialized Backend"
|
||||
|
||||
msg_info "Updating Certbot"
|
||||
[ -f /etc/apt/trusted.gpg.d/openresty-archive-keyring.gpg ] && rm -f /etc/apt/trusted.gpg.d/openresty-archive-keyring.gpg
|
||||
[ -f /etc/apt/sources.list.d/openresty.list ] && rm -f /etc/apt/sources.list.d/openresty.list
|
||||
[ ! -f /etc/apt/trusted.gpg.d/openresty.gpg ] && curl -fsSL https://openresty.org/package/pubkey.gpg | gpg --dearmor --yes -o /etc/apt/trusted.gpg.d/openresty.gpg
|
||||
[ ! -f /etc/apt/sources.list.d/openresty.sources ] && cat <<'EOF' >/etc/apt/sources.list.d/openresty.sources
|
||||
Types: deb
|
||||
URIs: http://openresty.org/package/debian/
|
||||
Suites: bookworm
|
||||
Components: openresty
|
||||
Signed-By: /etc/apt/trusted.gpg.d/openresty.gpg
|
||||
EOF
|
||||
$STD apt update
|
||||
$STD apt -y install openresty
|
||||
if [ -d /opt/certbot ]; then
|
||||
$STD /opt/certbot/bin/pip install --upgrade pip setuptools wheel
|
||||
$STD /opt/certbot/bin/pip install --upgrade certbot certbot-dns-cloudflare
|
||||
fi
|
||||
msg_ok "Updated Certbot"
|
||||
|
||||
msg_info "Starting Services"
|
||||
sed -i 's/user npm/user root/g; s/^pid/#pid/g' /usr/local/openresty/nginx/conf/nginx.conf
|
||||
sed -r -i 's/^([[:space:]]*)su npm npm/\1#su npm npm/g;' /etc/logrotate.d/nginx-proxy-manager
|
||||
systemctl enable -q --now openresty
|
||||
systemctl enable -q --now npm
|
||||
systemctl restart openresty
|
||||
msg_ok "Started Services"
|
||||
|
||||
msg_ok "Updated successfully!"
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
@@ -27,27 +27,36 @@ function update_script() {
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
RELEASE=$(get_latest_github_release "Part-DB/Part-DB-server")
|
||||
if check_for_gh_release "partdb" "Part-DB/Part-DB-server"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop apache2
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Updating $APP to v${RELEASE}"
|
||||
cd /opt
|
||||
mv /opt/partdb/ /opt/partdb-backup
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "partdb" "Part-DB/Part-DB-server" "prebuild" "latest" "/opt/partdb" "partdb_with_assets.zip"
|
||||
curl -fsSL "https://github.com/Part-DB/Part-DB-server/archive/refs/tags/v${RELEASE}.zip" -o "/opt/v${RELEASE}.zip"
|
||||
$STD unzip "v${RELEASE}.zip"
|
||||
mv /opt/Part-DB-server-${RELEASE}/ /opt/partdb
|
||||
|
||||
msg_info "Updating Part-DB"
|
||||
cd /opt/partdb/
|
||||
cp -r /opt/partdb-backup/.env.local /opt/partdb/
|
||||
cp -r /opt/partdb-backup/public/media /opt/partdb/public/
|
||||
cp -r /opt/partdb-backup/config/banner.md /opt/partdb/config/
|
||||
cp -r "/opt/partdb-backup/.env.local" /opt/partdb/
|
||||
cp -r "/opt/partdb-backup/public/media" /opt/partdb/public/
|
||||
cp -r "/opt/partdb-backup/config/banner.md" /opt/partdb/config/
|
||||
|
||||
export COMPOSER_ALLOW_SUPERUSER=1
|
||||
$STD composer install --no-dev -o --no-interaction
|
||||
$STD yarn install
|
||||
$STD yarn build
|
||||
$STD php bin/console cache:clear
|
||||
$STD php bin/console doctrine:migrations:migrate -n
|
||||
chown -R www-data:www-data /opt/partdb
|
||||
rm -r "/opt/v${RELEASE}.zip"
|
||||
rm -r /opt/partdb-backup
|
||||
msg_ok "Updated Part-DB"
|
||||
echo "${RELEASE}" >~/.partdb
|
||||
msg_ok "Updated $APP to v${RELEASE}"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start apache2
|
||||
|
||||
@@ -8,7 +8,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
||||
APP="Tracearr"
|
||||
var_tags="${var_tags:-media}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-8192}"
|
||||
var_ram="${var_ram:-4096}"
|
||||
var_disk="${var_disk:-10}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
@@ -102,7 +102,7 @@ EOF
|
||||
|
||||
if check_for_gh_release "tracearr" "connorgallopo/Tracearr"; then
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop tracearr postgresql redis-server
|
||||
systemctl stop tracearr postgresql redis
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
msg_info "Updating pnpm"
|
||||
@@ -115,7 +115,6 @@ EOF
|
||||
|
||||
msg_info "Building Tracearr"
|
||||
export TZ=$(cat /etc/timezone)
|
||||
export NODE_OPTIONS="--max-old-space-size=4096"
|
||||
cd /opt/tracearr.build
|
||||
$STD pnpm install --frozen-lockfile --force
|
||||
$STD pnpm turbo telemetry disable
|
||||
@@ -149,7 +148,7 @@ EOF
|
||||
msg_ok "Configured Tracearr"
|
||||
|
||||
msg_info "Starting services"
|
||||
systemctl start postgresql redis-server tracearr
|
||||
systemctl start postgresql redis tracearr
|
||||
msg_ok "Started services"
|
||||
msg_ok "Updated successfully!"
|
||||
else
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/versity/versitygw
|
||||
|
||||
APP="VersityGW"
|
||||
var_tags="${var_tags:-s3;storage;gateway}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-8}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -f /usr/bin/versitygw ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "versitygw" "versity/versitygw"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop versitygw@gateway
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
fetch_and_deploy_gh_release "versitygw" "versity/versitygw" "binary"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start versitygw@gateway
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Updated successfully!"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:7070 (Gateway) or http://${IP}:7070 (WebUI)${CL}"
|
||||
@@ -62,7 +62,6 @@ $STD uv venv --clear /opt/adventurelog/backend/server/.venv
|
||||
$STD /opt/adventurelog/backend/server/.venv/bin/python -m ensurepip --upgrade
|
||||
$STD /opt/adventurelog/backend/server/.venv/bin/python -m pip install --upgrade pip
|
||||
$STD /opt/adventurelog/backend/server/.venv/bin/python -m pip install -r requirements.txt
|
||||
$STD /opt/adventurelog/backend/server/.venv/bin/python -m pip install 'djangorestframework<3.15'
|
||||
$STD /opt/adventurelog/backend/server/.venv/bin/python -m manage collectstatic --noinput
|
||||
$STD /opt/adventurelog/backend/server/.venv/bin/python -m manage migrate
|
||||
$STD /opt/adventurelog/backend/server/.venv/bin/python -m manage download-countries
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: Sander Koenders (sanderkoenders)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://www.borgbackup.org/
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing BorgBackup"
|
||||
$STD apk add --no-cache borgbackup openssh
|
||||
$STD rc-update add sshd
|
||||
$STD rc-service sshd start
|
||||
msg_ok "Installed BorgBackup"
|
||||
|
||||
msg_info "Creating backup user"
|
||||
$STD adduser -D -s /bin/bash -h /home/backup backup
|
||||
$STD passwd -d backup
|
||||
msg_ok "Created backup user"
|
||||
|
||||
msg_info "Configure SSH, disabling password authentication and enabling public key authentication"
|
||||
$STD sed -i -e 's/^#\?PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config
|
||||
$STD rc-service sshd restart
|
||||
msg_ok "Configured SSH"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -22,12 +22,7 @@ replication:
|
||||
replSetName: "rs0"
|
||||
EOF
|
||||
systemctl restart mongod
|
||||
for i in $(seq 1 30); do
|
||||
if mongosh --quiet --eval "db.adminCommand('ping')" &>/dev/null; then
|
||||
break
|
||||
fi
|
||||
sleep 2
|
||||
done
|
||||
sleep 3
|
||||
$STD mongosh --eval 'rs.initiate({_id: "rs0", members: [{_id: 0, host: "127.0.0.1:27017"}]})'
|
||||
msg_ok "Configured MongoDB Replica Set"
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@ $STD apt install -y \
|
||||
dvisvgm \
|
||||
ffmpeg \
|
||||
inkscape \
|
||||
libreoffice-writer \
|
||||
libva2 \
|
||||
libvips-tools \
|
||||
lmodern \
|
||||
|
||||
@@ -310,7 +310,7 @@ else
|
||||
ffmpeg:
|
||||
hwaccel_args: auto
|
||||
model:
|
||||
path: /models/cpu_model.tflite
|
||||
path: /cpu_model.tflite
|
||||
EOF
|
||||
fi
|
||||
msg_ok "Configured Frigate"
|
||||
|
||||
@@ -13,12 +13,7 @@ setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
if ! grep -q ' avx ' /proc/cpuinfo 2>/dev/null; then
|
||||
msg_error "CPU does not support AVX instructions (required by iSponsorBlockTV/PyApp)"
|
||||
exit 106
|
||||
fi
|
||||
|
||||
fetch_and_deploy_gh_release "isponsorblocktv" "dmunozv04/iSponsorBlockTV" "singlefile" "latest" "/opt/isponsorblocktv" "iSponsorBlockTV-x86_64-linux"
|
||||
fetch_and_deploy_gh_release "isponsorblocktv" "dmunozv04/iSponsorBlockTV" "singlefile" "latest" "/opt/isponsorblocktv" "iSponsorBlockTV-*-linux"
|
||||
|
||||
msg_info "Setting up iSponsorBlockTV"
|
||||
install -d /var/lib/isponsorblocktv
|
||||
|
||||
@@ -23,20 +23,12 @@ mkdir -p config/assets
|
||||
cp config/config.yml.template config/config.yml
|
||||
msg_ok "Setup Kometa"
|
||||
|
||||
read -r -p "${TAB3}Enter your TMDb API key: " TMDBKEY
|
||||
read -r -p "${TAB3}Enter your Plex URL: " PLEXURL
|
||||
read -r -p "${TAB3}Enter your Plex token: " PLEXTOKEN
|
||||
sed -i '/^plex:/,/^[^ ]/{s| url:.*| url: '"$PLEXURL"'|}' /opt/kometa/config/config.yml
|
||||
sed -i '/^plex:/,/^[^ ]/{s| token:.*| token: '"$PLEXTOKEN"'|}' /opt/kometa/config/config.yml
|
||||
sed -i '/^tmdb:/,/^[^ ]/{s| apikey:.*| apikey: '"$TMDBKEY"'|}' /opt/kometa/config/config.yml
|
||||
|
||||
fetch_and_deploy_gh_release "kometa-quickstart" "Kometa-Team/Quickstart" "tarball"
|
||||
|
||||
msg_info "Installing Kometa Quickstart"
|
||||
cd /opt/kometa-quickstart
|
||||
$STD uv venv /opt/kometa-quickstart/.venv
|
||||
$STD /opt/kometa-quickstart/.venv/bin/python -m pip install -r requirements.txt
|
||||
msg_ok "Installed Kometa Quickstart"
|
||||
read -p "${TAB3}Enter your TMDb API key: " TMDBKEY
|
||||
read -p "${TAB3}Enter your Plex URL: " PLEXURL
|
||||
read -p "${TAB3}Enter your Plex token: " PLEXTOKEN
|
||||
sed -i -e "s#url: http://192.168.1.12:32400#url: $PLEXURL #g" /opt/kometa/config/config.yml
|
||||
sed -i -e "s/token: ####################/token: $PLEXTOKEN/g" /opt/kometa/config/config.yml
|
||||
sed -i -e "s/apikey: ################################/apikey: $TMDBKEY/g" /opt/kometa/config/config.yml
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/kometa.service
|
||||
@@ -54,22 +46,7 @@ RestartSec=30
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
cat <<EOF >/etc/systemd/system/kometa-quickstart.service
|
||||
[Unit]
|
||||
Description=Kometa Quickstart
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/kometa-quickstart
|
||||
ExecStart=/opt/kometa-quickstart/.venv/bin/python quickstart.py
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now kometa kometa-quickstart
|
||||
systemctl enable -q --now kometa
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
|
||||
@@ -14,20 +14,23 @@ network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y \
|
||||
$STD apt update
|
||||
$STD apt -y install \
|
||||
ca-certificates \
|
||||
apache2-utils \
|
||||
logrotate \
|
||||
build-essential \
|
||||
libpcre3-dev \
|
||||
libssl-dev \
|
||||
zlib1g-dev \
|
||||
git \
|
||||
git
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Installing Python Dependencies"
|
||||
$STD apt install -y \
|
||||
python3 \
|
||||
python3-dev \
|
||||
python3-pip \
|
||||
python3-venv \
|
||||
python3-cffi
|
||||
msg_ok "Installed Dependencies"
|
||||
msg_ok "Installed Python Dependencies"
|
||||
|
||||
msg_info "Setting up Certbot"
|
||||
$STD python3 -m venv /opt/certbot
|
||||
@@ -36,50 +39,33 @@ $STD /opt/certbot/bin/pip install certbot certbot-dns-cloudflare
|
||||
ln -sf /opt/certbot/bin/certbot /usr/local/bin/certbot
|
||||
msg_ok "Set up Certbot"
|
||||
|
||||
fetch_and_deploy_gh_release "openresty" "openresty/openresty" "prebuild" "latest" "/opt/openresty" "openresty-*.tar.gz"
|
||||
|
||||
msg_info "Building OpenResty"
|
||||
cd /opt/openresty
|
||||
$STD ./configure \
|
||||
--with-http_v2_module \
|
||||
--with-http_realip_module \
|
||||
--with-http_stub_status_module \
|
||||
--with-http_ssl_module \
|
||||
--with-http_sub_module \
|
||||
--with-http_auth_request_module \
|
||||
--with-pcre-jit \
|
||||
--with-stream \
|
||||
--with-stream_ssl_module
|
||||
$STD make -j"$(nproc)"
|
||||
$STD make install
|
||||
rm -rf /opt/openresty
|
||||
|
||||
cat <<'EOF' >/lib/systemd/system/openresty.service
|
||||
[Unit]
|
||||
Description=The OpenResty Application Platform
|
||||
After=syslog.target network-online.target remote-fs.target nss-lookup.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStartPre=/usr/local/openresty/nginx/sbin/nginx -t
|
||||
ExecStart=/usr/local/openresty/nginx/sbin/nginx -g 'daemon off;'
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
msg_info "Installing Openresty"
|
||||
curl -fsSL "https://openresty.org/package/pubkey.gpg" | gpg --dearmor -o /etc/apt/trusted.gpg.d/openresty.gpg
|
||||
cat <<'EOF' >/etc/apt/sources.list.d/openresty.sources
|
||||
Types: deb
|
||||
URIs: http://openresty.org/package/debian/
|
||||
Suites: bookworm
|
||||
Components: openresty
|
||||
Signed-By: /etc/apt/trusted.gpg.d/openresty.gpg
|
||||
EOF
|
||||
msg_ok "Built OpenResty"
|
||||
$STD apt update
|
||||
$STD apt -y install openresty
|
||||
msg_ok "Installed Openresty"
|
||||
|
||||
NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs
|
||||
RELEASE=$(get_latest_github_release "NginxProxyManager/nginx-proxy-manager")
|
||||
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest |
|
||||
grep "tag_name" |
|
||||
awk '{print substr($2, 3, length($2)-4) }')
|
||||
|
||||
fetch_and_deploy_gh_release "nginxproxymanager" "NginxProxyManager/nginx-proxy-manager" "tarball" "v${RELEASE}"
|
||||
|
||||
msg_info "Setting up Environment"
|
||||
ln -sf /usr/bin/python3 /usr/bin/python
|
||||
ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx
|
||||
ln -sf /usr/local/openresty/nginx/ /etc/nginx
|
||||
sed -i "0,/\"version\": \"[^\"]*\"/s|\"version\": \"[^\"]*\"|\"version\": \"$RELEASE\"|" /opt/nginxproxymanager/backend/package.json
|
||||
sed -i "0,/\"version\": \"[^\"]*\"/s|\"version\": \"[^\"]*\"|\"version\": \"$RELEASE\"|" /opt/nginxproxymanager/frontend/package.json
|
||||
sed -i "s|\"version\": \"2.0.0\"|\"version\": \"$RELEASE\"|" /opt/nginxproxymanager/backend/package.json
|
||||
sed -i "s|\"version\": \"2.0.0\"|\"version\": \"$RELEASE\"|" /opt/nginxproxymanager/frontend/package.json
|
||||
sed -i 's+^daemon+#daemon+g' /opt/nginxproxymanager/docker/rootfs/etc/nginx/nginx.conf
|
||||
NGINX_CONFS=$(find /opt/nginxproxymanager -type f -name "*.conf")
|
||||
for NGINX_CONF in $NGINX_CONFS; do
|
||||
@@ -183,6 +169,7 @@ sed -i 's/user npm/user root/g; s/^pid/#pid/g' /usr/local/openresty/nginx/conf/n
|
||||
sed -r -i 's/^([[:space:]]*)su npm npm/\1#su npm npm/g;' /etc/logrotate.d/nginx-proxy-manager
|
||||
systemctl enable -q --now openresty
|
||||
systemctl enable -q --now npm
|
||||
systemctl restart openresty
|
||||
msg_ok "Started Services"
|
||||
|
||||
motd_ssh
|
||||
|
||||
@@ -13,19 +13,27 @@ setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
NODE_VERSION="22" NODE_MODULE="yarn@latest" setup_nodejs
|
||||
PG_VERSION="16" setup_postgresql
|
||||
PG_DB_NAME="partdb" PG_DB_USER="partdb" setup_postgresql_db
|
||||
PHP_VERSION="8.4" PHP_APACHE="YES" PHP_MODULE="xsl" PHP_POST_MAX_SIZE="100M" PHP_UPLOAD_MAX_FILESIZE="100M" setup_php
|
||||
setup_composer
|
||||
|
||||
fetch_and_deploy_gh_release "partdb" "Part-DB/Part-DB-server" "prebuild" "latest" "/opt/partdb" "partdb_with_assets.zip"
|
||||
msg_info "Installing Part-DB (Patience)"
|
||||
cd /opt
|
||||
RELEASE=$(get_latest_github_release "Part-DB/Part-DB-server")
|
||||
curl -fsSL "https://github.com/Part-DB/Part-DB-server/archive/refs/tags/v${RELEASE}.zip" -o "/opt/v${RELEASE}.zip"
|
||||
$STD unzip "v${RELEASE}.zip"
|
||||
mv /opt/Part-DB-server-${RELEASE}/ /opt/partdb
|
||||
|
||||
msg_info "Installing Part-DB"
|
||||
cd /opt/partdb/
|
||||
cp .env .env.local
|
||||
sed -i "s|DATABASE_URL=\"sqlite:///%kernel.project_dir%/var/app.db\"|DATABASE_URL=\"postgresql://${PG_DB_USER}:${PG_DB_PASS}@127.0.0.1:5432/${PG_DB_NAME}?serverVersion=12.19&charset=utf8\"|" .env.local
|
||||
|
||||
export COMPOSER_ALLOW_SUPERUSER=1
|
||||
$STD composer install --no-dev -o --no-interaction
|
||||
$STD yarn install
|
||||
$STD yarn build
|
||||
$STD php bin/console cache:clear
|
||||
php bin/console doctrine:migrations:migrate -n >~/database-migration-output
|
||||
chown -R www-data:www-data /opt/partdb
|
||||
@@ -36,6 +44,8 @@ ADMIN_PASS=$(grep -oP 'The initial password for the "admin" user is: \K\w+' ~/da
|
||||
echo "Part-DB Admin Password: $ADMIN_PASS"
|
||||
} >>~/partdb.creds
|
||||
rm -rf ~/database-migration-output
|
||||
rm -rf "/opt/v${RELEASE}.zip"
|
||||
echo "${RELEASE}" >~/.partdb
|
||||
msg_ok "Installed Part-DB"
|
||||
|
||||
msg_info "Creating Service"
|
||||
|
||||
@@ -62,7 +62,6 @@ fetch_and_deploy_gh_release "tracearr" "connorgallopo/Tracearr" "tarball" "lates
|
||||
|
||||
msg_info "Building Tracearr"
|
||||
export TZ=$(cat /etc/timezone)
|
||||
export NODE_OPTIONS="--max-old-space-size=4096"
|
||||
cd /opt/tracearr.build
|
||||
$STD pnpm install --frozen-lockfile --force
|
||||
$STD pnpm turbo telemetry disable
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/versity/versitygw
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
fetch_and_deploy_gh_release "versitygw" "versity/versitygw" "binary"
|
||||
|
||||
WEBUI_CONF=""
|
||||
read -rp "Would you like to enable the VersityGW WebGUI (Beta)? (y/N): " webui_prompt
|
||||
if [[ "${webui_prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||
WEBUI_CONF="\nVGW_WEBUI_PORT=:7071\nVGW_WEBUI_NO_TLS=true"
|
||||
msg_ok "WebGUI will be enabled on port 7071"
|
||||
fi
|
||||
|
||||
msg_info "Configuring VersityGW"
|
||||
mkdir -p /opt/versitygw-data
|
||||
ACCESS_KEY=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-20)
|
||||
SECRET_KEY=$(openssl rand -base64 36 | tr -dc 'a-zA-Z0-9' | cut -c1-40)
|
||||
|
||||
cat <<EOF >/etc/versitygw.d/gateway.conf
|
||||
VGW_BACKEND=posix
|
||||
VGW_BACKEND_ARG=/opt/versitygw-data
|
||||
VGW_PORT=:7070
|
||||
ROOT_ACCESS_KEY_ID=${ACCESS_KEY}
|
||||
ROOT_SECRET_ACCESS_KEY=${SECRET_KEY}
|
||||
EOF
|
||||
|
||||
if [[ -n "$WEBUI_CONF" ]]; then
|
||||
echo -e "$WEBUI_CONF" >>/etc/versitygw.d/gateway.conf
|
||||
fi
|
||||
msg_ok "Configured VersityGW"
|
||||
|
||||
msg_info "Enabling Service"
|
||||
systemctl enable -q --now versitygw@gateway
|
||||
msg_ok "Enabled Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -90,18 +90,11 @@ setting_up_container() {
|
||||
network_check() {
|
||||
set +e
|
||||
trap - ERR
|
||||
ipv4_connected=false
|
||||
|
||||
# Check IPv4 connectivity to Cloudflare, Google & Quad9 DNS servers
|
||||
if ping -c 1 -W 1 1.1.1.1 &>/dev/null || ping -c 1 -W 1 8.8.8.8 &>/dev/null || ping -c 1 -W 1 9.9.9.9 &>/dev/null; then
|
||||
msg_ok "IPv4 Internet Connected"
|
||||
ipv4_connected=true
|
||||
ipv4_status="${GN}✔${CL} IPv4"
|
||||
else
|
||||
msg_error "IPv4 Internet Not Connected"
|
||||
fi
|
||||
|
||||
if [[ $ipv4_connected == false ]]; then
|
||||
read -r -p "No Internet detected, would you like to continue anyway? <y/N> " prompt
|
||||
ipv4_status="${RD}✖${CL} IPv4"
|
||||
read -r -p "Internet NOT connected. Continue anyway? <y/N> " prompt
|
||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||
echo -e "${INFO}${RD}Expect Issues Without Internet${CL}"
|
||||
else
|
||||
@@ -109,28 +102,12 @@ network_check() {
|
||||
exit 122
|
||||
fi
|
||||
fi
|
||||
|
||||
# DNS resolution checks for GitHub-related domains
|
||||
GIT_HOSTS=("github.com" "raw.githubusercontent.com" "api.github.com" "git.community-scripts.org")
|
||||
GIT_STATUS="Git DNS:"
|
||||
DNS_FAILED=false
|
||||
|
||||
for HOST in "${GIT_HOSTS[@]}"; do
|
||||
RESOLVEDIP=$(getent hosts "$HOST" | awk '{ print $1 }' | grep -E '(^([0-9]{1,3}\.){3}[0-9]{1,3}$)|(^[a-fA-F0-9:]+$)' | head -n1)
|
||||
if [[ -z "$RESOLVEDIP" ]]; then
|
||||
GIT_STATUS+="$HOST:($DNSFAIL)"
|
||||
DNS_FAILED=true
|
||||
else
|
||||
GIT_STATUS+=" $HOST:($DNSOK)"
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ "$DNS_FAILED" == true ]]; then
|
||||
fatal "$GIT_STATUS"
|
||||
RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }')
|
||||
if [[ -z "$RESOLVEDIP" ]]; then
|
||||
msg_error "Internet: ${ipv4_status} DNS Failed"
|
||||
else
|
||||
msg_ok "$GIT_STATUS"
|
||||
msg_ok "Internet: ${ipv4_status} DNS: ${BL}${RESOLVEDIP}${CL}"
|
||||
fi
|
||||
|
||||
set -e
|
||||
trap 'error_handler $LINENO "$BASH_COMMAND"' ERR
|
||||
}
|
||||
|
||||
@@ -627,8 +627,8 @@ post_to_api() {
|
||||
|
||||
[[ "${DEV_MODE:-}" == "true" ]] && echo "[DEBUG] post_to_api() DIAGNOSTICS=$DIAGNOSTICS RANDOM_UUID=$RANDOM_UUID NSAPP=$NSAPP" >&2
|
||||
|
||||
# Set type for later status updates (respect pre-set value, e.g. "turnkey")
|
||||
TELEMETRY_TYPE="${TELEMETRY_TYPE:-lxc}"
|
||||
# Set type for later status updates
|
||||
TELEMETRY_TYPE="lxc"
|
||||
|
||||
local pve_version=""
|
||||
if command -v pveversion &>/dev/null; then
|
||||
@@ -664,7 +664,7 @@ post_to_api() {
|
||||
{
|
||||
"random_id": "${RANDOM_UUID}",
|
||||
"execution_id": "${EXECUTION_ID:-${RANDOM_UUID}}",
|
||||
"type": "${TELEMETRY_TYPE}",
|
||||
"type": "lxc",
|
||||
"nsapp": "${NSAPP:-unknown}",
|
||||
"status": "installing",
|
||||
"ct_type": ${CT_TYPE:-1},
|
||||
|
||||
@@ -529,10 +529,6 @@ validate_gateway_in_subnet() {
|
||||
local ip="${static_ip%%/*}"
|
||||
local cidr="${static_ip##*/}"
|
||||
|
||||
# /31 and /32 are valid point-to-point / zero-trust DMZ configurations
|
||||
# where the gateway is technically outside the subnet — skip validation
|
||||
((cidr >= 31)) && return 0
|
||||
|
||||
# Convert CIDR to netmask bits
|
||||
local mask=$((0xFFFFFFFF << (32 - cidr) & 0xFFFFFFFF))
|
||||
|
||||
@@ -989,10 +985,8 @@ base_settings() {
|
||||
fi
|
||||
|
||||
MTU=${var_mtu:-""}
|
||||
_sd_val="${var_searchdomain:-""}"
|
||||
[[ -n "$_sd_val" ]] && SD="-searchdomain=$_sd_val" || SD=""
|
||||
_ns_val="${var_ns:-""}"
|
||||
[[ -n "$_ns_val" ]] && NS="-nameserver=$_ns_val" || NS=""
|
||||
SD=${var_searchdomain:-""}
|
||||
NS=${var_ns:-""}
|
||||
MAC=${var_mac:-""}
|
||||
VLAN=${var_vlan:-""}
|
||||
SSH=${var_ssh:-"no"}
|
||||
@@ -3548,10 +3542,8 @@ build_container() {
|
||||
auto) NET_STRING="$NET_STRING,ip6=auto" ;;
|
||||
dhcp) NET_STRING="$NET_STRING,ip6=dhcp" ;;
|
||||
static)
|
||||
if [[ -n "$IPV6_ADDR" ]]; then
|
||||
NET_STRING="$NET_STRING,ip6=$IPV6_ADDR"
|
||||
[ -n "$IPV6_GATE" ] && NET_STRING="$NET_STRING,gw6=$IPV6_GATE"
|
||||
fi
|
||||
NET_STRING="$NET_STRING,ip6=$IPV6_ADDR"
|
||||
[ -n "$IPV6_GATE" ] && NET_STRING="$NET_STRING,gw6=$IPV6_GATE"
|
||||
;;
|
||||
none) ;;
|
||||
esac
|
||||
@@ -5002,7 +4994,7 @@ create_lxc_container() {
|
||||
return 0
|
||||
fi
|
||||
|
||||
msg_warn "An update for the Proxmox LXC stack is available"
|
||||
msg_info "An update for the Proxmox LXC stack is available"
|
||||
echo " pve-container: installed=${_pvec_i:-n/a} candidate=${_pvec_c:-n/a}"
|
||||
echo " lxc-pve : installed=${_lxcp_i:-n/a} candidate=${_lxcp_c:-n/a}"
|
||||
echo
|
||||
|
||||
@@ -1,23 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Copyright (c) 2021-2026 tteck
|
||||
# Author: tteck (tteckster)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# License: MIT
|
||||
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
|
||||
# Source shared libraries
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func)
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/core.func)
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/error_handler.func)
|
||||
load_functions
|
||||
catch_errors
|
||||
|
||||
APP="TurnKey LXC"
|
||||
NSAPP="turnkey"
|
||||
DIAGNOSTICS="no"
|
||||
METHOD="default"
|
||||
RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)"
|
||||
EXECUTION_ID="${RANDOM_UUID}"
|
||||
|
||||
header_info() {
|
||||
function header_info {
|
||||
clear
|
||||
cat <<"EOF"
|
||||
______ __ __ __ _ _______
|
||||
@@ -28,343 +15,281 @@ header_info() {
|
||||
EOF
|
||||
}
|
||||
|
||||
# Validate if a container ID is available (cluster-aware)
|
||||
validate_container_id() {
|
||||
set -euo pipefail
|
||||
shopt -s expand_aliases
|
||||
alias die='EXIT=$? LINE=$LINENO error_exit'
|
||||
trap die ERR
|
||||
function error_exit() {
|
||||
trap - ERR
|
||||
local DEFAULT='Unknown failure occured.'
|
||||
local REASON="\e[97m${1:-$DEFAULT}\e[39m"
|
||||
local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE"
|
||||
msg "$FLAG $REASON" 1>&2
|
||||
[ ! -z ${CTID-} ] && cleanup_ctid
|
||||
exit $EXIT
|
||||
}
|
||||
function warn() {
|
||||
local REASON="\e[97m$1\e[39m"
|
||||
local FLAG="\e[93m[WARNING]\e[39m"
|
||||
msg "$FLAG $REASON"
|
||||
}
|
||||
function info() {
|
||||
local REASON="$1"
|
||||
local FLAG="\e[36m[INFO]\e[39m"
|
||||
msg "$FLAG $REASON"
|
||||
}
|
||||
function msg() {
|
||||
local TEXT="$1"
|
||||
echo -e "$TEXT"
|
||||
}
|
||||
function validate_container_id() {
|
||||
local ctid="$1"
|
||||
[[ "$ctid" =~ ^[0-9]+$ ]] || return 1
|
||||
|
||||
# Cluster-wide check via pvesh
|
||||
if command -v pvesh &>/dev/null; then
|
||||
local cluster_ids
|
||||
cluster_ids=$(pvesh get /cluster/resources --type vm --output-format json 2>/dev/null |
|
||||
grep -oP '"vmid":\s*\K[0-9]+' 2>/dev/null || true)
|
||||
if [[ -n "$cluster_ids" ]] && echo "$cluster_ids" | grep -qw "$ctid"; then
|
||||
return 1
|
||||
fi
|
||||
# Check if ID is numeric
|
||||
if ! [[ "$ctid" =~ ^[0-9]+$ ]]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Local fallback
|
||||
# Check if config file exists for VM or LXC
|
||||
if [[ -f "/etc/pve/qemu-server/${ctid}.conf" ]] || [[ -f "/etc/pve/lxc/${ctid}.conf" ]]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check all cluster nodes
|
||||
if [[ -d "/etc/pve/nodes" ]]; then
|
||||
for node_dir in /etc/pve/nodes/*/; do
|
||||
if [[ -f "${node_dir}qemu-server/${ctid}.conf" ]] || [[ -f "${node_dir}lxc/${ctid}.conf" ]]; then
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Check LVM volumes
|
||||
# Check if ID is used in LVM logical volumes
|
||||
if lvs --noheadings -o lv_name 2>/dev/null | grep -qE "(^|[-_])${ctid}($|[-_])"; then
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
get_valid_container_id() {
|
||||
local suggested_id="${1:-$(pvesh get /cluster/nextid 2>/dev/null || echo 100)}"
|
||||
function get_valid_container_id() {
|
||||
local suggested_id="${1:-$(pvesh get /cluster/nextid)}"
|
||||
while ! validate_container_id "$suggested_id"; do
|
||||
suggested_id=$((suggested_id + 1))
|
||||
done
|
||||
echo "$suggested_id"
|
||||
}
|
||||
|
||||
cleanup_ctid() {
|
||||
if pct status "$CTID" &>/dev/null; then
|
||||
if [[ "$(pct status "$CTID" | awk '{print $2}')" == "running" ]]; then
|
||||
pct stop "$CTID"
|
||||
function cleanup_ctid() {
|
||||
if pct status $CTID &>/dev/null; then
|
||||
if [ "$(pct status $CTID | awk '{print $2}')" == "running" ]; then
|
||||
pct stop $CTID
|
||||
fi
|
||||
pct destroy "$CTID"
|
||||
pct destroy $CTID
|
||||
fi
|
||||
}
|
||||
|
||||
select_storage() {
|
||||
local class="$1" content content_label
|
||||
case "$class" in
|
||||
container)
|
||||
content='rootdir'
|
||||
content_label='Container'
|
||||
;;
|
||||
template)
|
||||
content='vztmpl'
|
||||
content_label='Container template'
|
||||
;;
|
||||
*)
|
||||
msg_error "Invalid storage class '$class'"
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
|
||||
local -a MENU=()
|
||||
local MSG_MAX_LENGTH=0
|
||||
|
||||
while read -r line; do
|
||||
local TAG TYPE FREE ITEM OFFSET=2
|
||||
TAG=$(echo "$line" | awk '{print $1}')
|
||||
TYPE=$(echo "$line" | awk '{printf "%-10s", $2}')
|
||||
FREE=$(echo "$line" | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}')
|
||||
ITEM=" Type: $TYPE Free: $FREE "
|
||||
((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=$((${#ITEM} + OFFSET))
|
||||
MENU+=("$TAG" "$ITEM" "OFF")
|
||||
done < <(pvesm status -content "$content" | awk 'NR>1')
|
||||
|
||||
if [[ $((${#MENU[@]} / 3)) -eq 0 ]]; then
|
||||
msg_error "'$content_label' needs to be selected for at least one storage location."
|
||||
return 1
|
||||
elif [[ $((${#MENU[@]} / 3)) -eq 1 ]]; then
|
||||
printf '%s' "${MENU[0]}"
|
||||
else
|
||||
local STORAGE
|
||||
while [[ -z "${STORAGE:+x}" ]]; do
|
||||
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||
"Which storage pool for the ${content_label,,}?\n\n" \
|
||||
16 $((MSG_MAX_LENGTH + 23)) 6 \
|
||||
"${MENU[@]}" 3>&1 1>&2 2>&3) || exit_script
|
||||
done
|
||||
printf '%s' "$STORAGE"
|
||||
fi
|
||||
}
|
||||
|
||||
# ==============================================================================
|
||||
# MAIN
|
||||
# ==============================================================================
|
||||
|
||||
# Cleanup on error: destroy container, report telemetry, and restart monitor
|
||||
turnkey_cleanup() {
|
||||
local exit_code=$?
|
||||
if [[ $exit_code -ne 0 ]]; then
|
||||
# Report failure to telemetry
|
||||
if [[ "${POST_TO_API_DONE:-}" == "true" && "${POST_UPDATE_DONE:-}" != "true" ]]; then
|
||||
post_update_to_api "failed" "$exit_code" 2>/dev/null || true
|
||||
fi
|
||||
# Destroy failed container
|
||||
if [[ -n "${CTID:-}" ]]; then
|
||||
cleanup_ctid 2>/dev/null || true
|
||||
fi
|
||||
fi
|
||||
if [[ -f /etc/systemd/system/ping-instances.service ]]; then
|
||||
systemctl start ping-instances.service 2>/dev/null || true
|
||||
fi
|
||||
}
|
||||
trap turnkey_cleanup EXIT
|
||||
|
||||
# Stop Proxmox VE Monitor-All if running
|
||||
if systemctl is-active -q ping-instances.service; then
|
||||
systemctl stop ping-instances.service
|
||||
fi
|
||||
|
||||
pve_check
|
||||
shell_check
|
||||
root_check
|
||||
|
||||
# Read diagnostics preference (same logic as build.func diagnostics_check)
|
||||
DIAG_CONFIG="/usr/local/community-scripts/diagnostics"
|
||||
if [[ -f "$DIAG_CONFIG" ]]; then
|
||||
DIAGNOSTICS=$(awk -F '=' '/^DIAGNOSTICS/ {print $2}' "$DIAG_CONFIG") || true
|
||||
DIAGNOSTICS="${DIAGNOSTICS:-no}"
|
||||
fi
|
||||
|
||||
header_info
|
||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "TurnKey LXCs" --yesno \
|
||||
"This will allow for the creation of one of the many TurnKey LXC Containers. Proceed?" 10 68 || exit_script
|
||||
|
||||
# Update template catalog early so the menu reflects the latest available templates
|
||||
msg_info "Updating LXC template list"
|
||||
pveam update >/dev/null
|
||||
msg_ok "Updated LXC template list"
|
||||
|
||||
# Build TurnKey selection menu dynamically from available templates
|
||||
declare -A TURNKEY_TEMPLATES
|
||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "TurnKey LXCs" --yesno "This will allow for the creation of one of the many TurnKey LXC Containers. Proceed?" 10 68
|
||||
TURNKEY_MENU=()
|
||||
MSG_MAX_LENGTH=0
|
||||
while IFS=$'\t' read -r TEMPLATE_FILE TAG ITEM; do
|
||||
TURNKEY_TEMPLATES["$TAG"]="$TEMPLATE_FILE"
|
||||
while read -r TAG ITEM; do
|
||||
OFFSET=2
|
||||
((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=$((${#ITEM} + OFFSET))
|
||||
((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET
|
||||
TURNKEY_MENU+=("$TAG" "$ITEM " "OFF")
|
||||
done < <(pveam available -section turnkeylinux | awk '{
|
||||
tpl = $2
|
||||
if (match(tpl, /debian-([0-9]+)-turnkey-([^_]+)_([^_]+)_/, m)) {
|
||||
app = m[2]; deb = m[1]; ver = m[3]
|
||||
display = app
|
||||
gsub(/-/, " ", display)
|
||||
n = split(display, words, " ")
|
||||
display = ""
|
||||
for (i = 1; i <= n; i++) {
|
||||
words[i] = toupper(substr(words[i], 1, 1)) substr(words[i], 2)
|
||||
display = display (i > 1 ? " " : "") words[i]
|
||||
}
|
||||
tag = app "-" deb
|
||||
printf "%s\t%s\t%s | Debian %s | %s\n", tpl, tag, display, deb, ver
|
||||
}
|
||||
}' | sort -t$'\t' -k2,2)
|
||||
done < <(
|
||||
cat <<EOF
|
||||
ansible Ansible
|
||||
bookstack BookStack
|
||||
core Core
|
||||
faveo-helpdesk Faveo Helpdesk
|
||||
fileserver File Server
|
||||
gallery Gallery
|
||||
gameserver Game Server
|
||||
gitea Gitea
|
||||
gitlab GitLab
|
||||
invoice-ninja Invoice Ninja
|
||||
mediaserver Media Server
|
||||
nextcloud Nextcloud
|
||||
observium Observium
|
||||
odoo Odoo
|
||||
openldap OpenLDAP
|
||||
openvpn OpenVPN
|
||||
owncloud ownCloud
|
||||
phpbb phpBB
|
||||
torrentserver Torrent Server
|
||||
wireguard WireGuard
|
||||
wordpress Wordpress
|
||||
zoneminder ZoneMinder
|
||||
EOF
|
||||
)
|
||||
turnkey=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "TurnKey LXCs" --radiolist "\nSelect a TurnKey LXC to create:\n" 16 $((MSG_MAX_LENGTH + 58)) 6 "${TURNKEY_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"')
|
||||
[ -z "$turnkey" ] && {
|
||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "No TurnKey LXC Selected" --msgbox "It appears that no TurnKey LXC container was selected" 10 68
|
||||
msg "Done"
|
||||
exit
|
||||
}
|
||||
|
||||
if [[ ${#TURNKEY_MENU[@]} -eq 0 ]]; then
|
||||
msg_error "No TurnKey templates found. Check your internet connection or template repository."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
selected=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "TurnKey LXCs" --radiolist \
|
||||
"\nSelect a TurnKey LXC to create:\n" 20 $((MSG_MAX_LENGTH + 58)) 12 \
|
||||
"${TURNKEY_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit_script
|
||||
|
||||
if [[ -z "$selected" ]]; then
|
||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "No TurnKey LXC Selected" \
|
||||
--msgbox "It appears that no TurnKey LXC container was selected" 10 68
|
||||
exit_script
|
||||
fi
|
||||
|
||||
# Extract template filename and app name from selection
|
||||
TEMPLATE="${TURNKEY_TEMPLATES[$selected]}"
|
||||
turnkey="${selected%-*}"
|
||||
|
||||
# Generate random password
|
||||
# Setup script environment
|
||||
PASS="$(openssl rand -base64 8)"
|
||||
|
||||
# Prompt for Container ID
|
||||
NEXT_ID=$(pvesh get /cluster/nextid 2>/dev/null || echo 100)
|
||||
# Prompt user to confirm container ID
|
||||
while true; do
|
||||
CTID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Container ID" \
|
||||
--inputbox "Enter the container ID..." 8 40 "$NEXT_ID" 3>&1 1>&2 2>&3) || exit_script
|
||||
CTID=$(whiptail --backtitle "Container ID" --title "Choose the Container ID" --inputbox "Enter the container ID..." 8 40 $(pvesh get /cluster/nextid) 3>&1 1>&2 2>&3)
|
||||
|
||||
if [[ -z "$CTID" ]]; then
|
||||
msg_error "No Container ID selected"
|
||||
exit_script
|
||||
fi
|
||||
# Check if user cancelled
|
||||
[ -z "$CTID" ] && die "No Container ID selected"
|
||||
|
||||
# Validate Container ID
|
||||
if ! validate_container_id "$CTID"; then
|
||||
SUGGESTED_ID=$(get_valid_container_id "$CTID")
|
||||
if whiptail --backtitle "Proxmox VE Helper Scripts" --title "ID Already In Use" --yesno \
|
||||
"Container/VM ID $CTID is already in use.\n\nWould you like to use the next available ID ($SUGGESTED_ID)?" 10 58; then
|
||||
if whiptail --backtitle "Container ID" --title "ID Already In Use" --yesno "Container/VM ID $CTID is already in use.\n\nWould you like to use the next available ID ($SUGGESTED_ID)?" 10 58; then
|
||||
CTID="$SUGGESTED_ID"
|
||||
break
|
||||
fi
|
||||
# User declined, loop back to input
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# Prompt for Hostname
|
||||
HOST_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Hostname" \
|
||||
--inputbox "Enter the container hostname..." 8 40 "turnkey-${turnkey}" 3>&1 1>&2 2>&3) || exit_script
|
||||
|
||||
# Container options
|
||||
PCT_OPTIONS=(
|
||||
-features keyctl=1,nesting=1
|
||||
-hostname "$HOST_NAME"
|
||||
-tags community-script
|
||||
-onboot 1
|
||||
-cores 2
|
||||
-memory 2048
|
||||
-password "$PASS"
|
||||
-net0 name=eth0,bridge=vmbr0,ip=dhcp
|
||||
-unprivileged 1
|
||||
-arch "$(dpkg --print-architecture)"
|
||||
# Prompt user to confirm Hostname
|
||||
HOST_NAME=$(whiptail --backtitle "Hostname" --title "Choose the Hostname" --inputbox "Enter the containers Hostname..." 8 40 "turnkey-${turnkey}" 3>&1 1>&2 2>&3)
|
||||
PCT_OPTIONS="
|
||||
-features keyctl=1,nesting=1
|
||||
-hostname $HOST_NAME
|
||||
-tags community-script
|
||||
-onboot 1
|
||||
-cores 2
|
||||
-memory 2048
|
||||
-password $PASS
|
||||
-net0 name=eth0,bridge=vmbr0,ip=dhcp
|
||||
-unprivileged 1
|
||||
"
|
||||
DEFAULT_PCT_OPTIONS=(
|
||||
-arch $(dpkg --print-architecture)
|
||||
)
|
||||
|
||||
# Storage selection
|
||||
TEMPLATE_STORAGE=$(select_storage template) || {
|
||||
msg_error "Failed to select template storage"
|
||||
exit 1
|
||||
}
|
||||
msg_ok "Using '${BL}${TEMPLATE_STORAGE}${CL}' for template storage"
|
||||
# Set the CONTENT and CONTENT_LABEL variables
|
||||
function select_storage() {
|
||||
local CLASS=$1
|
||||
local CONTENT
|
||||
local CONTENT_LABEL
|
||||
case $CLASS in
|
||||
container)
|
||||
CONTENT='rootdir'
|
||||
CONTENT_LABEL='Container'
|
||||
;;
|
||||
template)
|
||||
CONTENT='vztmpl'
|
||||
CONTENT_LABEL='Container template'
|
||||
;;
|
||||
*) false || die "Invalid storage class." ;;
|
||||
esac
|
||||
|
||||
CONTAINER_STORAGE=$(select_storage container) || {
|
||||
msg_error "Failed to select container storage"
|
||||
exit 1
|
||||
}
|
||||
msg_ok "Using '${BL}${CONTAINER_STORAGE}${CL}' for container storage"
|
||||
# Query all storage locations
|
||||
local -a MENU
|
||||
while read -r line; do
|
||||
local TAG=$(echo $line | awk '{print $1}')
|
||||
local TYPE=$(echo $line | awk '{printf "%-10s", $2}')
|
||||
local FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}')
|
||||
local ITEM=" Type: $TYPE Free: $FREE "
|
||||
local OFFSET=2
|
||||
if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then
|
||||
local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET))
|
||||
fi
|
||||
MENU+=("$TAG" "$ITEM" "OFF")
|
||||
done < <(pvesm status -content $CONTENT | awk 'NR>1')
|
||||
|
||||
# Download template if not already cached
|
||||
if ! pveam list "$TEMPLATE_STORAGE" | grep -q "$TEMPLATE"; then
|
||||
msg_info "Downloading LXC template"
|
||||
pveam download "$TEMPLATE_STORAGE" "$TEMPLATE" >/dev/null || {
|
||||
msg_error "Failed to download LXC template '${TEMPLATE}'"
|
||||
exit 1
|
||||
}
|
||||
msg_ok "Downloaded LXC template"
|
||||
# Select storage location
|
||||
if [ $((${#MENU[@]} / 3)) -eq 0 ]; then
|
||||
warn "'$CONTENT_LABEL' needs to be selected for at least one storage location."
|
||||
die "Unable to detect valid storage location."
|
||||
elif [ $((${#MENU[@]} / 3)) -eq 1 ]; then
|
||||
printf ${MENU[0]}
|
||||
else
|
||||
local STORAGE
|
||||
while [ -z "${STORAGE:+x}" ]; do
|
||||
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||
"Which storage pool would you like to use for the ${CONTENT_LABEL,,}?\n\n" \
|
||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||
"${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted."
|
||||
done
|
||||
printf $STORAGE
|
||||
fi
|
||||
}
|
||||
|
||||
# Get template storage
|
||||
TEMPLATE_STORAGE=$(select_storage template)
|
||||
info "Using '$TEMPLATE_STORAGE' for template storage."
|
||||
|
||||
# Get container storage
|
||||
CONTAINER_STORAGE=$(select_storage container)
|
||||
info "Using '$CONTAINER_STORAGE' for container storage."
|
||||
|
||||
# Update LXC template list
|
||||
msg "Updating LXC template list..."
|
||||
pveam update >/dev/null
|
||||
|
||||
# Get LXC template string
|
||||
mapfile -t TEMPLATES < <(pveam available -section turnkeylinux | awk -v turnkey="${turnkey}" '$0 ~ turnkey {print $2}' | sort -t - -k 2 -V)
|
||||
[ ${#TEMPLATES[@]} -gt 0 ] || die "Unable to find a template when searching for '${turnkey}'."
|
||||
TEMPLATE="${TEMPLATES[-1]}"
|
||||
|
||||
# Download LXC template
|
||||
if ! pveam list $TEMPLATE_STORAGE | grep -q $TEMPLATE; then
|
||||
msg "Downloading LXC template (Patience)..."
|
||||
pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null ||
|
||||
die "A problem occured while downloading the LXC template."
|
||||
fi
|
||||
|
||||
# Add rootfs if not specified
|
||||
[[ " ${PCT_OPTIONS[*]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs "${CONTAINER_STORAGE}:${PCT_DISK_SIZE:-8}")
|
||||
# Create variable for 'pct' options
|
||||
PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}})
|
||||
[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8})
|
||||
|
||||
# Set telemetry variables for the selected turnkey
|
||||
TELEMETRY_TYPE="turnkey"
|
||||
NSAPP="turnkey-${turnkey}"
|
||||
CT_TYPE=1
|
||||
DISK_SIZE="${PCT_DISK_SIZE:-8}"
|
||||
CORE_COUNT=2
|
||||
RAM_SIZE=2048
|
||||
var_os="turnkey"
|
||||
var_version="${turnkey}"
|
||||
# Create LXC
|
||||
msg "Creating LXC container..."
|
||||
pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null ||
|
||||
die "A problem occured while trying to create container."
|
||||
|
||||
# Report installation start to telemetry
|
||||
post_to_api
|
||||
# Save password
|
||||
echo "TurnKey ${turnkey} password: ${PASS}" >>~/turnkey-${turnkey}.creds # file is located in the Proxmox root directory
|
||||
|
||||
# Create LXC container
|
||||
msg_info "Creating LXC container"
|
||||
pct create "$CTID" "${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE}" "${PCT_OPTIONS[@]}" >/dev/null || {
|
||||
msg_error "Failed to create container"
|
||||
exit 1
|
||||
}
|
||||
msg_ok "Created LXC container (ID: ${BL}${CTID}${CL})"
|
||||
|
||||
# Save credentials securely
|
||||
CREDS_FILE=~/turnkey-${turnkey}.creds
|
||||
echo "TurnKey ${turnkey} password: ${PASS}" >>"$CREDS_FILE"
|
||||
chmod 600 "$CREDS_FILE"
|
||||
|
||||
# Configure TUN device access for VPN-based turnkeys
|
||||
TUN_DEVICE_REQUIRED=("openvpn")
|
||||
# If turnkey is "OpenVPN", add access to the tun device
|
||||
TUN_DEVICE_REQUIRED=("openvpn") # Setup this way in case future turnkeys also need tun access
|
||||
if printf '%s\n' "${TUN_DEVICE_REQUIRED[@]}" | grep -qw "${turnkey}"; then
|
||||
msg_info "Configuring TUN device access for ${turnkey}"
|
||||
{
|
||||
echo "lxc.cgroup2.devices.allow: c 10:200 rwm"
|
||||
echo "lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file 0 0"
|
||||
} >>"/etc/pve/lxc/${CTID}.conf"
|
||||
msg_ok "TUN device access configured"
|
||||
info "${turnkey} requires access to /dev/net/tun on the host. Modifying the container configuration to allow this."
|
||||
echo "lxc.cgroup2.devices.allow: c 10:200 rwm" >>/etc/pve/lxc/${CTID}.conf
|
||||
echo "lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file 0 0" >>/etc/pve/lxc/${CTID}.conf
|
||||
sleep 5
|
||||
fi
|
||||
|
||||
# Start container
|
||||
msg_info "Starting LXC container"
|
||||
msg "Starting LXC Container..."
|
||||
pct start "$CTID"
|
||||
msg_ok "Started LXC container"
|
||||
sleep 10
|
||||
|
||||
# Detect container IP
|
||||
msg_info "Detecting IP address"
|
||||
# Get container IP
|
||||
set +euo pipefail # Turn off error checking
|
||||
max_attempts=5
|
||||
attempt=1
|
||||
IP=""
|
||||
for attempt in $(seq 1 5); do
|
||||
IP=$(pct exec "$CTID" -- ip -4 a show dev eth0 2>/dev/null | grep -oP 'inet \K[^/]+' || true)
|
||||
if [[ -n "$IP" ]]; then
|
||||
while [[ $attempt -le $max_attempts ]]; do
|
||||
IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+')
|
||||
if [[ -n $IP ]]; then
|
||||
break
|
||||
else
|
||||
warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..."
|
||||
sleep 5
|
||||
((attempt++))
|
||||
fi
|
||||
[[ $attempt -lt 5 ]] && sleep 5
|
||||
done
|
||||
|
||||
if [[ -z "$IP" ]]; then
|
||||
msg_warn "IP address not found after 5 attempts"
|
||||
if [[ -z $IP ]]; then
|
||||
warn "Maximum number of attempts reached. IP address not found."
|
||||
IP="NOT FOUND"
|
||||
else
|
||||
msg_ok "IP address: ${BL}${IP}${CL}"
|
||||
fi
|
||||
|
||||
# Report success to telemetry
|
||||
post_update_to_api "done" "none"
|
||||
# Start Proxmox VE Monitor-All if available
|
||||
if [[ -f /etc/systemd/system/ping-instances.service ]]; then
|
||||
systemctl start ping-instances.service
|
||||
fi
|
||||
|
||||
# Success summary
|
||||
# Success message
|
||||
header_info
|
||||
echo
|
||||
msg_ok "TurnKey ${BL}${turnkey}${CL} LXC container '${BL}${CTID}${CL}' was successfully created."
|
||||
info "LXC container '$CTID' was successfully created, and its IP address is ${IP}."
|
||||
echo
|
||||
echo -e " ${TAB}${YW}IP Address:${CL} ${BL}${IP}${CL}"
|
||||
echo -e " ${TAB}${YW}Login:${CL} ${GN}root${CL}"
|
||||
echo -e " ${TAB}${YW}Password:${CL} ${GN}${PASS}${CL}"
|
||||
info "Proceed to the LXC console to complete the setup."
|
||||
echo
|
||||
echo -e " ${TAB}Proceed to the LXC console to complete the TurnKey setup."
|
||||
echo -e " ${TAB}Credentials stored in: ${BL}~/turnkey-${turnkey}.creds${CL}"
|
||||
info "login: root"
|
||||
info "password: $PASS"
|
||||
info "(credentials also stored in the root user's root directory in the 'turnkey-${turnkey}.creds' file.)"
|
||||
echo
|
||||
|
||||
Reference in New Issue
Block a user