mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-08-02 11:03:03 +02:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bc944d90e2 | |||
| 4264cb46f4 | |||
| c29d71f5c0 | |||
| cb458b93f5 | |||
| da77587831 | |||
| 72380779d4 | |||
| b518978402 | |||
| f2ef2776e7 |
Generated
+162
@@ -1,3 +1,165 @@
|
|||||||
|
## 2026-07-31
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- Docmost: cleanup folder at update [@MickLesk](https://github.com/MickLesk) ([#16177](https://github.com/community-scripts/ProxmoxVE/pull/16177))
|
||||||
|
- Firecrawl: Add dependency [@tremor021](https://github.com/tremor021) ([#16174](https://github.com/community-scripts/ProxmoxVE/pull/16174))
|
||||||
|
|
||||||
|
## 2026-07-30
|
||||||
|
|
||||||
|
### 🆕 New Scripts
|
||||||
|
|
||||||
|
- Firecrawl ([#16156](https://github.com/community-scripts/ProxmoxVE/pull/16156))
|
||||||
|
- OmniRoute ([#16155](https://github.com/community-scripts/ProxmoxVE/pull/16155))
|
||||||
|
- PegaProx ([#16154](https://github.com/community-scripts/ProxmoxVE/pull/16154))
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- Immich: Pin version to 3.1.0 [@vhsdream](https://github.com/vhsdream) ([#16170](https://github.com/community-scripts/ProxmoxVE/pull/16170))
|
||||||
|
- romm: remove stale 1.x alembic migrations on update [@Darkatek7](https://github.com/Darkatek7) ([#16101](https://github.com/community-scripts/ProxmoxVE/pull/16101))
|
||||||
|
|
||||||
|
- #### 🔧 Refactor
|
||||||
|
|
||||||
|
- Medusa: convert the non-free unrar source to deb822 format [@angusmaul](https://github.com/angusmaul) ([#16093](https://github.com/community-scripts/ProxmoxVE/pull/16093))
|
||||||
|
|
||||||
|
### 💾 Core
|
||||||
|
|
||||||
|
- #### ✨ New Features
|
||||||
|
|
||||||
|
- tools.func: support dynamic gitlab URL | add setup_mysql_db function [@MickLesk](https://github.com/MickLesk) ([#16166](https://github.com/community-scripts/ProxmoxVE/pull/16166))
|
||||||
|
- core: add configurable host CA inheritance during bootstrap [@MickLesk](https://github.com/MickLesk) ([#15889](https://github.com/community-scripts/ProxmoxVE/pull/15889))
|
||||||
|
|
||||||
|
## 2026-07-29
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- backup virtual printer in bambuddy [@asylumexp](https://github.com/asylumexp) ([#16142](https://github.com/community-scripts/ProxmoxVE/pull/16142))
|
||||||
|
- ImmichFrame: check .NET SDK before update deployment [@aidaskni](https://github.com/aidaskni) ([#16104](https://github.com/community-scripts/ProxmoxVE/pull/16104))
|
||||||
|
|
||||||
|
- #### ✨ New Features
|
||||||
|
|
||||||
|
- Bichon: Migration for V2 Release [@MickLesk](https://github.com/MickLesk) ([#16145](https://github.com/community-scripts/ProxmoxVE/pull/16145))
|
||||||
|
|
||||||
|
### 💾 Core
|
||||||
|
|
||||||
|
- #### ✨ New Features
|
||||||
|
|
||||||
|
- core: Harden remote func bootstrapping with dns issues [@MickLesk](https://github.com/MickLesk) ([#16146](https://github.com/community-scripts/ProxmoxVE/pull/16146))
|
||||||
|
|
||||||
|
## 2026-07-28
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- Create search directory in wanderer-install.sh [@Isnubi](https://github.com/Isnubi) ([#16134](https://github.com/community-scripts/ProxmoxVE/pull/16134))
|
||||||
|
- npmplus: Remove duplicate msg_info for container recreation [@MickLesk](https://github.com/MickLesk) ([#16122](https://github.com/community-scripts/ProxmoxVE/pull/16122))
|
||||||
|
- fix Node.js version drift [@asylumexp](https://github.com/asylumexp) ([#16111](https://github.com/community-scripts/ProxmoxVE/pull/16111))
|
||||||
|
- UmlautAdaptarr: use the Debian 13 Microsoft repo with its 2025 signing key [@angusmaul](https://github.com/angusmaul) ([#16077](https://github.com/community-scripts/ProxmoxVE/pull/16077))
|
||||||
|
- fix(bazarr): store data in /var/lib/bazarr instead of inside /opt/bazarr [@angusmaul](https://github.com/angusmaul) ([#16098](https://github.com/community-scripts/ProxmoxVE/pull/16098))
|
||||||
|
- Cloudflare-DDNS: store API token in a 600 env file and build the binary at install time [@angusmaul](https://github.com/angusmaul) ([#16100](https://github.com/community-scripts/ProxmoxVE/pull/16100))
|
||||||
|
|
||||||
|
- #### ✨ New Features
|
||||||
|
|
||||||
|
- tools.func: add nginx site helper and PHP socket resolver [@MickLesk](https://github.com/MickLesk) ([#16118](https://github.com/community-scripts/ProxmoxVE/pull/16118))
|
||||||
|
|
||||||
|
- #### 💥 Breaking Changes
|
||||||
|
|
||||||
|
- Migrate Musicseerr to DroppedNeedle [@vhsdream](https://github.com/vhsdream) ([#15751](https://github.com/community-scripts/ProxmoxVE/pull/15751))
|
||||||
|
|
||||||
|
### 💾 Core
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- core: fix read prompt input directly from /dev/tty [@MickLesk](https://github.com/MickLesk) ([#16126](https://github.com/community-scripts/ProxmoxVE/pull/16126))
|
||||||
|
|
||||||
|
### 🧰 Tools
|
||||||
|
|
||||||
|
- actual-budget-prometheus-exporter ([#16109](https://github.com/community-scripts/ProxmoxVE/pull/16109))
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- fix: prometheus-paperless-exporter incompatibility with paperless v3 [@CrazyWolf13](https://github.com/CrazyWolf13) ([#16119](https://github.com/community-scripts/ProxmoxVE/pull/16119))
|
||||||
|
|
||||||
|
### 📂 Github
|
||||||
|
|
||||||
|
- fix keep-open for close invalid pr [@asylumexp](https://github.com/asylumexp) ([#16105](https://github.com/community-scripts/ProxmoxVE/pull/16105))
|
||||||
|
- Bump GitHub Actions across workflows [@MickLesk](https://github.com/MickLesk) ([#16091](https://github.com/community-scripts/ProxmoxVE/pull/16091))
|
||||||
|
|
||||||
|
## 2026-07-27
|
||||||
|
|
||||||
|
### 🆕 New Scripts
|
||||||
|
|
||||||
|
- Unpackerr ([#16034](https://github.com/community-scripts/ProxmoxVE/pull/16034))
|
||||||
|
- CookCLI ([#16028](https://github.com/community-scripts/ProxmoxVE/pull/16028))
|
||||||
|
- Discourse ([#16024](https://github.com/community-scripts/ProxmoxVE/pull/16024))
|
||||||
|
- Mastodon ([#16029](https://github.com/community-scripts/ProxmoxVE/pull/16029))
|
||||||
|
- Docspell ([#16033](https://github.com/community-scripts/ProxmoxVE/pull/16033))
|
||||||
|
- Poznote ([#16030](https://github.com/community-scripts/ProxmoxVE/pull/16030))
|
||||||
|
- Shiori ([#16026](https://github.com/community-scripts/ProxmoxVE/pull/16026))
|
||||||
|
- Nezha ([#16025](https://github.com/community-scripts/ProxmoxVE/pull/16025))
|
||||||
|
- PasswordPusher ([#16031](https://github.com/community-scripts/ProxmoxVE/pull/16031))
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- Update MeiliSearch command for database upgrade [@Isnubi](https://github.com/Isnubi) ([#16081](https://github.com/community-scripts/ProxmoxVE/pull/16081))
|
||||||
|
- Mylar3 & Medusa: use trixie non-free for unrar, not bookworm [@angusmaul](https://github.com/angusmaul) ([#16072](https://github.com/community-scripts/ProxmoxVE/pull/16072))
|
||||||
|
- Vikunja: pin install/update to v2.3.0 due upstream issues [@MickLesk](https://github.com/MickLesk) ([#16059](https://github.com/community-scripts/ProxmoxVE/pull/16059))
|
||||||
|
|
||||||
|
- #### ✨ New Features
|
||||||
|
|
||||||
|
- OpenThread-BR: Add runtime configuration options [@tomfrenzel](https://github.com/tomfrenzel) ([#16038](https://github.com/community-scripts/ProxmoxVE/pull/16038))
|
||||||
|
|
||||||
|
### 💾 Core
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- core: Handle LXC upgrade prompt cancellation [@MickLesk](https://github.com/MickLesk) ([#16058](https://github.com/community-scripts/ProxmoxVE/pull/16058))
|
||||||
|
|
||||||
|
- #### ✨ New Features
|
||||||
|
|
||||||
|
- core: fix OS version fallback when the host catalog lacks the requested version & harden template validation [@MickLesk](https://github.com/MickLesk) ([#16068](https://github.com/community-scripts/ProxmoxVE/pull/16068))
|
||||||
|
|
||||||
|
## 2026-07-26
|
||||||
|
|
||||||
|
### 🆕 New Scripts
|
||||||
|
|
||||||
|
- Satisfactory ([#16023](https://github.com/community-scripts/ProxmoxVE/pull/16023))
|
||||||
|
- OmniTools ([#16032](https://github.com/community-scripts/ProxmoxVE/pull/16032))
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- Apache Tika: Remove software-properties-common from Apache Tika install [@andygrunwald](https://github.com/andygrunwald) ([#16054](https://github.com/community-scripts/ProxmoxVE/pull/16054))
|
||||||
|
- Fix inventree missing db engine (upstream issue / postinstall) [@MickLesk](https://github.com/MickLesk) ([#16022](https://github.com/community-scripts/ProxmoxVE/pull/16022))
|
||||||
|
- OPNsense VM: answer console password prompt explicitly, add inter-key delay [@MickLesk](https://github.com/MickLesk) ([#16021](https://github.com/community-scripts/ProxmoxVE/pull/16021))
|
||||||
|
- [endurain] add node update to update script [@johanngrobe](https://github.com/johanngrobe) ([#16014](https://github.com/community-scripts/ProxmoxVE/pull/16014))
|
||||||
|
|
||||||
|
- #### 🔧 Refactor
|
||||||
|
|
||||||
|
- Apache Tika: Switch from Debian Bookworm to Debian Trixie and replace manual install of OpenJDK with setup_java [@andygrunwald](https://github.com/andygrunwald) ([#16036](https://github.com/community-scripts/ProxmoxVE/pull/16036))
|
||||||
|
|
||||||
|
### 💾 Core
|
||||||
|
|
||||||
|
- #### 🔧 Refactor
|
||||||
|
|
||||||
|
- core: improve OS mismatch message [@MickLesk](https://github.com/MickLesk) ([#16035](https://github.com/community-scripts/ProxmoxVE/pull/16035))
|
||||||
|
|
||||||
|
### 🧰 Tools
|
||||||
|
|
||||||
|
- #### 🔧 Refactor
|
||||||
|
|
||||||
|
- Improve command description for disabling pve-enterprise repo [@Marcondiro](https://github.com/Marcondiro) ([#16020](https://github.com/community-scripts/ProxmoxVE/pull/16020))
|
||||||
|
|
||||||
## 2026-07-25
|
## 2026-07-25
|
||||||
|
|
||||||
### 🚀 Updated Scripts
|
### 🚀 Updated Scripts
|
||||||
|
|||||||
Generated
+12
@@ -0,0 +1,12 @@
|
|||||||
|
## 2026-08-01
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- Update bazarr-install.sh [@asylumexp](https://github.com/asylumexp) ([#16191](https://github.com/community-scripts/ProxmoxVE/pull/16191))
|
||||||
|
- fix romm missing 7z [@asylumexp](https://github.com/asylumexp) ([#16194](https://github.com/community-scripts/ProxmoxVE/pull/16194))
|
||||||
|
|
||||||
|
- #### 🔧 Refactor
|
||||||
|
|
||||||
|
- add CLEANUPARR_CONFIG_PATH, CLEANUPARR_LOGS_PATH vars [@asylumexp](https://github.com/asylumexp) ([#16193](https://github.com/community-scripts/ProxmoxVE/pull/16193))
|
||||||
+21
-154
@@ -83,6 +83,9 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -96,7 +99,14 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
|||||||
|
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary><h4>July (25 entries)</h4></summary>
|
<summary><h4>August (1 entries)</h4></summary>
|
||||||
|
|
||||||
|
[View August 2026 Changelog](.github/changelogs/2026/08.md)
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><h4>July (31 entries)</h4></summary>
|
||||||
|
|
||||||
[View July 2026 Changelog](.github/changelogs/2026/07.md)
|
[View July 2026 Changelog](.github/changelogs/2026/07.md)
|
||||||
|
|
||||||
@@ -508,6 +518,16 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
## 2026-08-02
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- fix(dispatcharr): add recordings and dvr queues to celery worker [@eXistC](https://github.com/eXistC) ([#16204](https://github.com/community-scripts/ProxmoxVE/pull/16204))
|
||||||
|
- add retry for uv - same as immich [@asylumexp](https://github.com/asylumexp) ([#16203](https://github.com/community-scripts/ProxmoxVE/pull/16203))
|
||||||
|
- Fix for cross-seed node version regression [@TorinFrancis](https://github.com/TorinFrancis) ([#16209](https://github.com/community-scripts/ProxmoxVE/pull/16209))
|
||||||
|
|
||||||
## 2026-08-01
|
## 2026-08-01
|
||||||
|
|
||||||
### 🚀 Updated Scripts
|
### 🚀 Updated Scripts
|
||||||
@@ -1108,156 +1128,3 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
|||||||
- #### 🐞 Bug Fixes
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
- Removed deprecated parameter in Filebrowser Quantum configuration [@alpargatagazer](https://github.com/alpargatagazer) ([#15573](https://github.com/community-scripts/ProxmoxVE/pull/15573))
|
- Removed deprecated parameter in Filebrowser Quantum configuration [@alpargatagazer](https://github.com/alpargatagazer) ([#15573](https://github.com/community-scripts/ProxmoxVE/pull/15573))
|
||||||
|
|
||||||
## 2026-07-02
|
|
||||||
|
|
||||||
### 🆕 New Scripts
|
|
||||||
|
|
||||||
- Rackula ([#15465](https://github.com/community-scripts/ProxmoxVE/pull/15465))
|
|
||||||
|
|
||||||
### 🚀 Updated Scripts
|
|
||||||
|
|
||||||
- #### 🐞 Bug Fixes
|
|
||||||
|
|
||||||
- typo: fix npm update to npm install for n8n [@MickLesk](https://github.com/MickLesk) ([#15545](https://github.com/community-scripts/ProxmoxVE/pull/15545))
|
|
||||||
|
|
||||||
- #### ✨ New Features
|
|
||||||
|
|
||||||
- Frigate: bump to v0.17.2 [@MickLesk](https://github.com/MickLesk) ([#15536](https://github.com/community-scripts/ProxmoxVE/pull/15536))
|
|
||||||
|
|
||||||
- #### 💥 Breaking Changes
|
|
||||||
|
|
||||||
- Revert "Immich v3.0.0" [@MickLesk](https://github.com/MickLesk) ([#15558](https://github.com/community-scripts/ProxmoxVE/pull/15558))
|
|
||||||
- Immich v3.0.0 [@vhsdream](https://github.com/vhsdream) ([#15153](https://github.com/community-scripts/ProxmoxVE/pull/15153))
|
|
||||||
|
|
||||||
### 💾 Core
|
|
||||||
|
|
||||||
- #### 🐞 Bug Fixes
|
|
||||||
|
|
||||||
- tools.func: configure pnpm to allow all build scripts for environments [@MickLesk](https://github.com/MickLesk) ([#15532](https://github.com/community-scripts/ProxmoxVE/pull/15532))
|
|
||||||
|
|
||||||
- #### ✨ New Features
|
|
||||||
|
|
||||||
- feat(build.func): add var_ignore_disable to bypass disabled-script guard [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#15544](https://github.com/community-scripts/ProxmoxVE/pull/15544))
|
|
||||||
|
|
||||||
## 2026-07-01
|
|
||||||
|
|
||||||
### 🆕 New Scripts
|
|
||||||
|
|
||||||
- iVentoy ([#15503](https://github.com/community-scripts/ProxmoxVE/pull/15503))
|
|
||||||
|
|
||||||
### 🚀 Updated Scripts
|
|
||||||
|
|
||||||
- #### 🐞 Bug Fixes
|
|
||||||
|
|
||||||
- Stirling-PDF: patch libicudata execstack flag for LXC container compatibility [@MickLesk](https://github.com/MickLesk) ([#15531](https://github.com/community-scripts/ProxmoxVE/pull/15531))
|
|
||||||
- FlowiseAI: align install to use pnpm instead of npm to fix missing dependencies [@MickLesk](https://github.com/MickLesk) ([#15530](https://github.com/community-scripts/ProxmoxVE/pull/15530))
|
|
||||||
- Vaultwarden: handle version detection failure gracefully in update [@MickLesk](https://github.com/MickLesk) ([#15526](https://github.com/community-scripts/ProxmoxVE/pull/15526))
|
|
||||||
- homarr: fix: update-fail [@CrazyWolf13](https://github.com/CrazyWolf13) ([#15512](https://github.com/community-scripts/ProxmoxVE/pull/15512))
|
|
||||||
- n8n: pin version to 2.27.5 [@tremor021](https://github.com/tremor021) ([#15516](https://github.com/community-scripts/ProxmoxVE/pull/15516))
|
|
||||||
|
|
||||||
- #### ✨ New Features
|
|
||||||
|
|
||||||
- [arm64] feat: iventory arm64 support [@asylumexp](https://github.com/asylumexp) ([#15521](https://github.com/community-scripts/ProxmoxVE/pull/15521))
|
|
||||||
|
|
||||||
### 💾 Core
|
|
||||||
|
|
||||||
- #### 🐞 Bug Fixes
|
|
||||||
|
|
||||||
- core: fix SDN vnet network parameter to use bridge instead of vnet [@MickLesk](https://github.com/MickLesk) ([#15527](https://github.com/community-scripts/ProxmoxVE/pull/15527))
|
|
||||||
- tools.func: use safe variable expansion in check_for_gh_release RETURN trap [@MickLesk](https://github.com/MickLesk) ([#15529](https://github.com/community-scripts/ProxmoxVE/pull/15529))
|
|
||||||
|
|
||||||
## 2026-06-30
|
|
||||||
|
|
||||||
### 🚀 Updated Scripts
|
|
||||||
|
|
||||||
- #### 🔧 Refactor
|
|
||||||
|
|
||||||
- Refactor: Use heredoc when creating env files and creds/other [@tremor021](https://github.com/tremor021) ([#15469](https://github.com/community-scripts/ProxmoxVE/pull/15469))
|
|
||||||
|
|
||||||
### 🧰 Tools
|
|
||||||
|
|
||||||
- #### 🐞 Bug Fixes
|
|
||||||
|
|
||||||
- [tools/pve/*.sh] https://download.proxmox.com -> http://download.proxmox.com (PVE8 Only) [@galeksandrp](https://github.com/galeksandrp) ([#15498](https://github.com/community-scripts/ProxmoxVE/pull/15498))
|
|
||||||
|
|
||||||
## 2026-06-29
|
|
||||||
|
|
||||||
### 🆕 New Scripts
|
|
||||||
|
|
||||||
- Koffan ([#15467](https://github.com/community-scripts/ProxmoxVE/pull/15467))
|
|
||||||
- Etherpad ([#15468](https://github.com/community-scripts/ProxmoxVE/pull/15468))
|
|
||||||
- Flame ([#15464](https://github.com/community-scripts/ProxmoxVE/pull/15464))
|
|
||||||
|
|
||||||
### 🚀 Updated Scripts
|
|
||||||
|
|
||||||
- chore(ct): sync snapotter defaults with PocketBase [@github-actions[bot]](https://github.com/github-actions[bot]) ([#15472](https://github.com/community-scripts/ProxmoxVE/pull/15472))
|
|
||||||
|
|
||||||
- #### 🐞 Bug Fixes
|
|
||||||
|
|
||||||
- feat: update nginx proxy manager to trixie [@asylumexp](https://github.com/asylumexp) ([#15457](https://github.com/community-scripts/ProxmoxVE/pull/15457))
|
|
||||||
|
|
||||||
### 💾 Core
|
|
||||||
|
|
||||||
- #### ✨ New Features
|
|
||||||
|
|
||||||
- [tools.func]: add edit_yaml_config function [@tremor021](https://github.com/tremor021) ([#15484](https://github.com/community-scripts/ProxmoxVE/pull/15484))
|
|
||||||
|
|
||||||
## 2026-06-28
|
|
||||||
|
|
||||||
### 🚀 Updated Scripts
|
|
||||||
|
|
||||||
- #### 💥 Breaking Changes
|
|
||||||
|
|
||||||
- remove: promtail as EOL and other fixes [@asylumexp](https://github.com/asylumexp) ([#15455](https://github.com/community-scripts/ProxmoxVE/pull/15455))
|
|
||||||
|
|
||||||
## 2026-06-27
|
|
||||||
|
|
||||||
### 🆕 New Scripts
|
|
||||||
|
|
||||||
- tool: add disk-health tool (SMART + NVMe) [@MickLesk](https://github.com/MickLesk) ([#15417](https://github.com/community-scripts/ProxmoxVE/pull/15417))
|
|
||||||
|
|
||||||
### 🚀 Updated Scripts
|
|
||||||
|
|
||||||
- #### 🐞 Bug Fixes
|
|
||||||
|
|
||||||
- Deluge openssl fix [@asylumexp](https://github.com/asylumexp) ([#15435](https://github.com/community-scripts/ProxmoxVE/pull/15435))
|
|
||||||
- fix command syntax in tunarr.sh [@asylumexp](https://github.com/asylumexp) ([#15434](https://github.com/community-scripts/ProxmoxVE/pull/15434))
|
|
||||||
|
|
||||||
- #### 🔧 Refactor
|
|
||||||
|
|
||||||
- Storyteller: bump Node.js version to Node 24 [@thinusn](https://github.com/thinusn) ([#15439](https://github.com/community-scripts/ProxmoxVE/pull/15439))
|
|
||||||
|
|
||||||
### ❔ Uncategorized
|
|
||||||
|
|
||||||
- fix(endurain): replace Poetry/uv-pip backend setup with uv sync --frozen --no-dev [@Copilot](https://github.com/Copilot) ([#15429](https://github.com/community-scripts/ProxmoxVE/pull/15429))
|
|
||||||
|
|
||||||
## 2026-06-26
|
|
||||||
|
|
||||||
### 🚀 Updated Scripts
|
|
||||||
|
|
||||||
- Termix: Update Nginx configuration file paths [@xyzulu](https://github.com/xyzulu) ([#15397](https://github.com/community-scripts/ProxmoxVE/pull/15397))
|
|
||||||
|
|
||||||
- #### 🐞 Bug Fixes
|
|
||||||
|
|
||||||
- Docuseal: use real SECRET_KEY_BASE for db:migrate on update [@MickLesk](https://github.com/MickLesk) ([#15411](https://github.com/community-scripts/ProxmoxVE/pull/15411))
|
|
||||||
- bun: correct install for degoog [@MickLesk](https://github.com/MickLesk) ([#15412](https://github.com/community-scripts/ProxmoxVE/pull/15412))
|
|
||||||
- fix databasus update/install errors [@asylumexp](https://github.com/asylumexp) ([#15403](https://github.com/community-scripts/ProxmoxVE/pull/15403))
|
|
||||||
|
|
||||||
### 💾 Core
|
|
||||||
|
|
||||||
- #### 🐞 Bug Fixes
|
|
||||||
|
|
||||||
- tools.func: fix setup_docker - don't abort update on docker pull failure [@MickLesk](https://github.com/MickLesk) ([#15410](https://github.com/community-scripts/ProxmoxVE/pull/15410))
|
|
||||||
- fix(build.func): set /dev/kfd GID in fix_gpu_gids for AMD ROCm [@jamiej](https://github.com/jamiej) ([#15401](https://github.com/community-scripts/ProxmoxVE/pull/15401))
|
|
||||||
- fix alpine mktmp error [@asylumexp](https://github.com/asylumexp) ([#15398](https://github.com/community-scripts/ProxmoxVE/pull/15398))
|
|
||||||
|
|
||||||
### 🧰 Tools
|
|
||||||
|
|
||||||
- #### 🔧 Refactor
|
|
||||||
|
|
||||||
- Refactor: reduce IP-Tag resource usage and clean up ShellCheck findings [@MickLesk](https://github.com/MickLesk) ([#15418](https://github.com/community-scripts/ProxmoxVE/pull/15418))
|
|
||||||
- QoL: kernel-clean: Validate kernel selection input [@MickLesk](https://github.com/MickLesk) ([#15414](https://github.com/community-scripts/ProxmoxVE/pull/15414))
|
|
||||||
- QoL: clean-lxcs exclude matching and set -e cancel handling [@MickLesk](https://github.com/MickLesk) ([#15413](https://github.com/community-scripts/ProxmoxVE/pull/15413))
|
|
||||||
- QoL: Harden microcode download/install in microcode and pbs-microcode [@MickLesk](https://github.com/MickLesk) ([#15415](https://github.com/community-scripts/ProxmoxVE/pull/15415))
|
|
||||||
- QoL: scaling-governor extend selection and guard missing cpufreq [@MickLesk](https://github.com/MickLesk) ([#15416](https://github.com/community-scripts/ProxmoxVE/pull/15416))
|
|
||||||
@@ -118,10 +118,19 @@ function update_script() {
|
|||||||
export UV_COMPILE_BYTECODE="1"
|
export UV_COMPILE_BYTECODE="1"
|
||||||
export UV_LINK_MODE="copy"
|
export UV_LINK_MODE="copy"
|
||||||
export UV_NATIVE_TLS="1"
|
export UV_NATIVE_TLS="1"
|
||||||
|
export UV_HTTP_TIMEOUT="300"
|
||||||
export RUSTUP_PERMIT_COPY_RENAME="true"
|
export RUSTUP_PERMIT_COPY_RENAME="true"
|
||||||
export UV_PYTHON_INSTALL_DIR="/usr/local/bin"
|
export UV_PYTHON_INSTALL_DIR="/usr/local/bin"
|
||||||
cd /opt/authentik
|
cd /opt/authentik
|
||||||
|
for attempt in 1 2 3; do
|
||||||
|
if [[ $attempt -eq 3 ]]; then
|
||||||
$STD uv sync --frozen --no-install-project --no-dev
|
$STD uv sync --frozen --no-install-project --no-dev
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
$STD uv sync --frozen --no-install-project --no-dev && break
|
||||||
|
msg_warn "uv sync attempt $attempt failed, retrying..."
|
||||||
|
sleep $((attempt * 15))
|
||||||
|
done
|
||||||
chown -R authentik:authentik /opt/authentik
|
chown -R authentik:authentik /opt/authentik
|
||||||
msg_ok "Updated python server"
|
msg_ok "Updated python server"
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -25,7 +25,7 @@ function update_script() {
|
|||||||
check_container_storage
|
check_container_storage
|
||||||
check_container_resources
|
check_container_resources
|
||||||
|
|
||||||
NODE_VERSION="26" setup_nodejs
|
NODE_VERSION="24" setup_nodejs
|
||||||
ensure_dependencies build-essential
|
ensure_dependencies build-essential
|
||||||
|
|
||||||
if command -v cross-seed &>/dev/null; then
|
if command -v cross-seed &>/dev/null; then
|
||||||
|
|||||||
@@ -122,9 +122,18 @@ export UV_NO_BINARY_PACKAGE="cryptography lxml python-kadmin-rs xmlsec"
|
|||||||
export UV_COMPILE_BYTECODE="1"
|
export UV_COMPILE_BYTECODE="1"
|
||||||
export UV_LINK_MODE="copy"
|
export UV_LINK_MODE="copy"
|
||||||
export UV_NATIVE_TLS="1"
|
export UV_NATIVE_TLS="1"
|
||||||
|
export UV_HTTP_TIMEOUT="300"
|
||||||
export UV_PYTHON_INSTALL_DIR="/usr/local/bin"
|
export UV_PYTHON_INSTALL_DIR="/usr/local/bin"
|
||||||
cd /opt/authentik
|
cd /opt/authentik
|
||||||
$STD uv sync --frozen --no-install-project --no-dev
|
for attempt in 1 2 3; do
|
||||||
|
if [[ $attempt -eq 3 ]]; then
|
||||||
|
$STD uv sync --frozen --no-install-project --no-dev
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
$STD uv sync --frozen --no-install-project --no-dev && break
|
||||||
|
msg_warn "uv sync attempt $attempt failed, retrying..."
|
||||||
|
sleep $((attempt * 15))
|
||||||
|
done
|
||||||
cp /opt/authentik/authentik/sources/kerberos/krb5.conf /etc/krb5.conf
|
cp /opt/authentik/authentik/sources/kerberos/krb5.conf /etc/krb5.conf
|
||||||
msg_ok "Setup python server"
|
msg_ok "Setup python server"
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ msg_info "Installing Dependencies"
|
|||||||
$STD apt install -y build-essential
|
$STD apt install -y build-essential
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
NODE_VERSION="26" setup_nodejs
|
NODE_VERSION="24" setup_nodejs
|
||||||
|
|
||||||
msg_info "Setup Cross-Seed"
|
msg_info "Setup Cross-Seed"
|
||||||
$STD npm install cross-seed@latest -g
|
$STD npm install cross-seed@latest -g
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ cd /opt/dispatcharr
|
|||||||
set -a
|
set -a
|
||||||
source .env
|
source .env
|
||||||
set +a
|
set +a
|
||||||
exec uv run celery -A dispatcharr worker -l info -c 4
|
exec uv run celery -A dispatcharr worker -l info -c 4 -Q celery,recordings,dvr,default
|
||||||
EOF
|
EOF
|
||||||
chmod +x /opt/dispatcharr/start-celery.sh
|
chmod +x /opt/dispatcharr/start-celery.sh
|
||||||
|
|
||||||
|
|||||||
@@ -6,19 +6,6 @@
|
|||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Source: https://netbird.io/ | Github: https://github.com/netbirdio/netbird
|
# Source: https://netbird.io/ | Github: https://github.com/netbirdio/netbird
|
||||||
|
|
||||||
APP="add-netbird-lxc"
|
|
||||||
APP_TYPE="addon"
|
|
||||||
|
|
||||||
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/tools.func)
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/error_handler.func)
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
|
|
||||||
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "add-netbird-lxc" "addon"
|
|
||||||
|
|
||||||
# Enable error handling
|
|
||||||
set -Eeuo pipefail
|
|
||||||
trap 'error_handler' ERR
|
|
||||||
|
|
||||||
function header_info {
|
function header_info {
|
||||||
clear
|
clear
|
||||||
cat <<"EOF"
|
cat <<"EOF"
|
||||||
@@ -30,22 +17,28 @@ function header_info {
|
|||||||
|
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
# Initialize all core functions (colors, formatting, icons, STD mode)
|
|
||||||
load_functions
|
|
||||||
|
|
||||||
header_info
|
header_info
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Telemetry
|
||||||
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
|
||||||
|
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "add-netbird-lxc" "addon"
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
read -r -p "This will add NetBird to an existing LXC Container ONLY. Proceed(y/n)?" yn
|
read -p "This will add NetBird to an existing LXC Container ONLY. Proceed(y/n)?" yn
|
||||||
case $yn in
|
case $yn in
|
||||||
[Yy]*) break ;;
|
[Yy]*) break ;;
|
||||||
[Nn]*) exit 0 ;;
|
[Nn]*) exit ;;
|
||||||
*) echo "Please answer yes or no." ;;
|
*) echo "Please answer yes or no." ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
header_info
|
header_info
|
||||||
msg_info "Loading container list..."
|
echo "Loading..."
|
||||||
|
|
||||||
|
function msg() {
|
||||||
|
local TEXT="$1"
|
||||||
|
echo -e "$TEXT"
|
||||||
|
}
|
||||||
|
|
||||||
NODE=$(hostname)
|
NODE=$(hostname)
|
||||||
MSG_MAX_LENGTH=0
|
MSG_MAX_LENGTH=0
|
||||||
@@ -68,28 +61,28 @@ done
|
|||||||
|
|
||||||
LXC_STATUS=$(pct status "$CTID" | awk '{print $2}')
|
LXC_STATUS=$(pct status "$CTID" | awk '{print $2}')
|
||||||
if [[ "$LXC_STATUS" != "running" ]]; then
|
if [[ "$LXC_STATUS" != "running" ]]; then
|
||||||
msg_info "Container $CTID is not running. Starting it now..."
|
msg "\e[1;33m The container $CTID is not running. Starting it now...\e[0m"
|
||||||
pct start "$CTID"
|
pct start "$CTID"
|
||||||
while [[ "$(pct status "$CTID" | awk '{print $2}')" != "running" ]]; do
|
while [[ "$(pct status "$CTID" | awk '{print $2}')" != "running" ]]; do
|
||||||
msg_info "Waiting for the container to start..."
|
msg "\e[1;33m Waiting for the container to start...\e[0m"
|
||||||
sleep 2
|
sleep 2
|
||||||
done
|
done
|
||||||
msg_ok "Container $CTID is now running."
|
msg "\e[1;32m Container $CTID is now running.\e[0m"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DISTRO=$(pct exec "$CTID" -- cat /etc/os-release | grep -w "ID" | cut -d'=' -f2 | tr -d '"')
|
DISTRO=$(pct exec "$CTID" -- cat /etc/os-release | grep -w "ID" | cut -d'=' -f2 | tr -d '"')
|
||||||
if [[ "$DISTRO" != "debian" && "$DISTRO" != "ubuntu" ]]; then
|
if [[ "$DISTRO" != "debian" && "$DISTRO" != "ubuntu" ]]; then
|
||||||
msg_error "This script only supports Debian or Ubuntu LXC containers. Detected: $DISTRO. Aborting..."
|
msg "\e[1;31m Error: This script only supports Debian or Ubuntu LXC containers. Detected: $DISTRO. Aborting...\e[0m"
|
||||||
exit 238
|
exit 238
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CTID_CONFIG_PATH="/etc/pve/lxc/${CTID}.conf"
|
CTID_CONFIG_PATH=/etc/pve/lxc/${CTID}.conf
|
||||||
cat <<EOF >>"$CTID_CONFIG_PATH"
|
cat <<EOF >>$CTID_CONFIG_PATH
|
||||||
lxc.cgroup2.devices.allow: c 10:200 rwm
|
lxc.cgroup2.devices.allow: c 10:200 rwm
|
||||||
lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file
|
lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file
|
||||||
EOF
|
EOF
|
||||||
header_info
|
header_info
|
||||||
msg_info "Installing NetBird"
|
msg "Installing NetBird..."
|
||||||
pct exec "$CTID" -- bash -c '
|
pct exec "$CTID" -- bash -c '
|
||||||
if ! command -v curl &>/dev/null; then
|
if ! command -v curl &>/dev/null; then
|
||||||
apt-get update -qq
|
apt-get update -qq
|
||||||
@@ -110,5 +103,6 @@ OVERRIDE
|
|||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
fi
|
fi
|
||||||
'
|
'
|
||||||
msg_ok "Installed NetBird."
|
msg "\e[1;32m ✔ Installed NetBird.\e[0m"
|
||||||
echo -e "${YW}Reboot ${CTID} LXC${CL} to apply the changes, then run 'netbird up' in the LXC console"
|
sleep 2
|
||||||
|
msg "\e[1;31m Reboot ${CTID} LXC to apply the changes, then run netbird up in the LXC console\e[0m"
|
||||||
|
|||||||
@@ -5,18 +5,8 @@
|
|||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Source: https://tailscale.com/ | Github: https://github.com/tailscale/tailscale
|
# Source: https://tailscale.com/ | Github: https://github.com/tailscale/tailscale
|
||||||
|
|
||||||
APP="add-tailscale-lxc"
|
|
||||||
APP_TYPE="addon"
|
|
||||||
|
|
||||||
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/tools.func)
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/error_handler.func)
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
|
|
||||||
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "add-tailscale-lxc" "addon"
|
|
||||||
|
|
||||||
# Enable error handling
|
|
||||||
set -Eeuo pipefail
|
set -Eeuo pipefail
|
||||||
trap 'error_handler' ERR
|
trap 'echo -e "\n[ERROR] in line $LINENO: exit code $?"' ERR
|
||||||
|
|
||||||
function header_info() {
|
function header_info() {
|
||||||
clear
|
clear
|
||||||
@@ -30,8 +20,13 @@ function header_info() {
|
|||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
# Initialize all core functions (colors, formatting, icons, STD mode)
|
function msg_info() { echo -e " \e[1;36m➤\e[0m $1"; }
|
||||||
load_functions
|
function msg_ok() { echo -e " \e[1;32m✔\e[0m $1"; }
|
||||||
|
function msg_error() { echo -e " \e[1;31m✖\e[0m $1"; }
|
||||||
|
|
||||||
|
# Telemetry
|
||||||
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
|
||||||
|
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "add-tailscale-lxc" "addon"
|
||||||
|
|
||||||
header_info
|
header_info
|
||||||
|
|
||||||
@@ -173,4 +168,4 @@ TAGS="${TAGS:+$TAGS; }tailscale"
|
|||||||
pct set "$CTID" -tags "$TAGS"
|
pct set "$CTID" -tags "$TAGS"
|
||||||
|
|
||||||
msg_ok "Tailscale installed on CT $CTID"
|
msg_ok "Tailscale installed on CT $CTID"
|
||||||
echo -e "${YW}Reboot the container${CL}, then run 'tailscale up' inside the container to activate."
|
msg_info "Reboot the container, then run 'tailscale up' inside the container to activate."
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ if ! command -v curl &>/dev/null; then
|
|||||||
if [[ -f "/etc/alpine-release" ]]; then
|
if [[ -f "/etc/alpine-release" ]]; then
|
||||||
apk -U add curl >/dev/null 2>&1
|
apk -U add curl >/dev/null 2>&1
|
||||||
else
|
else
|
||||||
apt update >/dev/null 2>&1
|
apt-get update >/dev/null 2>&1
|
||||||
apt install -y curl >/dev/null 2>&1
|
apt-get install -y curl >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
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/core.func)
|
||||||
@@ -36,6 +36,28 @@ DEFAULT_PORT=8080
|
|||||||
# Initialize all core functions (colors, formatting, icons, STD mode)
|
# Initialize all core functions (colors, formatting, icons, STD mode)
|
||||||
load_functions
|
load_functions
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# HEADER
|
||||||
|
# ==============================================================================
|
||||||
|
function header_info {
|
||||||
|
clear
|
||||||
|
cat <<"EOF"
|
||||||
|
___ __ ____ __ _____
|
||||||
|
/ | ____/ /___ ___ ______ __________/ / / / /___ ____ ___ ___ / ___/__ ______ _____
|
||||||
|
/ /| |/ __ / __ `/ / / / __ `/ ___/ __ / /_/ / __ \/ __ `__ \/ _ \ \__ \/ / / / __ \/ ___/
|
||||||
|
/ ___ / /_/ / /_/ / /_/ / /_/ / / / /_/ / __ / /_/ / / / / / / __/ ___/ / /_/ / / / / /__
|
||||||
|
/_/ |_\__,_/\__, /\__,_/\__,_/_/ \__,_/_/ /_/\____/_/ /_/ /_/\___/ /____/\__, /_/ /_/\___/
|
||||||
|
/____/ /____/
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# HELPER FUNCTIONS
|
||||||
|
# ==============================================================================
|
||||||
|
get_ip() {
|
||||||
|
hostname -I 2>/dev/null | awk '{print $1}' || ip -4 addr show scope global 2>/dev/null | awk '/inet / {print $2}' | cut -d/ -f1 | head -n1 || echo "127.0.0.1"
|
||||||
|
}
|
||||||
|
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# OS DETECTION
|
# OS DETECTION
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
@@ -92,12 +114,16 @@ function update() {
|
|||||||
fi
|
fi
|
||||||
msg_ok "Stopped service"
|
msg_ok "Stopped service"
|
||||||
|
|
||||||
BACKUP_DIR="/opt/adguardhome-sync_backup"
|
msg_info "Backing up configuration"
|
||||||
create_backup "$CONFIG_PATH"
|
cp "$CONFIG_PATH" /tmp/adguardhome-sync.yaml.bak 2>/dev/null || true
|
||||||
|
msg_ok "Backed up configuration"
|
||||||
|
|
||||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "adguardhome-sync" "bakito/adguardhome-sync" "prebuild" "latest" "$INSTALL_PATH" "adguardhome-sync_*_linux_$(arch_resolve).tar.gz"
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "adguardhome-sync" "bakito/adguardhome-sync" "prebuild" "latest" "$INSTALL_PATH" "adguardhome-sync_*_linux_amd64.tar.gz"
|
||||||
|
|
||||||
restore_backup
|
msg_info "Restoring configuration"
|
||||||
|
cp /tmp/adguardhome-sync.yaml.bak "$CONFIG_PATH" 2>/dev/null || true
|
||||||
|
rm -f /tmp/adguardhome-sync.yaml.bak
|
||||||
|
msg_ok "Restored configuration"
|
||||||
|
|
||||||
msg_info "Starting service"
|
msg_info "Starting service"
|
||||||
if [[ "$OS" == "Alpine" ]]; then
|
if [[ "$OS" == "Alpine" ]]; then
|
||||||
@@ -115,7 +141,10 @@ function update() {
|
|||||||
# INSTALL
|
# INSTALL
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
function install() {
|
function install() {
|
||||||
fetch_and_deploy_gh_release "adguardhome-sync" "bakito/adguardhome-sync" "prebuild" "latest" "$INSTALL_PATH" "adguardhome-sync_*_linux_$(arch_resolve).tar.gz"
|
local ip
|
||||||
|
ip=$(get_ip)
|
||||||
|
|
||||||
|
fetch_and_deploy_gh_release "adguardhome-sync" "bakito/adguardhome-sync" "prebuild" "latest" "$INSTALL_PATH" "adguardhome-sync_*_linux_amd64.tar.gz"
|
||||||
|
|
||||||
# Gather configuration from user
|
# Gather configuration from user
|
||||||
echo ""
|
echo ""
|
||||||
@@ -264,7 +293,7 @@ UPDATEEOF
|
|||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
msg_ok "${APP} installed successfully"
|
msg_ok "${APP} installed successfully"
|
||||||
msg_ok "Web UI: ${BL}http://${IP}:${DEFAULT_PORT}${CL}"
|
msg_ok "Web UI: ${BL}http://${ip}:${DEFAULT_PORT}${CL}"
|
||||||
msg_ok "Config: ${BL}${CONFIG_PATH}${CL}"
|
msg_ok "Config: ${BL}${CONFIG_PATH}${CL}"
|
||||||
echo ""
|
echo ""
|
||||||
msg_warn "Edit the config file to add your AdGuardHome instances!"
|
msg_warn "Edit the config file to add your AdGuardHome instances!"
|
||||||
@@ -290,8 +319,7 @@ fi
|
|||||||
|
|
||||||
header_info
|
header_info
|
||||||
|
|
||||||
get_lxc_ip
|
IP=$(get_ip)
|
||||||
IP="$LOCAL_IP"
|
|
||||||
|
|
||||||
# Check if already installed
|
# Check if already installed
|
||||||
if [[ -d "$INSTALL_PATH" && -f "$INSTALL_PATH/adguardhome-sync" ]]; then
|
if [[ -d "$INSTALL_PATH" && -f "$INSTALL_PATH/adguardhome-sync" ]]; then
|
||||||
|
|||||||
@@ -1,17 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 tteck
|
# Copyright (c) 2021-2026 tteck
|
||||||
# Author: tteck (tteckster)
|
# 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
|
||||||
APP="all-templates"
|
|
||||||
APP_TYPE="addon"
|
|
||||||
|
|
||||||
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/tools.func)
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/error_handler.func)
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
|
|
||||||
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "all-templates" "addon"
|
|
||||||
|
|
||||||
function header_info {
|
function header_info {
|
||||||
clear
|
clear
|
||||||
@@ -24,17 +15,37 @@ function header_info {
|
|||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
# Enable error handling; destroy any partially-created container before reporting the error
|
set -eEuo pipefail
|
||||||
set -Eeuo pipefail
|
shopt -s expand_aliases
|
||||||
function _cleanup_on_error() {
|
alias die='EXIT=$? LINE=$LINENO error_exit'
|
||||||
local ec=$? cmd="$BASH_COMMAND"
|
trap die ERR
|
||||||
[[ -n "${CTID:-}" ]] && cleanup_ctid
|
function error_exit() {
|
||||||
error_handler "$ec" "$cmd"
|
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"
|
||||||
}
|
}
|
||||||
trap '_cleanup_on_error' ERR
|
|
||||||
|
|
||||||
# Initialize all core functions (colors, formatting, icons, STD mode)
|
# Telemetry
|
||||||
load_functions
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
|
||||||
|
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "all-templates" "addon"
|
||||||
|
|
||||||
function validate_container_id() {
|
function validate_container_id() {
|
||||||
local ctid="$1"
|
local ctid="$1"
|
||||||
@@ -73,7 +84,7 @@ if systemctl is-active -q ping-instances.service; then
|
|||||||
systemctl stop ping-instances.service
|
systemctl stop ping-instances.service
|
||||||
fi
|
fi
|
||||||
header_info
|
header_info
|
||||||
msg_info "Loading"
|
echo "Loading..."
|
||||||
pveam update >/dev/null 2>&1
|
pveam update >/dev/null 2>&1
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "All Templates" --yesno "This will allow for the creation of one of the many Template LXC Containers. Proceed?" 10 68
|
whiptail --backtitle "Proxmox VE Helper Scripts" --title "All Templates" --yesno "This will allow for the creation of one of the many Template LXC Containers. Proceed?" 10 68
|
||||||
TEMPLATE_MENU=()
|
TEMPLATE_MENU=()
|
||||||
@@ -86,8 +97,8 @@ done < <(pveam available)
|
|||||||
TEMPLATE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "All Template LXCs" --radiolist "\nSelect a Template LXC to create:\n" 16 $((MSG_MAX_LENGTH + 58)) 10 "${TEMPLATE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"')
|
TEMPLATE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "All Template LXCs" --radiolist "\nSelect a Template LXC to create:\n" 16 $((MSG_MAX_LENGTH + 58)) 10 "${TEMPLATE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"')
|
||||||
[ -z "$TEMPLATE" ] && {
|
[ -z "$TEMPLATE" ] && {
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Template LXC Selected" --msgbox "It appears that no Template LXC container was selected" 10 68
|
whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Template LXC Selected" --msgbox "It appears that no Template LXC container was selected" 10 68
|
||||||
echo "Done"
|
msg "Done"
|
||||||
exit 0
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
# Setup script environment
|
# Setup script environment
|
||||||
@@ -97,9 +108,9 @@ PASS="$(openssl rand -base64 8)"
|
|||||||
# Get valid Container ID
|
# Get valid Container ID
|
||||||
CTID=$(pvesh get /cluster/nextid)
|
CTID=$(pvesh get /cluster/nextid)
|
||||||
if ! validate_container_id "$CTID"; then
|
if ! validate_container_id "$CTID"; then
|
||||||
msg_warn "Container ID $CTID is already in use."
|
warn "Container ID $CTID is already in use."
|
||||||
CTID=$(get_valid_container_id "$CTID")
|
CTID=$(get_valid_container_id "$CTID")
|
||||||
msg_info "Using next available ID: $CTID"
|
info "Using next available ID: $CTID"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PCT_OPTIONS="
|
PCT_OPTIONS="
|
||||||
@@ -131,10 +142,7 @@ function select_storage() {
|
|||||||
CONTENT='vztmpl'
|
CONTENT='vztmpl'
|
||||||
CONTENT_LABEL='Container template'
|
CONTENT_LABEL='Container template'
|
||||||
;;
|
;;
|
||||||
*)
|
*) false || die "Invalid storage class." ;;
|
||||||
msg_error "Invalid storage class."
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Query all storage locations
|
# Query all storage locations
|
||||||
@@ -153,9 +161,8 @@ function select_storage() {
|
|||||||
|
|
||||||
# Select storage location
|
# Select storage location
|
||||||
if [ $((${#MENU[@]} / 3)) -eq 0 ]; then
|
if [ $((${#MENU[@]} / 3)) -eq 0 ]; then
|
||||||
msg_warn "'$CONTENT_LABEL' needs to be selected for at least one storage location."
|
warn "'$CONTENT_LABEL' needs to be selected for at least one storage location."
|
||||||
msg_error "Unable to detect valid storage location."
|
die "Unable to detect valid storage location."
|
||||||
exit 1
|
|
||||||
elif [ $((${#MENU[@]} / 3)) -eq 1 ]; then
|
elif [ $((${#MENU[@]} / 3)) -eq 1 ]; then
|
||||||
printf ${MENU[0]}
|
printf ${MENU[0]}
|
||||||
else
|
else
|
||||||
@@ -164,10 +171,7 @@ function select_storage() {
|
|||||||
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
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" \
|
"Which storage pool would you like to use for the ${CONTENT_LABEL,,}?\n\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${MENU[@]}" 3>&1 1>&2 2>&3) || {
|
"${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted."
|
||||||
msg_error "Menu aborted."
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
done
|
done
|
||||||
printf $STORAGE
|
printf $STORAGE
|
||||||
fi
|
fi
|
||||||
@@ -175,43 +179,35 @@ function select_storage() {
|
|||||||
header_info
|
header_info
|
||||||
# Get template storage
|
# Get template storage
|
||||||
TEMPLATE_STORAGE=$(select_storage template)
|
TEMPLATE_STORAGE=$(select_storage template)
|
||||||
msg_info "Using '$TEMPLATE_STORAGE' for template storage."
|
info "Using '$TEMPLATE_STORAGE' for template storage."
|
||||||
|
|
||||||
# Get container storage
|
# Get container storage
|
||||||
CONTAINER_STORAGE=$(select_storage container)
|
CONTAINER_STORAGE=$(select_storage container)
|
||||||
msg_info "Using '$CONTAINER_STORAGE' for container storage."
|
info "Using '$CONTAINER_STORAGE' for container storage."
|
||||||
|
|
||||||
# Download template
|
# Download template
|
||||||
msg_info "Downloading LXC template (Patience)"
|
msg "Downloading LXC template (Patience)..."
|
||||||
pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || {
|
pveam download $TEMPLATE_STORAGE $TEMPLATE >/dev/null || die "A problem occured while downloading the LXC template."
|
||||||
msg_error "A problem occured while downloading the LXC template."
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
msg_ok "Downloaded LXC template"
|
|
||||||
|
|
||||||
# Create variable for 'pct' options
|
# Create variable for 'pct' options
|
||||||
PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}})
|
PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}})
|
||||||
[[ " ${PCT_OPTIONS[*]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8})
|
[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8})
|
||||||
|
|
||||||
# Create LXC
|
# Create LXC
|
||||||
msg_info "Creating LXC container"
|
msg "Creating LXC container..."
|
||||||
pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} "${PCT_OPTIONS[@]}" >/dev/null || {
|
pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null ||
|
||||||
msg_error "A problem occured while trying to create container."
|
die "A problem occured while trying to create container."
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
msg_ok "Created LXC container"
|
|
||||||
|
|
||||||
# Save password
|
# Save password
|
||||||
echo "$NAME password: ${PASS}" >>~/$NAME.creds # file is located in the Proxmox root directory
|
echo "$NAME password: ${PASS}" >>~/$NAME.creds # file is located in the Proxmox root directory
|
||||||
|
|
||||||
# Start container
|
# Start container
|
||||||
msg_info "Starting LXC Container"
|
msg "Starting LXC Container..."
|
||||||
pct start "$CTID"
|
pct start "$CTID"
|
||||||
sleep 5
|
sleep 5
|
||||||
msg_ok "Started LXC Container"
|
|
||||||
|
|
||||||
# Get container IP
|
# Get container IP
|
||||||
set +Eeuo pipefail
|
set +eEuo pipefail
|
||||||
max_attempts=5
|
max_attempts=5
|
||||||
attempt=1
|
attempt=1
|
||||||
IP=""
|
IP=""
|
||||||
@@ -220,18 +216,18 @@ while [[ $attempt -le $max_attempts ]]; do
|
|||||||
if [[ -n $IP ]]; then
|
if [[ -n $IP ]]; then
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
msg_warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..."
|
warn "Attempt $attempt: IP address not found. Pausing for 5 seconds..."
|
||||||
sleep 5
|
sleep 5
|
||||||
((attempt++))
|
((attempt++))
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ -z $IP ]]; then
|
if [[ -z $IP ]]; then
|
||||||
msg_warn "Maximum number of attempts reached. IP address not found."
|
warn "Maximum number of attempts reached. IP address not found."
|
||||||
IP="NOT FOUND"
|
IP="NOT FOUND"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set -Eeuo pipefail
|
set -eEuo pipefail
|
||||||
# Start Proxmox VE Monitor-All if available
|
# Start Proxmox VE Monitor-All if available
|
||||||
if [[ -f /etc/systemd/system/ping-instances.service ]]; then
|
if [[ -f /etc/systemd/system/ping-instances.service ]]; then
|
||||||
systemctl start ping-instances.service
|
systemctl start ping-instances.service
|
||||||
@@ -240,10 +236,10 @@ fi
|
|||||||
# Success message
|
# Success message
|
||||||
header_info
|
header_info
|
||||||
echo
|
echo
|
||||||
msg_ok "LXC container '$CTID' was successfully created, and its IP address is ${IP}."
|
info "LXC container '$CTID' was successfully created, and its IP address is ${IP}."
|
||||||
echo
|
echo
|
||||||
echo -e "${YW}Proceed to the LXC console to complete the setup.${CL}"
|
info "Proceed to the LXC console to complete the setup."
|
||||||
echo
|
echo
|
||||||
echo -e "${YW}login: root${CL}"
|
info "login: root"
|
||||||
echo -e "${YW}password: $PASS${CL}"
|
info "password: $PASS"
|
||||||
echo
|
echo
|
||||||
|
|||||||
+17
-2
@@ -6,8 +6,8 @@
|
|||||||
# Source: https://github.com/getarcaneapp/arcane
|
# Source: https://github.com/getarcaneapp/arcane
|
||||||
if ! command -v curl &>/dev/null; then
|
if ! command -v curl &>/dev/null; then
|
||||||
printf "\r\e[2K%b" '\033[93m Setup Source \033[m' >&2
|
printf "\r\e[2K%b" '\033[93m Setup Source \033[m' >&2
|
||||||
apt update >/dev/null 2>&1
|
apt-get update >/dev/null 2>&1
|
||||||
apt install -y curl >/dev/null 2>&1
|
apt-get install -y curl >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
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/core.func)
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
|
||||||
@@ -32,6 +32,21 @@ DEFAULT_PORT=3552
|
|||||||
# Initialize all core functions (colors, formatting, icons, STD mode)
|
# Initialize all core functions (colors, formatting, icons, STD mode)
|
||||||
load_functions
|
load_functions
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# HEADER
|
||||||
|
# ==============================================================================
|
||||||
|
function header_info {
|
||||||
|
clear
|
||||||
|
cat <<"EOF"
|
||||||
|
___ ____ _________ _ ________
|
||||||
|
/ | / __ \/ ____/ | / | / / ____/
|
||||||
|
/ /| | / /_/ / / / /| | / |/ / __/
|
||||||
|
/ ___ |/ _, _/ /___/ ___ |/ /| / /___
|
||||||
|
/_/ |_/_/ |_|\____/_/ |_/_/ |_/_____/
|
||||||
|
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# UNINSTALL
|
# UNINSTALL
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
|
|||||||
@@ -5,149 +5,62 @@
|
|||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Source: https://coder.com/ | Github: https://github.com/coder/code-server
|
# Source: https://coder.com/ | Github: https://github.com/coder/code-server
|
||||||
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/core.func)
|
function header_info {
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
|
cat <<"EOF"
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/error_handler.func)
|
______ __ _____
|
||||||
|
/ ____/___ ____/ /__ / ___/___ ______ _____ _____
|
||||||
|
/ / / __ \/ __ / _ \ \__ \/ _ \/ ___/ | / / _ \/ ___/
|
||||||
|
/ /___/ /_/ / /_/ / __/ ___/ / __/ / | |/ / __/ /
|
||||||
|
\____/\____/\__,_/\___/ /____/\___/_/ |___/\___/_/
|
||||||
|
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
IP=$(hostname -I | awk '{print $1}')
|
||||||
|
YW=$(echo "\033[33m")
|
||||||
|
BL=$(echo "\033[36m")
|
||||||
|
RD=$(echo "\033[01;31m")
|
||||||
|
BGN=$(echo "\033[4;92m")
|
||||||
|
GN=$(echo "\033[1;92m")
|
||||||
|
DGN=$(echo "\033[32m")
|
||||||
|
CL=$(echo "\033[m")
|
||||||
|
BFR="\\r\\033[K"
|
||||||
|
HOLD="-"
|
||||||
|
CM="${GN}✓${CL}"
|
||||||
|
APP="Coder Code Server"
|
||||||
|
hostname="$(hostname)"
|
||||||
|
|
||||||
|
# Telemetry
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
|
||||||
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "coder-code-server" "addon"
|
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "coder-code-server" "addon"
|
||||||
|
|
||||||
# Enable error handling
|
set -o errexit
|
||||||
set -Eeuo pipefail
|
set -o errtrace
|
||||||
trap 'error_handler' ERR
|
set -o nounset
|
||||||
|
set -o pipefail
|
||||||
APP="Coder Code Server"
|
shopt -s expand_aliases
|
||||||
APP_TYPE="addon"
|
alias die='EXIT=$? LINE=$LINENO error_exit'
|
||||||
|
trap die ERR
|
||||||
# Initialize all core functions (colors, formatting, icons, STD mode)
|
|
||||||
load_functions
|
|
||||||
|
|
||||||
|
function error_exit() {
|
||||||
|
trap - ERR
|
||||||
|
local reason="Unknown failure occured."
|
||||||
|
local msg="${1:-$reason}"
|
||||||
|
local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE"
|
||||||
|
echo -e "$flag $msg" 1>&2
|
||||||
|
exit "$EXIT"
|
||||||
|
}
|
||||||
|
clear
|
||||||
header_info
|
header_info
|
||||||
ensure_usr_local_bin_persist
|
|
||||||
get_lxc_ip
|
|
||||||
IP="$LOCAL_IP"
|
|
||||||
|
|
||||||
if command -v pveversion >/dev/null 2>&1; then
|
if command -v pveversion >/dev/null 2>&1; then
|
||||||
msg_error "Can't Install on Proxmox"
|
echo -e "⚠️ Can't Install on Proxmox "
|
||||||
exit 1
|
exit
|
||||||
fi
|
fi
|
||||||
if [ -e /etc/alpine-release ]; then
|
if [ -e /etc/alpine-release ]; then
|
||||||
msg_error "Can't Install on Alpine"
|
echo -e "⚠️ Can't Install on Alpine"
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# ==============================================================================
|
|
||||||
# UNINSTALL
|
|
||||||
# ==============================================================================
|
|
||||||
function uninstall() {
|
|
||||||
msg_info "Uninstalling ${APP}"
|
|
||||||
systemctl disable --now code-server@"$USER" &>/dev/null || true
|
|
||||||
$STD apt remove -y code-server
|
|
||||||
rm -f "$HOME/.coder-code-server"
|
|
||||||
msg_ok "${APP} has been uninstalled"
|
|
||||||
}
|
|
||||||
|
|
||||||
# ==============================================================================
|
|
||||||
# UPDATE
|
|
||||||
# ==============================================================================
|
|
||||||
function update() {
|
|
||||||
if check_for_gh_release "coder-code-server" "coder/code-server"; then
|
|
||||||
msg_info "Updating ${APP}"
|
|
||||||
fetch_and_deploy_gh_release "coder-code-server" "coder/code-server" "binary" "latest" "/opt/coder-code-server" "code-server_*_$(arch_resolve).deb"
|
|
||||||
systemctl restart code-server@"$USER"
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
exit
|
exit
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# ==============================================================================
|
|
||||||
# INSTALL
|
|
||||||
# ==============================================================================
|
|
||||||
function install() {
|
|
||||||
msg_info "Installing Dependencies"
|
|
||||||
$STD apt update
|
|
||||||
$STD apt install -y \
|
|
||||||
curl \
|
|
||||||
git
|
|
||||||
msg_ok "Installed Dependencies"
|
|
||||||
|
|
||||||
msg_info "Installing ${APP}"
|
|
||||||
config_path="${HOME}/.config/code-server/config.yaml"
|
|
||||||
preexisting_config=false
|
|
||||||
if [ -f "$config_path" ]; then
|
|
||||||
preexisting_config=true
|
|
||||||
fi
|
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "coder-code-server" "coder/code-server" "binary" "latest" "/opt/coder-code-server" "code-server_*_$(arch_resolve).deb"
|
|
||||||
mkdir -p "${HOME}/.config/code-server/"
|
|
||||||
|
|
||||||
if [ "$preexisting_config" = false ]; then
|
|
||||||
cat <<EOF >"$config_path"
|
|
||||||
bind-addr: 0.0.0.0:8680
|
|
||||||
auth: none
|
|
||||||
password:
|
|
||||||
cert: false
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
systemctl enable -q --now code-server@"$USER"
|
|
||||||
systemctl restart code-server@"$USER"
|
|
||||||
if ! systemctl is-active --quiet code-server@"$USER"; then
|
|
||||||
msg_error "code-server service failed to start."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
msg_ok "Installed ${APP}"
|
|
||||||
|
|
||||||
msg_info "Creating update script"
|
|
||||||
ensure_usr_local_bin_persist
|
|
||||||
cat <<'EOF' >/usr/local/bin/update_coder-code-server
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
# Coder Code Server Update Script
|
|
||||||
type=update bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/addon/coder-code-server.sh)"
|
|
||||||
EOF
|
|
||||||
chmod +x /usr/local/bin/update_coder-code-server
|
|
||||||
msg_ok "Created update script (/usr/local/bin/update_coder-code-server)"
|
|
||||||
|
|
||||||
echo -e "${APP} should be reachable by going to the following URL.
|
|
||||||
${BL}http://${IP}:8680${CL} \n"
|
|
||||||
}
|
|
||||||
|
|
||||||
# ==============================================================================
|
|
||||||
# MAIN
|
|
||||||
# ==============================================================================
|
|
||||||
|
|
||||||
# Handle type=update (called from update script)
|
|
||||||
if [[ "${type:-}" == "update" ]]; then
|
|
||||||
if command -v code-server &>/dev/null; then
|
|
||||||
update
|
|
||||||
else
|
|
||||||
msg_error "${APP} is not installed. Nothing to update."
|
|
||||||
exit 233
|
|
||||||
fi
|
|
||||||
exit 0
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -d "$HOME" && -f "$HOME/.coder-code-server" ]] || command -v code-server &>/dev/null; then
|
|
||||||
msg_warn "${APP} is already installed."
|
|
||||||
echo -n "${TAB}Uninstall ${APP}? (y/N): "
|
|
||||||
read -r uninstall_prompt
|
|
||||||
if [[ "${uninstall_prompt,,}" =~ ^(y|yes)$ ]]; then
|
|
||||||
uninstall
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo -n "${TAB}Update ${APP}? (y/N): "
|
|
||||||
read -r update_prompt
|
|
||||||
if [[ "${update_prompt,,}" =~ ^(y|yes)$ ]]; then
|
|
||||||
update
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
msg_warn "No action selected. Exiting."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
echo -n "${TAB}This will Install ${APP}. Proceed (y/n)? "
|
read -p "This will Install ${APP} on $hostname. Proceed(y/n)?" yn
|
||||||
read -r yn
|
|
||||||
case $yn in
|
case $yn in
|
||||||
[Yy]*) break ;;
|
[Yy]*) break ;;
|
||||||
[Nn]*) exit ;;
|
[Nn]*) exit ;;
|
||||||
@@ -155,4 +68,53 @@ while true; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
install
|
function msg_info() {
|
||||||
|
local msg="$1"
|
||||||
|
echo -ne " ${HOLD} ${YW}${msg}..."
|
||||||
|
}
|
||||||
|
|
||||||
|
function msg_ok() {
|
||||||
|
local msg="$1"
|
||||||
|
echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
|
||||||
|
}
|
||||||
|
|
||||||
|
msg_info "Installing Dependencies"
|
||||||
|
apt-get update &>/dev/null
|
||||||
|
apt-get install -y curl &>/dev/null
|
||||||
|
apt-get install -y git &>/dev/null
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
VERSION=$(curl -fsSL https://api.github.com/repos/coder/code-server/releases/latest |
|
||||||
|
grep "tag_name" |
|
||||||
|
awk '{print substr($2, 3, length($2)-4) }')
|
||||||
|
|
||||||
|
msg_info "Installing Code-Server v${VERSION}"
|
||||||
|
config_path="${HOME}/.config/code-server/config.yaml"
|
||||||
|
preexisting_config=false
|
||||||
|
|
||||||
|
if [ -f "$config_path" ]; then
|
||||||
|
preexisting_config=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
curl -fOL https://github.com/coder/code-server/releases/download/v"$VERSION"/code-server_"${VERSION}"_amd64.deb &>/dev/null
|
||||||
|
dpkg -i code-server_"${VERSION}"_amd64.deb &>/dev/null
|
||||||
|
rm -rf code-server_"${VERSION}"_amd64.deb
|
||||||
|
mkdir -p "${HOME}/.config/code-server/"
|
||||||
|
|
||||||
|
if [ "$preexisting_config" = false ]; then
|
||||||
|
cat <<EOF >"$config_path"
|
||||||
|
bind-addr: 0.0.0.0:8680
|
||||||
|
auth: none
|
||||||
|
password:
|
||||||
|
cert: false
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
systemctl enable -q --now code-server@"$USER"
|
||||||
|
systemctl restart code-server@"$USER"
|
||||||
|
if ! systemctl is-active --quiet code-server@"$USER"; then
|
||||||
|
error_exit "code-server service failed to start."
|
||||||
|
fi
|
||||||
|
msg_ok "Installed Code-Server v${VERSION} on $hostname"
|
||||||
|
|
||||||
|
echo -e "${APP} should be reachable by going to the following URL.
|
||||||
|
${BL}http://$IP:8680${CL} \n"
|
||||||
|
|||||||
+20
-13
@@ -7,8 +7,8 @@
|
|||||||
|
|
||||||
if ! command -v curl &>/dev/null; then
|
if ! command -v curl &>/dev/null; then
|
||||||
printf "\r\e[2K%b" '\033[93m Setup Source \033[m' >&2
|
printf "\r\e[2K%b" '\033[93m Setup Source \033[m' >&2
|
||||||
apt update >/dev/null 2>&1
|
apt-get update >/dev/null 2>&1
|
||||||
apt install -y curl >/dev/null 2>&1
|
apt-get install -y curl >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
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/core.func)
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
|
||||||
@@ -45,13 +45,28 @@ if [[ -f "/etc/alpine-release" ]]; then
|
|||||||
SERVICE_PATH="/etc/init.d/copyparty"
|
SERVICE_PATH="/etc/init.d/copyparty"
|
||||||
elif grep -qE 'ID=debian|ID=ubuntu' /etc/os-release; then
|
elif grep -qE 'ID=debian|ID=ubuntu' /etc/os-release; then
|
||||||
OS="Debian"
|
OS="Debian"
|
||||||
PKG_MANAGER="apt install -y"
|
PKG_MANAGER="apt-get install -y"
|
||||||
SERVICE_PATH="/etc/systemd/system/copyparty.service"
|
SERVICE_PATH="/etc/systemd/system/copyparty.service"
|
||||||
else
|
else
|
||||||
msg_error "Unsupported OS detected. Exiting."
|
msg_error "Unsupported OS detected. Exiting."
|
||||||
exit 238
|
exit 238
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# HEADER
|
||||||
|
# ==============================================================================
|
||||||
|
function header_info() {
|
||||||
|
clear
|
||||||
|
cat <<"EOF"
|
||||||
|
______ ____ __
|
||||||
|
/ ____/___ ____ __ __/ __ \____ ______/ /___ __
|
||||||
|
/ / / __ \/ __ \/ / / / /_/ / __ `/ ___/ __/ / / /
|
||||||
|
/ /___/ /_/ / /_/ / /_/ / ____/ /_/ / / / /_/ /_/ /
|
||||||
|
\____/\____/ .___/\__, /_/ \__,_/_/ \__/\__, /
|
||||||
|
/_/ /____/ /____/
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# HELPER FUNCTIONS
|
# HELPER FUNCTIONS
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
@@ -158,17 +173,9 @@ function install() {
|
|||||||
|
|
||||||
msg_info "Installing dependencies"
|
msg_info "Installing dependencies"
|
||||||
if [[ "$OS" == "Debian" ]]; then
|
if [[ "$OS" == "Debian" ]]; then
|
||||||
$STD $PKG_MANAGER \
|
$STD $PKG_MANAGER python3 python3-pil ffmpeg curl
|
||||||
python3 \
|
|
||||||
python3-pil \
|
|
||||||
ffmpeg \
|
|
||||||
curl
|
|
||||||
else
|
else
|
||||||
$STD $PKG_MANAGER \
|
$STD $PKG_MANAGER python3 py3-pillow ffmpeg curl
|
||||||
python3 \
|
|
||||||
py3-pillow \
|
|
||||||
ffmpeg \
|
|
||||||
curl
|
|
||||||
fi
|
fi
|
||||||
msg_ok "Dependencies installed (with thumbnail support)"
|
msg_ok "Dependencies installed (with thumbnail support)"
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
|
|
||||||
if ! command -v curl &>/dev/null; then
|
if ! command -v curl &>/dev/null; then
|
||||||
printf "\r\e[2K%b" '\033[93m Setup Source \033[m' >&2
|
printf "\r\e[2K%b" '\033[93m Setup Source \033[m' >&2
|
||||||
apt update >/dev/null 2>&1
|
apt-get update >/dev/null 2>&1
|
||||||
apt install -y curl >/dev/null 2>&1
|
apt-get install -y curl >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
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/core.func)
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
|
||||||
@@ -31,6 +31,21 @@ CONFIG_PATH="/opt/cronmaster/.env"
|
|||||||
SERVICE_PATH="/etc/systemd/system/cronmaster.service"
|
SERVICE_PATH="/etc/systemd/system/cronmaster.service"
|
||||||
DEFAULT_PORT=3000
|
DEFAULT_PORT=3000
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# HEADER
|
||||||
|
# ==============================================================================
|
||||||
|
function header_info {
|
||||||
|
clear
|
||||||
|
cat <<"EOF"
|
||||||
|
______ __ ___ __
|
||||||
|
/ ____/________ ____ / |/ /___ ______/ /____ _____
|
||||||
|
/ / / ___/ __ \/ __ \/ /|_/ / __ `/ ___/ __/ _ \/ ___/
|
||||||
|
/ /___/ / / /_/ / / / / / / / /_/ (__ ) /_/ __/ /
|
||||||
|
\____/_/ \____/_/ /_/_/ /_/\__,_/____/\__/\___/_/
|
||||||
|
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# OS DETECTION
|
# OS DETECTION
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
@@ -62,12 +77,16 @@ function update() {
|
|||||||
systemctl stop cronmaster.service &>/dev/null || true
|
systemctl stop cronmaster.service &>/dev/null || true
|
||||||
msg_ok "Stopped service"
|
msg_ok "Stopped service"
|
||||||
|
|
||||||
BACKUP_DIR="/opt/cronmaster_backup"
|
msg_info "Backing up configuration"
|
||||||
create_backup "$CONFIG_PATH"
|
cp "$CONFIG_PATH" /tmp/cronmaster.env.bak 2>/dev/null || true
|
||||||
|
msg_ok "Backed up configuration"
|
||||||
|
|
||||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "cronmaster" "fccview/cronmaster" "prebuild" "latest" "$INSTALL_PATH" "cronmaster_*_prebuild.tar.gz"
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "cronmaster" "fccview/cronmaster" "prebuild" "latest" "$INSTALL_PATH" "cronmaster_*_prebuild.tar.gz"
|
||||||
|
|
||||||
restore_backup
|
msg_info "Restoring configuration"
|
||||||
|
cp /tmp/cronmaster.env.bak "$CONFIG_PATH" 2>/dev/null || true
|
||||||
|
rm -f /tmp/cronmaster.env.bak
|
||||||
|
msg_ok "Restored configuration"
|
||||||
|
|
||||||
msg_info "Starting service"
|
msg_info "Starting service"
|
||||||
systemctl start cronmaster
|
systemctl start cronmaster
|
||||||
|
|||||||
+61
-26
@@ -5,54 +5,89 @@
|
|||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Source: https://www.crowdsec.net/ | Github: https://github.com/crowdsecurity/crowdsec
|
# Source: https://www.crowdsec.net/ | Github: https://github.com/crowdsecurity/crowdsec
|
||||||
|
|
||||||
|
YW=$(echo "\033[33m")
|
||||||
|
BL=$(echo "\033[36m")
|
||||||
|
RD=$(echo "\033[01;31m")
|
||||||
|
BGN=$(echo "\033[4;92m")
|
||||||
|
GN=$(echo "\033[1;92m")
|
||||||
|
DGN=$(echo "\033[32m")
|
||||||
|
CL=$(echo "\033[m")
|
||||||
|
BFR="\\r\\033[K"
|
||||||
|
HOLD="-"
|
||||||
|
CM="${GN}✓${CL}"
|
||||||
APP="CrowdSec"
|
APP="CrowdSec"
|
||||||
APP_TYPE="addon"
|
hostname="$(hostname)"
|
||||||
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/core.func)
|
# Telemetry
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/error_handler.func)
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
|
||||||
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "crowdsec" "addon"
|
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "crowdsec" "addon"
|
||||||
|
|
||||||
# Enable error handling
|
set -o errexit
|
||||||
set -Eeuo pipefail
|
set -o errtrace
|
||||||
trap 'error_handler' ERR
|
set -o nounset
|
||||||
|
set -o pipefail
|
||||||
# Initialize all core functions (colors, formatting, icons, STD mode)
|
shopt -s expand_aliases
|
||||||
load_functions
|
alias die='EXIT=$? LINE=$LINENO error_exit'
|
||||||
|
trap die ERR
|
||||||
header_info
|
|
||||||
|
|
||||||
|
function error_exit() {
|
||||||
|
trap - ERR
|
||||||
|
local reason="Unknown failure occured."
|
||||||
|
local msg="${1:-$reason}"
|
||||||
|
local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE"
|
||||||
|
echo -e "$flag $msg" 1>&2
|
||||||
|
exit "$EXIT"
|
||||||
|
}
|
||||||
if command -v pveversion >/dev/null 2>&1; then
|
if command -v pveversion >/dev/null 2>&1; then
|
||||||
msg_error "Can't Install on Proxmox"
|
echo -e "⚠️ Can't Install on Proxmox "
|
||||||
exit 1
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
echo -n "${TAB}This will Install ${APP}. Proceed (y/n)? "
|
read -p "This will Install ${APP} on $hostname. Proceed(y/n)?" yn
|
||||||
read -r yn
|
|
||||||
case $yn in
|
case $yn in
|
||||||
[Yy]*) break ;;
|
[Yy]*) break ;;
|
||||||
[Nn]*) exit ;;
|
[Nn]*) exit ;;
|
||||||
*) echo "Please answer yes or no." ;;
|
*) echo "Please answer yes or no." ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
clear
|
||||||
|
function header_info() {
|
||||||
|
echo -e "${BL}
|
||||||
|
_____ _ _____
|
||||||
|
/ ____| | |/ ____|
|
||||||
|
| | _ __ _____ ____| | (___ ___ ___
|
||||||
|
| | | __/ _ \ \ /\ / / _ |\___ \ / _ \/ __|
|
||||||
|
| |____| | | (_) \ V V / (_| |____) | __/ (__
|
||||||
|
\_____|_| \___/ \_/\_/ \__ _|_____/ \___|\___|
|
||||||
|
${CL}"
|
||||||
|
}
|
||||||
|
|
||||||
|
header_info
|
||||||
|
|
||||||
|
function msg_info() {
|
||||||
|
local msg="$1"
|
||||||
|
echo -ne " ${HOLD} ${YW}${msg}..."
|
||||||
|
}
|
||||||
|
|
||||||
|
function msg_ok() {
|
||||||
|
local msg="$1"
|
||||||
|
echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
|
||||||
|
}
|
||||||
|
|
||||||
msg_info "Setting up ${APP} Repository"
|
msg_info "Setting up ${APP} Repository"
|
||||||
$STD apt update
|
apt-get update &>/dev/null
|
||||||
$STD apt install -y \
|
apt-get install -y curl &>/dev/null
|
||||||
curl \
|
apt-get install -y gnupg &>/dev/null
|
||||||
gnupg
|
curl -fsSL "https://install.crowdsec.net" | bash &>/dev/null
|
||||||
$STD bash -c "curl -fsSL https://install.crowdsec.net | bash"
|
|
||||||
msg_ok "Setup ${APP} Repository"
|
msg_ok "Setup ${APP} Repository"
|
||||||
|
|
||||||
msg_info "Installing ${APP}"
|
msg_info "Installing ${APP}"
|
||||||
$STD apt update
|
apt-get update &>/dev/null
|
||||||
$STD apt install -y crowdsec
|
apt-get install -y crowdsec &>/dev/null
|
||||||
msg_ok "Installed ${APP}"
|
msg_ok "Installed ${APP} on $hostname"
|
||||||
|
|
||||||
msg_info "Installing ${APP} Common Bouncer"
|
msg_info "Installing ${APP} Common Bouncer"
|
||||||
$STD apt install -y crowdsec-firewall-bouncer-iptables
|
apt-get install -y crowdsec-firewall-bouncer-iptables &>/dev/null
|
||||||
msg_ok "Installed ${APP} Common Bouncer"
|
msg_ok "Installed ${APP} Common Bouncer"
|
||||||
|
|
||||||
msg_ok "Completed successfully!\n"
|
msg_ok "Completed successfully!\n"
|
||||||
|
|||||||
@@ -5,41 +5,55 @@
|
|||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Source: https://github.com/filebrowserspace/quantum
|
# Source: https://github.com/filebrowserspace/quantum
|
||||||
|
|
||||||
|
function header_info() {
|
||||||
|
clear
|
||||||
|
cat <<"EOF"
|
||||||
|
_______ __ ____ ____ __
|
||||||
|
/ ____(_) /__ / __ )_________ _ __________ _____ / __ \__ ______ _____ / /___ ______ ___
|
||||||
|
/ /_ / / / _ \/ __ / ___/ __ \ | /| / / ___/ _ \/ ___/ / / / / / / / __ `/ __ \/ __/ / / / __ `__ \
|
||||||
|
/ __/ / / / __/ /_/ / / / /_/ / |/ |/ (__ ) __/ / / /_/ / /_/ / /_/ / / / / /_/ /_/ / / / / / /
|
||||||
|
/_/ /_/_/\___/_____/_/ \____/|__/|__/____/\___/_/ \___\_\__,_/\__,_/_/ /_/\__/\__,_/_/ /_/ /_/
|
||||||
|
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
YW=$(echo "\033[33m")
|
||||||
|
GN=$(echo "\033[1;92m")
|
||||||
|
RD=$(echo "\033[01;31m")
|
||||||
|
BL=$(echo "\033[36m")
|
||||||
|
CL=$(echo "\033[m")
|
||||||
|
CM="${GN}✔️${CL}"
|
||||||
|
CROSS="${RD}✖️${CL}"
|
||||||
|
INFO="${BL}ℹ️${CL}"
|
||||||
|
|
||||||
APP="FileBrowser Quantum"
|
APP="FileBrowser Quantum"
|
||||||
APP_TYPE="addon"
|
|
||||||
INSTALL_PATH="/usr/local/bin/filebrowser"
|
INSTALL_PATH="/usr/local/bin/filebrowser"
|
||||||
CONFIG_PATH="/usr/local/community-scripts/fq-config.yaml"
|
CONFIG_PATH="/usr/local/community-scripts/fq-config.yaml"
|
||||||
DEFAULT_PORT=8080
|
DEFAULT_PORT=8080
|
||||||
SRC_DIR="/"
|
SRC_DIR="/"
|
||||||
|
TMP_BIN="/tmp/filebrowser.$$"
|
||||||
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/core.func)
|
# Telemetry
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/error_handler.func)
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
|
||||||
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "filebrowser-quantum" "addon"
|
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "filebrowser-quantum" "addon"
|
||||||
|
|
||||||
# Enable error handling
|
# Get primary IP
|
||||||
set -Eeuo pipefail
|
IFACE=$(ip -4 route | awk '/default/ {print $5; exit}')
|
||||||
trap 'error_handler' ERR
|
IP=$(ip -4 addr show "$IFACE" | awk '/inet / {print $2}' | cut -d/ -f1 | head -n 1)
|
||||||
|
[[ -z "$IP" ]] && IP=$(hostname -I | awk '{print $1}')
|
||||||
# Initialize all core functions (colors, formatting, icons, STD mode)
|
[[ -z "$IP" ]] && IP="127.0.0.1"
|
||||||
load_functions
|
|
||||||
|
|
||||||
header_info
|
|
||||||
get_lxc_ip
|
|
||||||
IP="$LOCAL_IP"
|
|
||||||
|
|
||||||
# Proxmox Host Warning
|
# Proxmox Host Warning
|
||||||
if [[ -d "/etc/pve" ]]; then
|
if [[ -d "/etc/pve" ]]; then
|
||||||
msg_warn "Running this addon directly on the Proxmox host is not recommended!"
|
echo -e "${RD}⚠️ Warning: Running this addon directly on the Proxmox host is not recommended!${CL}"
|
||||||
msg_warn "Only the boot disk will be visible — passthrough drives will not be indexed."
|
echo -e "${YW} Only the boot disk will be visible — passthrough drives will not be indexed.${CL}"
|
||||||
msg_warn "This causes incorrect disk usage stats and incomplete file browsing."
|
echo -e "${YW} This causes incorrect disk usage stats and incomplete file browsing.${CL}"
|
||||||
msg_warn "Run this addon inside an LXC or VM instead and mount your drives there."
|
echo -e "${YW} Run this addon inside an LXC or VM instead and mount your drives there.${CL}"
|
||||||
echo ""
|
echo ""
|
||||||
echo -n "${TAB}Continue anyway on the Proxmox host? (y/N): "
|
echo -n "Continue anyway on the Proxmox host? (y/N): "
|
||||||
read -r host_confirm
|
read -r host_confirm
|
||||||
if [[ ! "${host_confirm,,}" =~ ^(y|yes)$ ]]; then
|
if [[ ! "${host_confirm,,}" =~ ^(y|yes)$ ]]; then
|
||||||
msg_error "Aborted."
|
echo -e "${YW}Aborted.${CL}"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -52,12 +66,18 @@ if [[ -f "/etc/alpine-release" ]]; then
|
|||||||
elif [[ -f "/etc/debian_version" ]]; then
|
elif [[ -f "/etc/debian_version" ]]; then
|
||||||
OS="Debian"
|
OS="Debian"
|
||||||
SERVICE_PATH="/etc/systemd/system/filebrowser.service"
|
SERVICE_PATH="/etc/systemd/system/filebrowser.service"
|
||||||
PKG_MANAGER="apt install -y"
|
PKG_MANAGER="apt-get install -y"
|
||||||
else
|
else
|
||||||
msg_error "Unsupported OS detected. Exiting."
|
echo -e "${CROSS} Unsupported OS detected. Exiting."
|
||||||
exit 238
|
exit 238
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
header_info
|
||||||
|
|
||||||
|
function msg_info() { echo -e "${INFO} ${YW}$1...${CL}"; }
|
||||||
|
function msg_ok() { echo -e "${CM} ${GN}$1${CL}"; }
|
||||||
|
function msg_error() { echo -e "${CROSS} ${RD}$1${CL}"; }
|
||||||
|
|
||||||
# Detect legacy FileBrowser installation
|
# Detect legacy FileBrowser installation
|
||||||
LEGACY_DB="/usr/local/community-scripts/filebrowser.db"
|
LEGACY_DB="/usr/local/community-scripts/filebrowser.db"
|
||||||
LEGACY_BIN="/usr/local/bin/filebrowser"
|
LEGACY_BIN="/usr/local/bin/filebrowser"
|
||||||
@@ -65,82 +85,80 @@ LEGACY_SERVICE_DEB="/etc/systemd/system/filebrowser.service"
|
|||||||
LEGACY_SERVICE_ALP="/etc/init.d/filebrowser"
|
LEGACY_SERVICE_ALP="/etc/init.d/filebrowser"
|
||||||
|
|
||||||
if [[ -f "$LEGACY_DB" || -f "$LEGACY_BIN" && ! -f "$CONFIG_PATH" ]]; then
|
if [[ -f "$LEGACY_DB" || -f "$LEGACY_BIN" && ! -f "$CONFIG_PATH" ]]; then
|
||||||
msg_warn "Detected legacy FileBrowser installation."
|
echo -e "${YW}⚠️ Detected legacy FileBrowser installation.${CL}"
|
||||||
echo -n "${TAB}Uninstall legacy FileBrowser and continue with Quantum install? (y/n): "
|
echo -n "Uninstall legacy FileBrowser and continue with Quantum install? (y/n): "
|
||||||
read -r remove_legacy
|
read -r remove_legacy
|
||||||
if [[ "${remove_legacy,,}" =~ ^(y|yes)$ ]]; then
|
if [[ "${remove_legacy,,}" =~ ^(y|yes)$ ]]; then
|
||||||
msg_info "Uninstalling legacy FileBrowser"
|
msg_info "Uninstalling legacy FileBrowser"
|
||||||
if [[ -f "$LEGACY_SERVICE_DEB" ]]; then
|
if [[ -f "$LEGACY_SERVICE_DEB" ]]; then
|
||||||
systemctl disable --now filebrowser.service &>/dev/null || true
|
systemctl disable --now filebrowser.service &>/dev/null
|
||||||
rm -f "$LEGACY_SERVICE_DEB"
|
rm -f "$LEGACY_SERVICE_DEB"
|
||||||
elif [[ -f "$LEGACY_SERVICE_ALP" ]]; then
|
elif [[ -f "$LEGACY_SERVICE_ALP" ]]; then
|
||||||
rc-service filebrowser stop &>/dev/null || true
|
rc-service filebrowser stop &>/dev/null
|
||||||
rc-update del filebrowser &>/dev/null || true
|
rc-update del filebrowser &>/dev/null
|
||||||
rm -f "$LEGACY_SERVICE_ALP"
|
rm -f "$LEGACY_SERVICE_ALP"
|
||||||
fi
|
fi
|
||||||
rm -f "$LEGACY_BIN" "$LEGACY_DB"
|
rm -f "$LEGACY_BIN" "$LEGACY_DB"
|
||||||
msg_ok "Legacy FileBrowser removed"
|
msg_ok "Legacy FileBrowser removed"
|
||||||
else
|
else
|
||||||
msg_error "Installation aborted by user."
|
echo -e "${YW}❌ Installation aborted by user.${CL}"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Existing installation
|
# Existing installation
|
||||||
if [[ -f "$INSTALL_PATH" ]]; then
|
if [[ -f "$INSTALL_PATH" ]]; then
|
||||||
msg_warn "${APP} is already installed."
|
echo -e "${YW}⚠️ ${APP} is already installed.${CL}"
|
||||||
echo -n "${TAB}Uninstall ${APP}? (y/N): "
|
echo -n "Uninstall ${APP}? (y/N): "
|
||||||
read -r uninstall_prompt
|
read -r uninstall_prompt
|
||||||
if [[ "${uninstall_prompt,,}" =~ ^(y|yes)$ ]]; then
|
if [[ "${uninstall_prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||||
msg_info "Uninstalling ${APP}"
|
msg_info "Uninstalling ${APP}"
|
||||||
if [[ "$OS" == "Debian" ]]; then
|
if [[ "$OS" == "Debian" ]]; then
|
||||||
systemctl disable --now filebrowser.service &>/dev/null || true
|
systemctl disable --now filebrowser.service &>/dev/null
|
||||||
rm -f "$SERVICE_PATH"
|
rm -f "$SERVICE_PATH"
|
||||||
else
|
else
|
||||||
rc-service filebrowser stop &>/dev/null || true
|
rc-service filebrowser stop &>/dev/null
|
||||||
rc-update del filebrowser &>/dev/null || true
|
rc-update del filebrowser &>/dev/null
|
||||||
rm -f "$SERVICE_PATH"
|
rm -f "$SERVICE_PATH"
|
||||||
fi
|
fi
|
||||||
rm -f "$INSTALL_PATH" "$CONFIG_PATH" "$HOME/.filebrowser-quantum"
|
rm -f "$INSTALL_PATH" "$CONFIG_PATH"
|
||||||
msg_ok "${APP} has been uninstalled."
|
msg_ok "${APP} has been uninstalled."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n "${TAB}Update ${APP}? (y/N): "
|
echo -n "Update ${APP}? (y/N): "
|
||||||
read -r update_prompt
|
read -r update_prompt
|
||||||
if [[ "${update_prompt,,}" =~ ^(y|yes)$ ]]; then
|
if [[ "${update_prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||||
if check_for_gh_release "filebrowser-quantum" "gtsteffaniak/filebrowser"; then
|
|
||||||
msg_info "Updating ${APP}"
|
msg_info "Updating ${APP}"
|
||||||
if ! command -v curl &>/dev/null; then $STD $PKG_MANAGER curl; fi
|
if ! command -v curl &>/dev/null; then $PKG_MANAGER curl &>/dev/null; fi
|
||||||
fetch_and_deploy_gh_release "filebrowser-quantum" "gtsteffaniak/filebrowser" "singlefile" "latest" "/usr/local/bin" "linux-$(arch_resolve)-filebrowser"
|
curl -fsSL https://github.com/gtsteffaniak/filebrowser/releases/latest/download/linux-amd64-filebrowser -o "$TMP_BIN"
|
||||||
mv -f /usr/local/bin/filebrowser-quantum "$INSTALL_PATH"
|
chmod +x "$TMP_BIN"
|
||||||
|
mv -f "$TMP_BIN" /usr/local/bin/filebrowser
|
||||||
msg_ok "Updated ${APP}"
|
msg_ok "Updated ${APP}"
|
||||||
fi
|
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
msg_warn "Update skipped. Exiting."
|
echo -e "${YW}⚠️ Update skipped. Exiting.${CL}"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
msg_warn "${APP} is not installed."
|
echo -e "${YW}⚠️ ${APP} is not installed.${CL}"
|
||||||
echo -n "${TAB}Enter port number (Default: ${DEFAULT_PORT}): "
|
echo -n "Enter port number (Default: ${DEFAULT_PORT}): "
|
||||||
read -r PORT
|
read -r PORT
|
||||||
PORT=${PORT:-$DEFAULT_PORT}
|
PORT=${PORT:-$DEFAULT_PORT}
|
||||||
|
|
||||||
echo -n "${TAB}Install ${APP}? (y/n): "
|
echo -n "Install ${APP}? (y/n): "
|
||||||
read -r install_prompt
|
read -r install_prompt
|
||||||
if ! [[ "${install_prompt,,}" =~ ^(y|yes)$ ]]; then
|
if ! [[ "${install_prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||||
msg_warn "Installation skipped. Exiting."
|
echo -e "${YW}⚠️ Installation skipped. Exiting.${CL}"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
msg_info "Installing ${APP} on ${OS}"
|
msg_info "Installing ${APP} on ${OS}"
|
||||||
$STD $PKG_MANAGER \
|
$PKG_MANAGER curl ffmpeg &>/dev/null
|
||||||
curl \
|
curl -fsSL https://github.com/gtsteffaniak/filebrowser/releases/latest/download/linux-amd64-filebrowser -o "$TMP_BIN"
|
||||||
ffmpeg
|
chmod +x "$TMP_BIN"
|
||||||
fetch_and_deploy_gh_release "filebrowser-quantum" "gtsteffaniak/filebrowser" "singlefile" "latest" "/usr/local/bin" "linux-$(arch_resolve)-filebrowser"
|
mv -f "$TMP_BIN" /usr/local/bin/filebrowser
|
||||||
mv -f /usr/local/bin/filebrowser-quantum "$INSTALL_PATH"
|
|
||||||
msg_ok "Installed ${APP}"
|
msg_ok "Installed ${APP}"
|
||||||
|
|
||||||
msg_info "Preparing configuration directory"
|
msg_info "Preparing configuration directory"
|
||||||
@@ -149,7 +167,7 @@ chown root:root /usr/local/community-scripts
|
|||||||
chmod 755 /usr/local/community-scripts
|
chmod 755 /usr/local/community-scripts
|
||||||
msg_ok "Directory prepared"
|
msg_ok "Directory prepared"
|
||||||
|
|
||||||
echo -n "${TAB}Use No Authentication? (y/N): "
|
echo -n "Use No Authentication? (y/N): "
|
||||||
read -r noauth_prompt
|
read -r noauth_prompt
|
||||||
|
|
||||||
# === YAML CONFIG GENERATION ===
|
# === YAML CONFIG GENERATION ===
|
||||||
@@ -233,9 +251,9 @@ depend() {
|
|||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
chmod +x "$SERVICE_PATH"
|
chmod +x "$SERVICE_PATH"
|
||||||
$STD rc-update add filebrowser default
|
rc-update add filebrowser default &>/dev/null
|
||||||
$STD rc-service filebrowser start
|
rc-service filebrowser start &>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
msg_ok "Service created successfully"
|
msg_ok "Service created successfully"
|
||||||
msg_ok "${APP} is reachable at: ${BL}http://${IP}:${PORT}${CL}"
|
echo -e "${CM} ${GN}${APP} is reachable at: ${BL}http://$IP:$PORT${CL}"
|
||||||
|
|||||||
+75
-50
@@ -5,40 +5,53 @@
|
|||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Source: https://filebrowser.org/ | Github: https://github.com/filebrowser/filebrowser
|
# Source: https://filebrowser.org/ | Github: https://github.com/filebrowser/filebrowser
|
||||||
|
|
||||||
|
function header_info {
|
||||||
|
clear
|
||||||
|
cat <<"EOF"
|
||||||
|
_______ __ ____
|
||||||
|
/ ____(_) /__ / __ )_________ _ __________ _____
|
||||||
|
/ /_ / / / _ \/ __ / ___/ __ \ | /| / / ___/ _ \/ ___/
|
||||||
|
/ __/ / / / __/ /_/ / / / /_/ / |/ |/ (__ ) __/ /
|
||||||
|
/_/ /_/_/\___/_____/_/ \____/|__/|__/____/\___/_/
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
YW=$(echo "\033[33m")
|
||||||
|
GN=$(echo "\033[1;92m")
|
||||||
|
RD=$(echo "\033[01;31m")
|
||||||
|
BL=$(echo "\033[36m")
|
||||||
|
CL=$(echo "\033[m")
|
||||||
|
CM="${GN}✔️${CL}"
|
||||||
|
CROSS="${RD}✖️${CL}"
|
||||||
|
INFO="${BL}ℹ️${CL}"
|
||||||
|
|
||||||
APP="FileBrowser"
|
APP="FileBrowser"
|
||||||
APP_TYPE="addon"
|
|
||||||
INSTALL_PATH="/usr/local/bin/filebrowser"
|
INSTALL_PATH="/usr/local/bin/filebrowser"
|
||||||
DB_PATH="/usr/local/community-scripts/filebrowser.db"
|
DB_PATH="/usr/local/community-scripts/filebrowser.db"
|
||||||
DEFAULT_PORT=8080
|
DEFAULT_PORT=8080
|
||||||
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/core.func)
|
# Telemetry
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/error_handler.func)
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
|
||||||
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "filebrowser" "addon"
|
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "filebrowser" "addon"
|
||||||
|
|
||||||
# Enable error handling
|
# Get first non-loopback IP & Detect primary network interface dynamically
|
||||||
set -Eeuo pipefail
|
IFACE=$(ip -4 route | awk '/default/ {print $5; exit}')
|
||||||
trap 'error_handler' ERR
|
IP=$(ip -4 addr show "$IFACE" | awk '/inet / {print $2}' | cut -d/ -f1 | head -n 1)
|
||||||
|
|
||||||
# Initialize all core functions (colors, formatting, icons, STD mode)
|
[[ -z "$IP" ]] && IP=$(hostname -I | awk '{print $1}')
|
||||||
load_functions
|
[[ -z "$IP" ]] && IP="127.0.0.1"
|
||||||
|
|
||||||
header_info
|
|
||||||
get_lxc_ip
|
|
||||||
IP="$LOCAL_IP"
|
|
||||||
|
|
||||||
# Proxmox Host Warning
|
# Proxmox Host Warning
|
||||||
if [[ -d "/etc/pve" ]]; then
|
if [[ -d "/etc/pve" ]]; then
|
||||||
msg_warn "Running this addon directly on the Proxmox host is not recommended!"
|
echo -e "${RD}⚠️ Warning: Running this addon directly on the Proxmox host is not recommended!${CL}"
|
||||||
msg_warn "Only the boot disk will be visible — passthrough drives will not be indexed."
|
echo -e "${YW} Only the boot disk will be visible — passthrough drives will not be indexed.${CL}"
|
||||||
msg_warn "This causes incorrect disk usage stats and incomplete file browsing."
|
echo -e "${YW} This causes incorrect disk usage stats and incomplete file browsing.${CL}"
|
||||||
msg_warn "Run this addon inside an LXC or VM instead and mount your drives there."
|
echo -e "${YW} Run this addon inside an LXC or VM instead and mount your drives there.${CL}"
|
||||||
echo ""
|
echo ""
|
||||||
echo -n "${TAB}Continue anyway on the Proxmox host? (y/N): "
|
echo -n "Continue anyway on the Proxmox host? (y/N): "
|
||||||
read -r host_confirm
|
read -r host_confirm
|
||||||
if [[ ! "${host_confirm,,}" =~ ^(y|yes)$ ]]; then
|
if [[ ! "${host_confirm,,}" =~ ^(y|yes)$ ]]; then
|
||||||
msg_error "Aborted."
|
echo -e "${YW}Aborted.${CL}"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -51,59 +64,71 @@ if [[ -f "/etc/alpine-release" ]]; then
|
|||||||
elif [[ -f "/etc/debian_version" ]]; then
|
elif [[ -f "/etc/debian_version" ]]; then
|
||||||
OS="Debian"
|
OS="Debian"
|
||||||
SERVICE_PATH="/etc/systemd/system/filebrowser.service"
|
SERVICE_PATH="/etc/systemd/system/filebrowser.service"
|
||||||
PKG_MANAGER="apt install -y"
|
PKG_MANAGER="apt-get install -y"
|
||||||
else
|
else
|
||||||
msg_error "Unsupported OS detected. Exiting."
|
echo -e "${CROSS} Unsupported OS detected. Exiting."
|
||||||
exit 238
|
exit 238
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
header_info
|
||||||
|
|
||||||
|
function msg_info() {
|
||||||
|
local msg="$1"
|
||||||
|
echo -e "${INFO} ${YW}${msg}...${CL}"
|
||||||
|
}
|
||||||
|
|
||||||
|
function msg_ok() {
|
||||||
|
local msg="$1"
|
||||||
|
echo -e "${CM} ${GN}${msg}${CL}"
|
||||||
|
}
|
||||||
|
|
||||||
|
function msg_error() {
|
||||||
|
local msg="$1"
|
||||||
|
echo -e "${CROSS} ${RD}${msg}${CL}"
|
||||||
|
}
|
||||||
|
|
||||||
if [ -f "$INSTALL_PATH" ]; then
|
if [ -f "$INSTALL_PATH" ]; then
|
||||||
msg_warn "${APP} is already installed."
|
echo -e "${YW}⚠️ ${APP} is already installed.${CL}"
|
||||||
read -r -p "Would you like to uninstall ${APP}? (y/N): " uninstall_prompt
|
read -r -p "Would you like to uninstall ${APP}? (y/N): " uninstall_prompt
|
||||||
if [[ "${uninstall_prompt,,}" =~ ^(y|yes)$ ]]; then
|
if [[ "${uninstall_prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||||
msg_info "Uninstalling ${APP}"
|
msg_info "Uninstalling ${APP}"
|
||||||
if [[ "$OS" == "Debian" ]]; then
|
if [[ "$OS" == "Debian" ]]; then
|
||||||
systemctl disable --now filebrowser.service &>/dev/null || true
|
systemctl disable --now filebrowser.service &>/dev/null
|
||||||
rm -f "$SERVICE_PATH"
|
rm -f "$SERVICE_PATH"
|
||||||
else
|
else
|
||||||
rc-service filebrowser stop &>/dev/null || true
|
rc-service filebrowser stop &>/dev/null
|
||||||
rc-update del filebrowser &>/dev/null || true
|
rc-update del filebrowser &>/dev/null
|
||||||
rm -f "$SERVICE_PATH"
|
rm -f "$SERVICE_PATH"
|
||||||
fi
|
fi
|
||||||
rm -f "$INSTALL_PATH" "$DB_PATH" "$HOME/.filebrowser"
|
rm -f "$INSTALL_PATH" "$DB_PATH"
|
||||||
msg_ok "${APP} has been uninstalled."
|
msg_ok "${APP} has been uninstalled."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
read -r -p "Would you like to update ${APP}? (y/N): " update_prompt
|
read -r -p "Would you like to update ${APP}? (y/N): " update_prompt
|
||||||
if [[ "${update_prompt,,}" =~ ^(y|yes)$ ]]; then
|
if [[ "${update_prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||||
if check_for_gh_release "filebrowser" "filebrowser/filebrowser"; then
|
|
||||||
msg_info "Updating ${APP}"
|
msg_info "Updating ${APP}"
|
||||||
fetch_and_deploy_gh_release "filebrowser" "filebrowser/filebrowser" "prebuild" "latest" "/opt/filebrowser-dist" "linux-$(arch_resolve)-filebrowser.tar.gz"
|
if ! command -v curl &>/dev/null; then $PKG_MANAGER curl &>/dev/null; fi
|
||||||
install -m 755 /opt/filebrowser-dist/filebrowser "$INSTALL_PATH"
|
curl -fsSL "https://github.com/filebrowser/filebrowser/releases/latest/download/linux-amd64-filebrowser.tar.gz" | tar -xzv -C /usr/local/bin &>/dev/null
|
||||||
rm -rf /opt/filebrowser-dist
|
chmod +x "$INSTALL_PATH"
|
||||||
msg_ok "Updated ${APP}"
|
msg_ok "Updated ${APP}"
|
||||||
fi
|
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
msg_warn "Update skipped. Exiting."
|
echo -e "${YW}⚠️ Update skipped. Exiting.${CL}"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
msg_warn "${APP} is not installed."
|
echo -e "${YW}⚠️ ${APP} is not installed.${CL}"
|
||||||
read -r -p "Enter port number (Default: ${DEFAULT_PORT}): " PORT
|
read -r -p "Enter port number (Default: ${DEFAULT_PORT}): " PORT
|
||||||
PORT=${PORT:-$DEFAULT_PORT}
|
PORT=${PORT:-$DEFAULT_PORT}
|
||||||
|
|
||||||
read -r -p "Would you like to install ${APP}? (y/n): " install_prompt
|
read -r -p "Would you like to install ${APP}? (y/n): " install_prompt
|
||||||
if [[ "${install_prompt,,}" =~ ^(y|yes)$ ]]; then
|
if [[ "${install_prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||||
msg_info "Installing ${APP} on ${OS}"
|
msg_info "Installing ${APP} on ${OS}"
|
||||||
$STD $PKG_MANAGER \
|
$PKG_MANAGER wget tar curl &>/dev/null
|
||||||
tar \
|
curl -fsSL "https://github.com/filebrowser/filebrowser/releases/latest/download/linux-amd64-filebrowser.tar.gz" | tar -xzv -C /usr/local/bin &>/dev/null
|
||||||
curl
|
chmod +x "$INSTALL_PATH"
|
||||||
fetch_and_deploy_gh_release "filebrowser" "filebrowser/filebrowser" "prebuild" "latest" "/opt/filebrowser-dist" "linux-$(arch_resolve)-filebrowser.tar.gz"
|
|
||||||
install -m 755 /opt/filebrowser-dist/filebrowser "$INSTALL_PATH"
|
|
||||||
rm -rf /opt/filebrowser-dist
|
|
||||||
msg_ok "Installed ${APP}"
|
msg_ok "Installed ${APP}"
|
||||||
|
|
||||||
msg_info "Creating FileBrowser directory"
|
msg_info "Creating FileBrowser directory"
|
||||||
@@ -119,19 +144,19 @@ if [[ "${install_prompt,,}" =~ ^(y|yes)$ ]]; then
|
|||||||
if [[ "${auth_prompt,,}" =~ ^(y|yes)$ ]]; then
|
if [[ "${auth_prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||||
msg_info "Configuring No Authentication"
|
msg_info "Configuring No Authentication"
|
||||||
cd /usr/local/community-scripts
|
cd /usr/local/community-scripts
|
||||||
$STD filebrowser config init -a '0.0.0.0' -p "$PORT" -d "$DB_PATH"
|
filebrowser config init -a '0.0.0.0' -p "$PORT" -d "$DB_PATH" &>/dev/null
|
||||||
$STD filebrowser config set -a '0.0.0.0' -p "$PORT" -d "$DB_PATH"
|
filebrowser config set -a '0.0.0.0' -p "$PORT" -d "$DB_PATH" &>/dev/null
|
||||||
$STD filebrowser config set --auth.method=noauth --database "$DB_PATH"
|
filebrowser config set --auth.method=noauth --database "$DB_PATH" &>/dev/null
|
||||||
if ! filebrowser users update 1 --perm.admin --database "$DB_PATH" &>/dev/null; then
|
if ! filebrowser users update 1 --perm.admin --database "$DB_PATH" &>/dev/null; then
|
||||||
$STD filebrowser users add admin community-scripts.org --perm.admin --database "$DB_PATH"
|
filebrowser users add admin community-scripts.org --perm.admin --database "$DB_PATH" &>/dev/null
|
||||||
fi
|
fi
|
||||||
msg_ok "No Authentication configured"
|
msg_ok "No Authentication configured"
|
||||||
else
|
else
|
||||||
msg_info "Setting up default authentication"
|
msg_info "Setting up default authentication"
|
||||||
cd /usr/local/community-scripts
|
cd /usr/local/community-scripts
|
||||||
$STD filebrowser config init -a '0.0.0.0' -p "$PORT" -d "$DB_PATH"
|
filebrowser config init -a '0.0.0.0' -p "$PORT" -d "$DB_PATH" &>/dev/null
|
||||||
$STD filebrowser config set -a '0.0.0.0' -p "$PORT" -d "$DB_PATH"
|
filebrowser config set -a '0.0.0.0' -p "$PORT" -d "$DB_PATH" &>/dev/null
|
||||||
$STD filebrowser users add admin community-scripts.org --perm.admin --database "$DB_PATH"
|
filebrowser users add admin community-scripts.org --perm.admin --database "$DB_PATH" &>/dev/null
|
||||||
msg_ok "Default authentication configured (admin:community-scripts.org)"
|
msg_ok "Default authentication configured (admin:community-scripts.org)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -169,13 +194,13 @@ depend() {
|
|||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
chmod +x "$SERVICE_PATH"
|
chmod +x "$SERVICE_PATH"
|
||||||
$STD rc-update add filebrowser default
|
rc-update add filebrowser default &>/dev/null
|
||||||
$STD rc-service filebrowser start
|
rc-service filebrowser start &>/dev/null
|
||||||
fi
|
fi
|
||||||
msg_ok "Service created successfully"
|
msg_ok "Service created successfully"
|
||||||
|
|
||||||
msg_ok "${APP} is reachable at: ${BL}http://${IP}:${PORT}${CL}"
|
echo -e "${CM} ${GN}${APP} is reachable at: ${BL}http://$IP:$PORT${CL}"
|
||||||
else
|
else
|
||||||
msg_warn "Installation skipped. Exiting."
|
echo -e "${YW}⚠️ Installation skipped. Exiting.${CL}"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|||||||
+51
-32
@@ -5,37 +5,55 @@
|
|||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Source: https://nicolargo.github.io/glances/ | Github: https://github.com/nicolargo/glances
|
# Source: https://nicolargo.github.io/glances/ | Github: https://github.com/nicolargo/glances
|
||||||
|
|
||||||
APP="Glances"
|
function header_info {
|
||||||
APP_TYPE="addon"
|
clear
|
||||||
|
cat <<"EOF"
|
||||||
|
________
|
||||||
|
/ ____/ /___ _____ ________ _____
|
||||||
|
/ / __/ / __ `/ __ \/ ___/ _ \/ ___/
|
||||||
|
/ /_/ / / /_/ / / / / /__/ __(__ )
|
||||||
|
\____/_/\__,_/_/ /_/\___/\___/____/
|
||||||
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/core.func)
|
EOF
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
|
}
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/error_handler.func)
|
|
||||||
|
APP="Glances"
|
||||||
|
YW=$(echo "\033[33m")
|
||||||
|
GN=$(echo "\033[1;92m")
|
||||||
|
RD=$(echo "\033[01;31m")
|
||||||
|
BL=$(echo "\033[36m")
|
||||||
|
CL=$(echo "\033[m")
|
||||||
|
CM="${GN}✔️${CL}"
|
||||||
|
CROSS="${RD}✖️${CL}"
|
||||||
|
INFO="${BL}ℹ️${CL}"
|
||||||
|
|
||||||
|
function msg_info() { echo -e "${INFO} ${YW}$1...${CL}"; }
|
||||||
|
function msg_ok() { echo -e "${CM} ${GN}$1${CL}"; }
|
||||||
|
function msg_error() { echo -e "${CROSS} ${RD}$1${CL}"; }
|
||||||
|
|
||||||
|
# Telemetry
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
|
||||||
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "glances" "addon"
|
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "glances" "addon"
|
||||||
|
|
||||||
# Enable error handling
|
get_lxc_ip() {
|
||||||
set -Eeuo pipefail
|
if command -v hostname >/dev/null 2>&1 && hostname -I 2>/dev/null; then
|
||||||
trap 'error_handler' ERR
|
hostname -I | awk '{print $1}'
|
||||||
|
elif command -v ip >/dev/null 2>&1; then
|
||||||
# Initialize all core functions (colors, formatting, icons, STD mode)
|
ip -4 addr show scope global | awk '/inet / {print $2}' | cut -d/ -f1 | head -n1
|
||||||
load_functions
|
else
|
||||||
|
echo "127.0.0.1"
|
||||||
header_info
|
fi
|
||||||
get_lxc_ip
|
}
|
||||||
IP="$LOCAL_IP"
|
IP=$(get_lxc_ip)
|
||||||
|
|
||||||
install_glances_debian() {
|
install_glances_debian() {
|
||||||
msg_info "Installing dependencies"
|
msg_info "Installing dependencies"
|
||||||
$STD apt update
|
apt-get update >/dev/null 2>&1
|
||||||
$STD apt install -y \
|
apt-get install -y gcc lm-sensors wireless-tools curl >/dev/null 2>&1
|
||||||
gcc \
|
|
||||||
lm-sensors \
|
|
||||||
wireless-tools \
|
|
||||||
curl
|
|
||||||
msg_ok "Installed dependencies"
|
msg_ok "Installed dependencies"
|
||||||
|
|
||||||
msg_info "Setting up Python + uv"
|
msg_info "Setting up Python + uv"
|
||||||
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
|
||||||
setup_uv PYTHON_VERSION="3.12"
|
setup_uv PYTHON_VERSION="3.12"
|
||||||
msg_ok "Setup Python + uv"
|
msg_ok "Setup Python + uv"
|
||||||
|
|
||||||
@@ -43,10 +61,10 @@ install_glances_debian() {
|
|||||||
cd /opt
|
cd /opt
|
||||||
mkdir -p glances
|
mkdir -p glances
|
||||||
cd glances
|
cd glances
|
||||||
$STD uv venv --clear
|
uv venv --clear
|
||||||
source .venv/bin/activate >/dev/null 2>&1
|
source .venv/bin/activate >/dev/null 2>&1
|
||||||
$STD uv pip install --upgrade pip wheel setuptools
|
uv pip install --upgrade pip wheel setuptools >/dev/null 2>&1
|
||||||
$STD uv pip install "glances[web]"
|
uv pip install "glances[web]" >/dev/null 2>&1
|
||||||
deactivate
|
deactivate
|
||||||
msg_ok "Installed $APP"
|
msg_ok "Installed $APP"
|
||||||
|
|
||||||
@@ -68,7 +86,7 @@ EOF
|
|||||||
systemctl enable -q --now glances
|
systemctl enable -q --now glances
|
||||||
msg_ok "Created systemd service"
|
msg_ok "Created systemd service"
|
||||||
|
|
||||||
msg_ok "$APP is now running at: http://${IP}:61208"
|
echo -e "\n$APP is now running at: http://$IP:61208\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
# update on Debian/Ubuntu
|
# update on Debian/Ubuntu
|
||||||
@@ -80,7 +98,7 @@ update_glances_debian() {
|
|||||||
msg_info "Updating $APP"
|
msg_info "Updating $APP"
|
||||||
cd /opt/glances
|
cd /opt/glances
|
||||||
source .venv/bin/activate
|
source .venv/bin/activate
|
||||||
$STD uv pip install --upgrade "glances[web]"
|
uv pip install --upgrade "glances[web]" >/dev/null 2>&1
|
||||||
deactivate
|
deactivate
|
||||||
systemctl restart glances
|
systemctl restart glances
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
@@ -98,13 +116,14 @@ uninstall_glances_debian() {
|
|||||||
# install on Alpine
|
# install on Alpine
|
||||||
install_glances_alpine() {
|
install_glances_alpine() {
|
||||||
msg_info "Installing dependencies"
|
msg_info "Installing dependencies"
|
||||||
$STD apk update
|
apk update >/dev/null 2>&1
|
||||||
$STD apk add --no-cache \
|
$STD apk add --no-cache \
|
||||||
gcc musl-dev linux-headers python3-dev \
|
gcc musl-dev linux-headers python3-dev \
|
||||||
python3 py3-pip py3-virtualenv lm-sensors wireless-tools curl
|
python3 py3-pip py3-virtualenv lm-sensors wireless-tools curl >/dev/null 2>&1
|
||||||
msg_ok "Installed dependencies"
|
msg_ok "Installed dependencies"
|
||||||
|
|
||||||
msg_info "Setting up Python + uv"
|
msg_info "Setting up Python + uv"
|
||||||
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
|
||||||
setup_uv PYTHON_VERSION="3.12"
|
setup_uv PYTHON_VERSION="3.12"
|
||||||
msg_ok "Setup Python + uv"
|
msg_ok "Setup Python + uv"
|
||||||
|
|
||||||
@@ -112,10 +131,10 @@ install_glances_alpine() {
|
|||||||
cd /opt
|
cd /opt
|
||||||
mkdir -p glances
|
mkdir -p glances
|
||||||
cd glances
|
cd glances
|
||||||
$STD uv venv --clear
|
uv venv --clear
|
||||||
source .venv/bin/activate
|
source .venv/bin/activate
|
||||||
$STD uv pip install --upgrade pip wheel setuptools
|
uv pip install --upgrade pip wheel setuptools >/dev/null 2>&1
|
||||||
$STD uv pip install "glances[web]"
|
uv pip install "glances[web]" >/dev/null 2>&1
|
||||||
deactivate
|
deactivate
|
||||||
msg_ok "Installed $APP"
|
msg_ok "Installed $APP"
|
||||||
|
|
||||||
@@ -146,7 +165,7 @@ update_glances_alpine() {
|
|||||||
msg_info "Updating $APP"
|
msg_info "Updating $APP"
|
||||||
cd /opt/glances
|
cd /opt/glances
|
||||||
source .venv/bin/activate
|
source .venv/bin/activate
|
||||||
$STD uv pip install --upgrade "glances[web]"
|
uv pip install --upgrade "glances[web]" >/dev/null 2>&1
|
||||||
deactivate
|
deactivate
|
||||||
rc-service glances restart
|
rc-service glances restart
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
|
|
||||||
if ! command -v curl &>/dev/null; then
|
if ! command -v curl &>/dev/null; then
|
||||||
printf "\r\e[2K%b" '\033[93m Setup Source \033[m' >&2
|
printf "\r\e[2K%b" '\033[93m Setup Source \033[m' >&2
|
||||||
apt update >/dev/null 2>&1
|
apt-get update >/dev/null 2>&1
|
||||||
apt install -y curl >/dev/null 2>&1
|
apt-get install -y curl >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
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/core.func)
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
|
||||||
@@ -32,6 +32,21 @@ DEFAULT_PORT=3000
|
|||||||
# Initialize all core functions (colors, formatting, icons, $STD mode)
|
# Initialize all core functions (colors, formatting, icons, $STD mode)
|
||||||
load_functions
|
load_functions
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# HEADER
|
||||||
|
# ==============================================================================
|
||||||
|
function header_info {
|
||||||
|
clear
|
||||||
|
cat <<"EOF"
|
||||||
|
____ _ __ ____
|
||||||
|
/ _/___ ___ ____ ___ (_)____/ /_ / __ \_________ _ ____ __
|
||||||
|
/ // __ `__ \/ __ `__ \/ / ___/ __ \______/ /_/ / ___/ __ \| |/_/ / / /
|
||||||
|
_/ // / / / / / / / / / / / /__/ / / /_____/ ____/ / / /_/ /> </ /_/ /
|
||||||
|
/___/_/ /_/ /_/_/ /_/ /_/_/\___/_/ /_/ /_/ /_/ \____/_/|_|\__, /
|
||||||
|
/____/
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# OS DETECTION
|
# OS DETECTION
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
@@ -68,13 +83,19 @@ function update() {
|
|||||||
systemctl stop immich-proxy.service &>/dev/null || true
|
systemctl stop immich-proxy.service &>/dev/null || true
|
||||||
msg_ok "Stopped service"
|
msg_ok "Stopped service"
|
||||||
|
|
||||||
BACKUP_DIR="/opt/immich-public-proxy_backup"
|
msg_info "Backing up configuration"
|
||||||
create_backup "$CONFIG_PATH"/.env "$CONFIG_PATH"/config.json
|
cp "$CONFIG_PATH"/.env /tmp/ipp.env.bak 2>/dev/null || true
|
||||||
|
cp "$CONFIG_PATH"/config.json /tmp/ipp.config.json.bak 2>/dev/null || true
|
||||||
|
msg_ok "Backed up configuration"
|
||||||
|
|
||||||
NODE_VERSION="24" setup_nodejs
|
NODE_VERSION="24" setup_nodejs
|
||||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "Immich Public Proxy" "alangrainger/immich-public-proxy" "tarball" "latest" "$INSTALL_PATH"
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "Immich Public Proxy" "alangrainger/immich-public-proxy" "tarball" "latest" "$INSTALL_PATH"
|
||||||
|
|
||||||
restore_backup
|
msg_info "Restoring configuration"
|
||||||
|
cp /tmp/ipp.env.bak "$CONFIG_PATH"/.env 2>/dev/null || true
|
||||||
|
cp /tmp/ipp.config.json.bak "$CONFIG_PATH"/config.json 2>/dev/null || true
|
||||||
|
rm -f /tmp/ipp.*.bak
|
||||||
|
msg_ok "Restored configuration"
|
||||||
|
|
||||||
msg_info "Installing dependencies"
|
msg_info "Installing dependencies"
|
||||||
cd "$CONFIG_PATH"
|
cd "$CONFIG_PATH"
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
|
|
||||||
if ! command -v curl &>/dev/null; then
|
if ! command -v curl &>/dev/null; then
|
||||||
printf "\r\e[2K%b" '\033[93m Setup Source \033[m' >&2
|
printf "\r\e[2K%b" '\033[93m Setup Source \033[m' >&2
|
||||||
apt update >/dev/null 2>&1
|
apt-get update >/dev/null 2>&1
|
||||||
apt install -y curl >/dev/null 2>&1
|
apt-get install -y curl >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
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/core.func)
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
|
||||||
@@ -32,6 +32,21 @@ DEFAULT_PORT=3000
|
|||||||
# Initialize all core functions (colors, formatting, icons, STD mode)
|
# Initialize all core functions (colors, formatting, icons, STD mode)
|
||||||
load_functions
|
load_functions
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# HEADER
|
||||||
|
# ==============================================================================
|
||||||
|
function header_info {
|
||||||
|
clear
|
||||||
|
cat <<"EOF"
|
||||||
|
__ ____ __ __
|
||||||
|
/ /__ / / /_ _______/ /_____ _/ /_
|
||||||
|
__ / / _ \/ / / / / / ___/ __/ __ `/ __/
|
||||||
|
/ /_/ / __/ / / /_/ (__ ) /_/ /_/ / /_
|
||||||
|
\____/\___/_/_/\__, /____/\__/\__,_/\__/
|
||||||
|
/____/
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# OS DETECTION
|
# OS DETECTION
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
@@ -87,12 +102,16 @@ function update() {
|
|||||||
systemctl stop jellystat.service &>/dev/null || true
|
systemctl stop jellystat.service &>/dev/null || true
|
||||||
msg_ok "Stopped service"
|
msg_ok "Stopped service"
|
||||||
|
|
||||||
BACKUP_DIR="/opt/jellystat_backup"
|
msg_info "Backing up configuration"
|
||||||
create_backup "$CONFIG_PATH"
|
cp "$CONFIG_PATH" /tmp/jellystat.env.bak 2>/dev/null || true
|
||||||
|
msg_ok "Backed up configuration"
|
||||||
|
|
||||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "jellystat" "CyferShepard/Jellystat" "tarball" "latest" "$INSTALL_PATH"
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "jellystat" "CyferShepard/Jellystat" "tarball" "latest" "$INSTALL_PATH"
|
||||||
|
|
||||||
restore_backup
|
msg_info "Restoring configuration"
|
||||||
|
cp /tmp/jellystat.env.bak "$CONFIG_PATH" 2>/dev/null || true
|
||||||
|
rm -f /tmp/jellystat.env.bak
|
||||||
|
msg_ok "Restored configuration"
|
||||||
|
|
||||||
msg_info "Installing dependencies"
|
msg_info "Installing dependencies"
|
||||||
cd "$INSTALL_PATH"
|
cd "$INSTALL_PATH"
|
||||||
|
|||||||
+78
-34
@@ -5,22 +5,6 @@
|
|||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Source: https://www.netdata.cloud/ | Github: https://github.com/netdata/netdata
|
# Source: https://www.netdata.cloud/ | Github: https://github.com/netdata/netdata
|
||||||
|
|
||||||
APP="Netdata"
|
|
||||||
APP_TYPE="addon"
|
|
||||||
|
|
||||||
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/tools.func)
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/error_handler.func)
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
|
|
||||||
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "netdata" "addon"
|
|
||||||
|
|
||||||
# Enable error handling
|
|
||||||
set -Eeuo pipefail
|
|
||||||
trap 'error_handler' ERR
|
|
||||||
|
|
||||||
# Initialize all core functions (colors, formatting, icons, STD mode)
|
|
||||||
load_functions
|
|
||||||
|
|
||||||
function header_info {
|
function header_info {
|
||||||
clear
|
clear
|
||||||
cat <<"EOF"
|
cat <<"EOF"
|
||||||
@@ -33,6 +17,63 @@ function header_info {
|
|||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
YW=$(echo "\033[33m")
|
||||||
|
BL=$(echo "\033[36m")
|
||||||
|
RD=$(echo "\033[01;31m")
|
||||||
|
GN=$(echo "\033[1;92m")
|
||||||
|
CL=$(echo "\033[m")
|
||||||
|
BFR="\\r\\033[K"
|
||||||
|
HOLD="-"
|
||||||
|
CM="${GN}✓${CL}"
|
||||||
|
silent() { "$@" >/dev/null 2>&1; }
|
||||||
|
|
||||||
|
# Telemetry
|
||||||
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
|
||||||
|
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "netdata" "addon"
|
||||||
|
|
||||||
|
set -e
|
||||||
|
header_info
|
||||||
|
echo "Loading..."
|
||||||
|
function msg_info() {
|
||||||
|
local msg="$1"
|
||||||
|
echo -ne " ${HOLD} ${YW}${msg}..."
|
||||||
|
}
|
||||||
|
|
||||||
|
function msg_ok() {
|
||||||
|
local msg="$1"
|
||||||
|
echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
|
||||||
|
}
|
||||||
|
|
||||||
|
function msg_error() { echo -e "${RD}✗ $1${CL}"; }
|
||||||
|
|
||||||
|
# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported.
|
||||||
|
# Supported: Proxmox VE 8.0.x – 8.9.x and 9.0–9.x
|
||||||
|
pve_check() {
|
||||||
|
local PVE_VER
|
||||||
|
PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')"
|
||||||
|
|
||||||
|
# Check for Proxmox VE 8.x: allow 8.0–8.9
|
||||||
|
if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then
|
||||||
|
local MINOR="${BASH_REMATCH[1]}"
|
||||||
|
if ((MINOR < 0 || MINOR > 9)); then
|
||||||
|
msg_error "This version of Proxmox VE is not supported."
|
||||||
|
msg_error "Supported: Proxmox VE version 8.0 – 8.9"
|
||||||
|
exit 105
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check for Proxmox VE 9.x: allow 9.0–9.x
|
||||||
|
if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# All other unsupported versions
|
||||||
|
msg_error "This version of Proxmox VE is not supported."
|
||||||
|
msg_error "Supported versions: Proxmox VE 8.0 – 8.9 or 9.0–9.x"
|
||||||
|
exit 105
|
||||||
|
}
|
||||||
|
|
||||||
detect_codename() {
|
detect_codename() {
|
||||||
source /etc/os-release
|
source /etc/os-release
|
||||||
if [[ "$ID" != "debian" ]]; then
|
if [[ "$ID" != "debian" ]]; then
|
||||||
@@ -58,7 +99,7 @@ get_latest_repo_pkg() {
|
|||||||
install() {
|
install() {
|
||||||
header_info
|
header_info
|
||||||
while true; do
|
while true; do
|
||||||
read -r -p "Are you sure you want to install ${APP} on Proxmox VE host. Proceed(y/n)? " yn
|
read -p "Are you sure you want to install NetData on Proxmox VE host. Proceed(y/n)? " yn
|
||||||
case $yn in
|
case $yn in
|
||||||
[Yy]*) break ;;
|
[Yy]*) break ;;
|
||||||
[Nn]*) exit ;;
|
[Nn]*) exit ;;
|
||||||
@@ -66,53 +107,56 @@ install() {
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
read -r -p "Verbose mode? <y/N> " prompt
|
||||||
|
[[ ${prompt,,} =~ ^(y|yes)$ ]] && STD="" || STD="silent"
|
||||||
|
|
||||||
CODENAME=$(detect_codename)
|
CODENAME=$(detect_codename)
|
||||||
REPO_URL="https://repo.netdata.cloud/repos/repoconfig/debian/${CODENAME}/"
|
REPO_URL="https://repo.netdata.cloud/repos/repoconfig/debian/${CODENAME}/"
|
||||||
|
|
||||||
msg_info "Setting up repository"
|
msg_info "Setting up repository"
|
||||||
$STD apt install -y debian-keyring
|
$STD apt-get install -y debian-keyring
|
||||||
PKG=$(get_latest_repo_pkg "$REPO_URL")
|
PKG=$(get_latest_repo_pkg "$REPO_URL")
|
||||||
if [[ -z "$PKG" ]]; then
|
if [[ -z "$PKG" ]]; then
|
||||||
msg_error "Could not find netdata-repo package for Debian $CODENAME"
|
msg_error "Could not find netdata-repo package for Debian $CODENAME"
|
||||||
exit 237
|
exit 237
|
||||||
fi
|
fi
|
||||||
TMP_DEB=$(mktemp --suffix=.deb)
|
curl -fsSL "${REPO_URL}${PKG}" -o "$PKG"
|
||||||
curl -fsSL "${REPO_URL}${PKG}" -o "$TMP_DEB"
|
$STD dpkg -i "$PKG"
|
||||||
$STD dpkg -i "$TMP_DEB"
|
rm -f "$PKG"
|
||||||
rm -f "$TMP_DEB"
|
|
||||||
msg_ok "Set up repository"
|
msg_ok "Set up repository"
|
||||||
|
|
||||||
msg_info "Installing ${APP}"
|
msg_info "Installing Netdata"
|
||||||
$STD apt update
|
$STD apt-get update
|
||||||
$STD apt install -y netdata
|
$STD apt-get install -y netdata
|
||||||
msg_ok "Installed ${APP}"
|
msg_ok "Installed Netdata"
|
||||||
msg_ok "Completed successfully!\n"
|
msg_ok "Completed successfully!\n"
|
||||||
get_lxc_ip
|
echo -e "\n Netdata should be reachable at${BL} http://$(hostname -I | awk '{print $1}'):19999 ${CL}\n"
|
||||||
echo -e "\n${APP} should be reachable at${BL} http://${LOCAL_IP}:19999 ${CL}\n"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uninstall() {
|
uninstall() {
|
||||||
header_info
|
header_info
|
||||||
|
read -r -p "Verbose mode? <y/N> " prompt
|
||||||
|
[[ ${prompt,,} =~ ^(y|yes)$ ]] && STD="" || STD="silent"
|
||||||
|
|
||||||
msg_info "Uninstalling ${APP}"
|
msg_info "Uninstalling Netdata"
|
||||||
systemctl stop netdata || true
|
systemctl stop netdata || true
|
||||||
rm -rf /var/log/netdata /var/lib/netdata /var/cache/netdata /etc/netdata/go.d
|
rm -rf /var/log/netdata /var/lib/netdata /var/cache/netdata /etc/netdata/go.d
|
||||||
rm -rf /etc/apt/trusted.gpg.d/netdata-archive-keyring.gpg /etc/apt/sources.list.d/netdata.list
|
rm -rf /etc/apt/trusted.gpg.d/netdata-archive-keyring.gpg /etc/apt/sources.list.d/netdata.list
|
||||||
$STD apt remove --purge -y netdata netdata-repo
|
$STD apt-get remove --purge -y netdata netdata-repo
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
$STD apt autoremove -y
|
$STD apt autoremove -y
|
||||||
$STD userdel netdata || true
|
$STD userdel netdata || true
|
||||||
msg_ok "Uninstalled ${APP}"
|
msg_ok "Uninstalled Netdata"
|
||||||
msg_ok "Completed successfully!\n"
|
msg_ok "Completed successfully!\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
header_info
|
header_info
|
||||||
pve_check
|
pve_check
|
||||||
|
|
||||||
OPTIONS=(Install "Install ${APP} on Proxmox VE"
|
OPTIONS=(Install "Install NetData on Proxmox VE"
|
||||||
Uninstall "Uninstall ${APP} from Proxmox VE")
|
Uninstall "Uninstall NetData from Proxmox VE")
|
||||||
|
|
||||||
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP}" \
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "NetData" \
|
||||||
--menu "Select an option:" 10 58 2 "${OPTIONS[@]}" 3>&1 1>&2 2>&3)
|
--menu "Select an option:" 10 58 2 "${OPTIONS[@]}" 3>&1 1>&2 2>&3)
|
||||||
|
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
|
|||||||
+49
-102
@@ -5,120 +5,67 @@
|
|||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Source: https://docs.olivetin.app/ | Github: https://github.com/OliveTin/OliveTin
|
# Source: https://docs.olivetin.app/ | Github: https://github.com/OliveTin/OliveTin
|
||||||
|
|
||||||
APP="OliveTin"
|
function header_info {
|
||||||
APP_TYPE="addon"
|
clear
|
||||||
|
cat <<"EOF"
|
||||||
|
____ ___ _______
|
||||||
|
/ __ \/ (_) _____/_ __(_)___
|
||||||
|
/ / / / / / | / / _ \/ / / / __ \
|
||||||
|
/ /_/ / / /| |/ / __/ / / / / / /
|
||||||
|
\____/_/_/ |___/\___/_/ /_/_/ /_/
|
||||||
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/core.func)
|
EOF
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
|
}
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/error_handler.func)
|
|
||||||
|
IP=$(hostname -I | awk '{print $1}')
|
||||||
|
YW=$(echo "\033[33m")
|
||||||
|
BL=$(echo "\033[36m")
|
||||||
|
GN=$(echo "\033[1;92m")
|
||||||
|
CL=$(echo "\033[m")
|
||||||
|
BFR="\\r\\033[K"
|
||||||
|
HOLD="-"
|
||||||
|
CM="${GN}✓${CL}"
|
||||||
|
APP="OliveTin"
|
||||||
|
hostname="$(hostname)"
|
||||||
|
|
||||||
|
# Telemetry
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
|
||||||
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "olivetin" "addon"
|
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "olivetin" "addon"
|
||||||
|
|
||||||
# Enable error handling
|
set-e
|
||||||
set -Eeuo pipefail
|
|
||||||
trap 'error_handler' ERR
|
|
||||||
|
|
||||||
# Initialize all core functions (colors, formatting, icons, STD mode)
|
|
||||||
load_functions
|
|
||||||
|
|
||||||
header_info
|
header_info
|
||||||
ensure_usr_local_bin_persist
|
|
||||||
get_lxc_ip
|
|
||||||
IP="$LOCAL_IP"
|
|
||||||
|
|
||||||
# ==============================================================================
|
|
||||||
# UNINSTALL
|
|
||||||
# ==============================================================================
|
|
||||||
function uninstall() {
|
|
||||||
msg_info "Uninstalling ${APP}"
|
|
||||||
systemctl disable --now OliveTin &>/dev/null || true
|
|
||||||
$STD apt remove -y olivetin
|
|
||||||
rm -f "$HOME/.olivetin"
|
|
||||||
msg_ok "${APP} has been uninstalled"
|
|
||||||
}
|
|
||||||
|
|
||||||
# ==============================================================================
|
|
||||||
# UPDATE
|
|
||||||
# ==============================================================================
|
|
||||||
function update() {
|
|
||||||
if check_for_gh_release "olivetin" "OliveTin/OliveTin"; then
|
|
||||||
msg_info "Updating ${APP}"
|
|
||||||
fetch_and_deploy_gh_release "olivetin" "OliveTin/OliveTin" "binary"
|
|
||||||
systemctl restart OliveTin
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# ==============================================================================
|
|
||||||
# INSTALL
|
|
||||||
# ==============================================================================
|
|
||||||
function install() {
|
|
||||||
msg_info "Installing ${APP}"
|
|
||||||
fetch_and_deploy_gh_release "olivetin" "OliveTin/OliveTin" "binary"
|
|
||||||
systemctl enable --now OliveTin &>/dev/null
|
|
||||||
msg_ok "Installed ${APP}"
|
|
||||||
|
|
||||||
msg_info "Creating update script"
|
|
||||||
ensure_usr_local_bin_persist
|
|
||||||
cat <<'EOF' >/usr/local/bin/update_olivetin
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
# OliveTin Update Script
|
|
||||||
type=update bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/addon/olivetin.sh)"
|
|
||||||
EOF
|
|
||||||
chmod +x /usr/local/bin/update_olivetin
|
|
||||||
msg_ok "Created update script (/usr/local/bin/update_olivetin)"
|
|
||||||
|
|
||||||
msg_ok "Completed successfully!\n"
|
|
||||||
echo -e "${APP} should be reachable by going to the following URL.
|
|
||||||
${BL}http://${IP}:1337${CL} \n"
|
|
||||||
}
|
|
||||||
|
|
||||||
# ==============================================================================
|
|
||||||
# MAIN
|
|
||||||
# ==============================================================================
|
|
||||||
|
|
||||||
# Handle type=update (called from update script)
|
|
||||||
if [[ "${type:-}" == "update" ]]; then
|
|
||||||
if command -v olivetin &>/dev/null; then
|
|
||||||
update
|
|
||||||
else
|
|
||||||
msg_error "${APP} is not installed. Nothing to update."
|
|
||||||
exit 233
|
|
||||||
fi
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -d "$HOME" && -f "$HOME/.olivetin" ]] || command -v olivetin &>/dev/null; then
|
|
||||||
msg_warn "${APP} is already installed."
|
|
||||||
echo -n "${TAB}Uninstall ${APP}? (y/N): "
|
|
||||||
read -r uninstall_prompt
|
|
||||||
if [[ "${uninstall_prompt,,}" =~ ^(y|yes)$ ]]; then
|
|
||||||
uninstall
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo -n "${TAB}Update ${APP}? (y/N): "
|
|
||||||
read -r update_prompt
|
|
||||||
if [[ "${update_prompt,,}" =~ ^(y|yes)$ ]]; then
|
|
||||||
update
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
msg_warn "No action selected. Exiting."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
echo -n "${TAB}This will Install ${APP}. Proceed (y/n)? "
|
read -p "This will Install ${APP} on $hostname. Proceed(y/n)?" yn
|
||||||
read -r yn
|
|
||||||
case $yn in
|
case $yn in
|
||||||
[Yy]*) break ;;
|
[Yy]*) break ;;
|
||||||
[Nn]*) exit ;;
|
[Nn]*) exit ;;
|
||||||
*) echo "Please answer yes or no." ;;
|
*) echo "Please answer yes or no." ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
unset _HEADER_SHOWN
|
|
||||||
header_info
|
header_info
|
||||||
|
|
||||||
install
|
function msg_info() {
|
||||||
|
local msg="$1"
|
||||||
|
echo -ne " ${HOLD} ${YW}${msg}..."
|
||||||
|
}
|
||||||
|
|
||||||
|
function msg_ok() {
|
||||||
|
local msg="$1"
|
||||||
|
echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
|
||||||
|
}
|
||||||
|
|
||||||
|
msg_info "Installing ${APP}"
|
||||||
|
if ! command -v curl &>/dev/null; then
|
||||||
|
apt-get update >/dev/null 2>&1
|
||||||
|
apt-get install -y curl >/dev/null 2>&1
|
||||||
|
fi
|
||||||
|
curl -fsSL "https://github.com/OliveTin/OliveTin/releases/latest/download/OliveTin_linux_amd64.deb" -o $(basename "https://github.com/OliveTin/OliveTin/releases/latest/download/OliveTin_linux_amd64.deb")
|
||||||
|
dpkg -i OliveTin_linux_amd64.deb &>/dev/null
|
||||||
|
systemctl enable --now OliveTin &>/dev/null
|
||||||
|
rm OliveTin_linux_amd64.deb
|
||||||
|
msg_ok "Installed ${APP} on $hostname"
|
||||||
|
|
||||||
|
msg_ok "Completed successfully!\n"
|
||||||
|
echo -e "${APP} should be reachable by going to the following URL.
|
||||||
|
${BL}http://$IP:1337${CL} \n"
|
||||||
|
|||||||
+63
-53
@@ -5,26 +5,39 @@
|
|||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Source: https://www.phpmyadmin.net/ | Github: https://github.com/phpmyadmin/phpmyadmin
|
# Source: https://www.phpmyadmin.net/ | Github: https://github.com/phpmyadmin/phpmyadmin
|
||||||
|
|
||||||
|
function header_info {
|
||||||
|
clear
|
||||||
|
cat <<"EOF"
|
||||||
|
____ __ __ ___ ___ __ _
|
||||||
|
/ __ \/ /_ ____ / |/ /_ __/ | ____/ /___ ___ (_)___
|
||||||
|
/ /_/ / __ \/ __ \/ /|_/ / / / / /| |/ __ / __ `__ \/ / __ \
|
||||||
|
/ ____/ / / / /_/ / / / / /_/ / ___ / /_/ / / / / / / / / / /
|
||||||
|
/_/ /_/ /_/ .___/_/ /_/\__, /_/ |_\__,_/_/ /_/ /_/_/_/ /_/
|
||||||
|
/_/ /____/
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
YW=$(echo "\033[33m")
|
||||||
|
GN=$(echo "\033[1;92m")
|
||||||
|
RD=$(echo "\033[01;31m")
|
||||||
|
BL=$(echo "\033[36m")
|
||||||
|
CL=$(echo "\033[m")
|
||||||
|
CM="${GN}✔️${CL}"
|
||||||
|
CROSS="${RD}✖️${CL}"
|
||||||
|
INFO="${BL}ℹ️${CL}"
|
||||||
|
|
||||||
APP="phpMyAdmin"
|
APP="phpMyAdmin"
|
||||||
APP_TYPE="addon"
|
|
||||||
INSTALL_DIR_DEBIAN="/var/www/html/phpMyAdmin"
|
INSTALL_DIR_DEBIAN="/var/www/html/phpMyAdmin"
|
||||||
INSTALL_DIR_ALPINE="/usr/share/phpmyadmin"
|
INSTALL_DIR_ALPINE="/usr/share/phpmyadmin"
|
||||||
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/core.func)
|
# Telemetry
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/error_handler.func)
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
|
||||||
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "phpmyadmin" "addon"
|
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "phpmyadmin" "addon"
|
||||||
|
|
||||||
# Enable error handling
|
IFACE=$(ip -4 route | awk '/default/ {print $5; exit}')
|
||||||
set -Eeuo pipefail
|
IP=$(ip -4 addr show "$IFACE" | awk '/inet / {print $2}' | cut -d/ -f1 | head -n 1)
|
||||||
trap 'error_handler' ERR
|
[[ -z "$IP" ]] && IP=$(hostname -I | awk '{print $1}')
|
||||||
|
[[ -z "$IP" ]] && IP="127.0.0.1"
|
||||||
# Initialize all core functions (colors, formatting, icons, STD mode)
|
|
||||||
load_functions
|
|
||||||
|
|
||||||
get_lxc_ip
|
|
||||||
IP="$LOCAL_IP"
|
|
||||||
|
|
||||||
# Detect OS
|
# Detect OS
|
||||||
if [[ -f "/etc/alpine-release" ]]; then
|
if [[ -f "/etc/alpine-release" ]]; then
|
||||||
@@ -34,20 +47,24 @@ if [[ -f "/etc/alpine-release" ]]; then
|
|||||||
INSTALL_DIR="$INSTALL_DIR_ALPINE"
|
INSTALL_DIR="$INSTALL_DIR_ALPINE"
|
||||||
elif [[ -f "/etc/debian_version" ]]; then
|
elif [[ -f "/etc/debian_version" ]]; then
|
||||||
OS="Debian"
|
OS="Debian"
|
||||||
PKG_MANAGER_INSTALL="apt install -y"
|
PKG_MANAGER_INSTALL="apt-get install -y"
|
||||||
PKG_QUERY="dpkg -l"
|
PKG_QUERY="dpkg -l"
|
||||||
INSTALL_DIR="$INSTALL_DIR_DEBIAN"
|
INSTALL_DIR="$INSTALL_DIR_DEBIAN"
|
||||||
else
|
else
|
||||||
msg_error "Unsupported OS detected. Exiting."
|
echo -e "${CROSS} Unsupported OS detected. Exiting."
|
||||||
exit 238
|
exit 238
|
||||||
fi
|
fi
|
||||||
|
|
||||||
header_info
|
header_info
|
||||||
|
|
||||||
|
function msg_info() { echo -e "${INFO} ${YW}${1}...${CL}"; }
|
||||||
|
function msg_ok() { echo -e "${CM} ${GN}${1}${CL}"; }
|
||||||
|
function msg_error() { echo -e "${CROSS} ${RD}${1}${CL}"; }
|
||||||
|
|
||||||
function check_internet() {
|
function check_internet() {
|
||||||
if ! command -v curl &>/dev/null; then
|
if ! command -v curl &>/dev/null; then
|
||||||
$STD apt update
|
apt-get update >/dev/null 2>&1
|
||||||
$STD apt install -y curl
|
apt-get install -y curl >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
msg_info "Checking Internet connectivity to GitHub"
|
msg_info "Checking Internet connectivity to GitHub"
|
||||||
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" https://github.com)
|
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" https://github.com)
|
||||||
@@ -86,7 +103,7 @@ function install_php_and_modules() {
|
|||||||
done
|
done
|
||||||
if [[ ${#MISSING_PACKAGES[@]} -gt 0 ]]; then
|
if [[ ${#MISSING_PACKAGES[@]} -gt 0 ]]; then
|
||||||
msg_info "Installing missing PHP packages: ${MISSING_PACKAGES[*]}"
|
msg_info "Installing missing PHP packages: ${MISSING_PACKAGES[*]}"
|
||||||
if ! $STD apt update || ! $STD apt install -y "${MISSING_PACKAGES[@]}"; then
|
if ! apt-get update &>/dev/null || ! apt-get install -y "${MISSING_PACKAGES[@]}" &>/dev/null; then
|
||||||
msg_error "Failed to install required PHP modules. Exiting."
|
msg_error "Failed to install required PHP modules. Exiting."
|
||||||
exit 237
|
exit 237
|
||||||
fi
|
fi
|
||||||
@@ -96,41 +113,30 @@ function install_php_and_modules() {
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
msg_info "Installing Lighttpd and PHP for Alpine"
|
msg_info "Installing Lighttpd and PHP for Alpine"
|
||||||
$STD $PKG_MANAGER_INSTALL \
|
$PKG_MANAGER_INSTALL lighttpd php php-fpm php-session php-json php-mysqli curl tar openssl &>/dev/null
|
||||||
lighttpd \
|
|
||||||
php \
|
|
||||||
php-fpm \
|
|
||||||
php-session \
|
|
||||||
php-json \
|
|
||||||
php-mysqli \
|
|
||||||
curl \
|
|
||||||
tar \
|
|
||||||
openssl
|
|
||||||
msg_ok "Installed Lighttpd and PHP"
|
msg_ok "Installed Lighttpd and PHP"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function install_phpmyadmin() {
|
function install_phpmyadmin() {
|
||||||
msg_info "Fetching latest phpMyAdmin release from GitHub"
|
msg_info "Fetching latest phpMyAdmin release from GitHub"
|
||||||
LATEST_VERSION_RAW=$(get_latest_github_release "phpmyadmin/phpmyadmin" false) || true
|
LATEST_VERSION_RAW=$(curl -s https://api.github.com/repos/phpmyadmin/phpmyadmin/releases/latest | grep tag_name | cut -d '"' -f4)
|
||||||
LATEST_VERSION=$(echo "$LATEST_VERSION_RAW" | sed -e 's/^RELEASE_//' -e 's/_/./g')
|
LATEST_VERSION=$(echo "$LATEST_VERSION_RAW" | sed -e 's/^RELEASE_//' -e 's/_/./g')
|
||||||
if [[ -z "$LATEST_VERSION" ]]; then
|
if [[ -z "$LATEST_VERSION" ]]; then
|
||||||
msg_error "Could not determine latest phpMyAdmin version from GitHub – falling back to 5.2.2"
|
msg_error "Could not determine latest phpMyAdmin version from GitHub – falling back to 5.2.2"
|
||||||
LATEST_VERSION="5.2.2"
|
LATEST_VERSION="RELEASE_5_2_2"
|
||||||
fi
|
fi
|
||||||
msg_ok "Latest version: $LATEST_VERSION"
|
msg_ok "Latest version: $LATEST_VERSION"
|
||||||
|
|
||||||
TARBALL_URL="https://files.phpmyadmin.net/phpMyAdmin/${LATEST_VERSION}/phpMyAdmin-${LATEST_VERSION}-all-languages.tar.gz"
|
TARBALL_URL="https://files.phpmyadmin.net/phpMyAdmin/${LATEST_VERSION}/phpMyAdmin-${LATEST_VERSION}-all-languages.tar.gz"
|
||||||
msg_info "Downloading ${TARBALL_URL}"
|
msg_info "Downloading ${TARBALL_URL}"
|
||||||
tarball=$(mktemp)
|
if ! curl -fsSL "$TARBALL_URL" -o /tmp/phpmyadmin.tar.gz; then
|
||||||
if ! curl -fsSL "$TARBALL_URL" -o "$tarball"; then
|
|
||||||
msg_error "Download failed: $TARBALL_URL"
|
msg_error "Download failed: $TARBALL_URL"
|
||||||
exit 115
|
exit 115
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p "$INSTALL_DIR"
|
mkdir -p "$INSTALL_DIR"
|
||||||
tar xf "$tarball" --strip-components=1 -C "$INSTALL_DIR"
|
tar xf /tmp/phpmyadmin.tar.gz --strip-components=1 -C "$INSTALL_DIR"
|
||||||
rm -f "$tarball"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function configure_phpmyadmin() {
|
function configure_phpmyadmin() {
|
||||||
@@ -217,7 +223,7 @@ function uninstall_phpmyadmin() {
|
|||||||
|
|
||||||
function update_phpmyadmin() {
|
function update_phpmyadmin() {
|
||||||
msg_info "Fetching latest phpMyAdmin release from GitHub"
|
msg_info "Fetching latest phpMyAdmin release from GitHub"
|
||||||
LATEST_VERSION_RAW=$(get_latest_github_release "phpmyadmin/phpmyadmin" false) || true
|
LATEST_VERSION_RAW=$(curl -s https://api.github.com/repos/phpmyadmin/phpmyadmin/releases/latest | grep tag_name | cut -d '"' -f4)
|
||||||
LATEST_VERSION=$(echo "$LATEST_VERSION_RAW" | sed -e 's/^RELEASE_//' -e 's/_/./g')
|
LATEST_VERSION=$(echo "$LATEST_VERSION_RAW" | sed -e 's/^RELEASE_//' -e 's/_/./g')
|
||||||
|
|
||||||
if [[ -z "$LATEST_VERSION" ]]; then
|
if [[ -z "$LATEST_VERSION" ]]; then
|
||||||
@@ -228,32 +234,36 @@ function update_phpmyadmin() {
|
|||||||
|
|
||||||
TARBALL_URL="https://files.phpmyadmin.net/phpMyAdmin/${LATEST_VERSION}/phpMyAdmin-${LATEST_VERSION}-all-languages.tar.gz"
|
TARBALL_URL="https://files.phpmyadmin.net/phpMyAdmin/${LATEST_VERSION}/phpMyAdmin-${LATEST_VERSION}-all-languages.tar.gz"
|
||||||
msg_info "Downloading ${TARBALL_URL}"
|
msg_info "Downloading ${TARBALL_URL}"
|
||||||
tarball=$(mktemp)
|
|
||||||
|
|
||||||
if ! curl -fsSL "$TARBALL_URL" -o "$tarball"; then
|
if ! curl -fsSL "$TARBALL_URL" -o /tmp/phpmyadmin.tar.gz; then
|
||||||
msg_error "Download failed: $TARBALL_URL"
|
msg_error "Download failed: $TARBALL_URL"
|
||||||
exit 115
|
exit 115
|
||||||
fi
|
fi
|
||||||
|
|
||||||
BACKUP_DIR="/opt/phpmyadmin_backup"
|
BACKUP_DIR="/tmp/phpmyadmin-backup-$(date +%Y%m%d-%H%M%S)"
|
||||||
create_backup \
|
mkdir -p "$BACKUP_DIR"
|
||||||
"$INSTALL_DIR/config.inc.php" \
|
BACKUP_ITEMS=("config.inc.php" "upload" "save" "tmp" "themes")
|
||||||
"$INSTALL_DIR/upload" \
|
|
||||||
"$INSTALL_DIR/save" \
|
|
||||||
"$INSTALL_DIR/tmp" \
|
|
||||||
"$INSTALL_DIR/themes"
|
|
||||||
|
|
||||||
tar xf "$tarball" --strip-components=1 -C "$INSTALL_DIR"
|
msg_info "Backing up existing phpMyAdmin data"
|
||||||
rm -f "$tarball"
|
for item in "${BACKUP_ITEMS[@]}"; do
|
||||||
|
[[ -e "$INSTALL_DIR/$item" ]] && cp -a "$INSTALL_DIR/$item" "$BACKUP_DIR/" && echo " ↪︎ $item"
|
||||||
|
done
|
||||||
|
msg_ok "Backup completed: $BACKUP_DIR"
|
||||||
|
|
||||||
|
tar xf /tmp/phpmyadmin.tar.gz --strip-components=1 -C "$INSTALL_DIR"
|
||||||
msg_ok "Extracted phpMyAdmin $LATEST_VERSION"
|
msg_ok "Extracted phpMyAdmin $LATEST_VERSION"
|
||||||
|
|
||||||
restore_backup
|
msg_info "Restoring preserved files"
|
||||||
|
for item in "${BACKUP_ITEMS[@]}"; do
|
||||||
|
[[ -e "$BACKUP_DIR/$item" ]] && cp -a "$BACKUP_DIR/$item" "$INSTALL_DIR/" && echo " ↪︎ $item restored"
|
||||||
|
done
|
||||||
|
msg_ok "Restoration completed"
|
||||||
|
|
||||||
configure_phpmyadmin
|
configure_phpmyadmin
|
||||||
}
|
}
|
||||||
|
|
||||||
if is_phpmyadmin_installed; then
|
if is_phpmyadmin_installed; then
|
||||||
msg_warn "${APP} is already installed at ${INSTALL_DIR}."
|
echo -e "${YW}⚠️ ${APP} is already installed at ${INSTALL_DIR}.${CL}"
|
||||||
read -r -p "Would you like to Update (1), Uninstall (2) or Cancel (3)? [1/2/3]: " action
|
read -r -p "Would you like to Update (1), Uninstall (2) or Cancel (3)? [1/2/3]: " action
|
||||||
action="${action//[[:space:]]/}"
|
action="${action//[[:space:]]/}"
|
||||||
case "$action" in
|
case "$action" in
|
||||||
@@ -265,11 +275,11 @@ if is_phpmyadmin_installed; then
|
|||||||
uninstall_phpmyadmin
|
uninstall_phpmyadmin
|
||||||
;;
|
;;
|
||||||
3)
|
3)
|
||||||
msg_warn "Action cancelled. Exiting."
|
echo -e "${YW}⚠️ Action cancelled. Exiting.${CL}"
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
msg_warn "Invalid input. Exiting."
|
echo -e "${YW}⚠️ Invalid input. Exiting.${CL}"
|
||||||
exit 112
|
exit 112
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -282,12 +292,12 @@ else
|
|||||||
install_phpmyadmin
|
install_phpmyadmin
|
||||||
configure_phpmyadmin
|
configure_phpmyadmin
|
||||||
if [[ "$OS" == "Debian" ]]; then
|
if [[ "$OS" == "Debian" ]]; then
|
||||||
msg_ok "${APP} is reachable at: ${BL}http://${IP}/phpMyAdmin${CL}"
|
echo -e "${CM} ${GN}${APP} is reachable at: ${BL}http://${IP}/phpMyAdmin${CL}"
|
||||||
else
|
else
|
||||||
msg_ok "${APP} is reachable at: ${BL}http://${IP}/${CL}"
|
echo -e "${CM} ${GN}${APP} is reachable at: ${BL}http://${IP}/${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
msg_warn "Installation skipped. Exiting."
|
echo -e "${YW}⚠️ Installation skipped. Exiting.${CL}"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
+47
-38
@@ -5,30 +5,40 @@
|
|||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Source: https://pyenv.run/ | Github: https://github.com/pyenv/pyenv
|
# Source: https://pyenv.run/ | Github: https://github.com/pyenv/pyenv
|
||||||
|
|
||||||
APP="pyenv"
|
set -e
|
||||||
APP_TYPE="addon"
|
YW=$(echo "\033[33m")
|
||||||
|
RD=$(echo "\033[01;31m")
|
||||||
|
BL=$(echo "\033[36m")
|
||||||
|
GN=$(echo "\033[1;92m")
|
||||||
|
CL=$(echo "\033[m")
|
||||||
|
CM="${GN}✓${CL}"
|
||||||
|
CROSS="${RD}✗${CL}"
|
||||||
|
BFR="\\r\\033[K"
|
||||||
|
HOLD="-"
|
||||||
|
function msg_info() {
|
||||||
|
local msg="$1"
|
||||||
|
echo -ne " ${HOLD} ${YW}${msg}..."
|
||||||
|
}
|
||||||
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/core.func)
|
function msg_ok() {
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
|
local msg="$1"
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/error_handler.func)
|
echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
|
||||||
|
}
|
||||||
|
function msg_error() {
|
||||||
|
local msg="$1"
|
||||||
|
echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Telemetry
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
|
||||||
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "pyenv" "addon"
|
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "pyenv" "addon"
|
||||||
|
|
||||||
# Enable error handling
|
|
||||||
set -Eeuo pipefail
|
|
||||||
trap 'error_handler' ERR
|
|
||||||
|
|
||||||
# Initialize all core functions (colors, formatting, icons, STD mode)
|
|
||||||
load_functions
|
|
||||||
|
|
||||||
if command -v pveversion >/dev/null 2>&1; then
|
if command -v pveversion >/dev/null 2>&1; then
|
||||||
msg_error "Can't Install on Proxmox "
|
msg_error "Can't Install on Proxmox "
|
||||||
exit 1
|
exit
|
||||||
fi
|
fi
|
||||||
get_lxc_ip
|
msg_info "Installing pyenv"
|
||||||
msg_info "Installing ${APP}"
|
apt-get install -y \
|
||||||
$STD apt update
|
|
||||||
$STD apt install -y \
|
|
||||||
make \
|
make \
|
||||||
build-essential \
|
build-essential \
|
||||||
libjpeg-dev \
|
libjpeg-dev \
|
||||||
@@ -52,18 +62,18 @@ $STD apt install -y \
|
|||||||
libopenjp2-7 \
|
libopenjp2-7 \
|
||||||
libtiff5 \
|
libtiff5 \
|
||||||
libturbojpeg0-dev \
|
libturbojpeg0-dev \
|
||||||
liblzma-dev
|
liblzma-dev &>/dev/null
|
||||||
|
|
||||||
$STD git clone https://github.com/pyenv/pyenv.git ~/.pyenv
|
git clone https://github.com/pyenv/pyenv.git ~/.pyenv &>/dev/null
|
||||||
set +Eeuo pipefail
|
set +e
|
||||||
echo 'export PYENV_ROOT="$HOME/.pyenv"' >>~/.bashrc
|
echo 'export PYENV_ROOT="$HOME/.pyenv"' >>~/.bashrc
|
||||||
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >>~/.bashrc
|
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >>~/.bashrc
|
||||||
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init --path)"\nfi' >>~/.bashrc
|
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init --path)"\nfi' >>~/.bashrc
|
||||||
msg_ok "Installed ${APP}"
|
msg_ok "Installed pyenv"
|
||||||
. ~/.bashrc
|
. ~/.bashrc
|
||||||
set -Eeuo pipefail
|
set -e
|
||||||
msg_info "Installing Python 3.11.1"
|
msg_info "Installing Python 3.11.1"
|
||||||
$STD pyenv install 3.11.1
|
pyenv install 3.11.1 &>/dev/null
|
||||||
pyenv global 3.11.1
|
pyenv global 3.11.1
|
||||||
msg_ok "Installed Python 3.11.1"
|
msg_ok "Installed Python 3.11.1"
|
||||||
read -r -p "Would you like to install Home Assistant Beta? <y/N> " prompt
|
read -r -p "Would you like to install Home Assistant Beta? <y/N> " prompt
|
||||||
@@ -85,13 +95,13 @@ EOF
|
|||||||
cd /srv/homeassistant
|
cd /srv/homeassistant
|
||||||
python3 -m venv .
|
python3 -m venv .
|
||||||
source bin/activate
|
source bin/activate
|
||||||
$STD python3 -m pip install wheel
|
python3 -m pip install wheel &>/dev/null
|
||||||
$STD pip3 install --upgrade pip
|
pip3 install --upgrade pip &>/dev/null
|
||||||
$STD pip3 install psycopg2-binary
|
pip3 install psycopg2-binary &>/dev/null
|
||||||
$STD pip3 install --pre homeassistant
|
pip3 install --pre homeassistant &>/dev/null
|
||||||
systemctl enable homeassistant &>/dev/null
|
systemctl enable homeassistant &>/dev/null
|
||||||
msg_ok "Installed Home Assistant Beta"
|
msg_ok "Installed Home Assistant Beta"
|
||||||
echo -e " Go to ${LOCAL_IP}:8123"
|
echo -e " Go to $(hostname -I | awk '{print $1}'):8123"
|
||||||
hass
|
hass
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -102,9 +112,9 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
|||||||
cd /srv/esphome
|
cd /srv/esphome
|
||||||
python3 -m venv .
|
python3 -m venv .
|
||||||
source bin/activate
|
source bin/activate
|
||||||
$STD python3 -m pip install wheel
|
python3 -m pip install wheel &>/dev/null
|
||||||
$STD pip3 install --upgrade pip
|
pip3 install --upgrade pip &>/dev/null
|
||||||
$STD pip3 install --pre esphome
|
pip3 install --pre esphome &>/dev/null
|
||||||
cat <<EOF >/srv/esphome/start.sh
|
cat <<EOF >/srv/esphome/start.sh
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
@@ -133,26 +143,25 @@ WantedBy=multi-user.target
|
|||||||
EOF
|
EOF
|
||||||
systemctl enable --now esphomedashboard &>/dev/null
|
systemctl enable --now esphomedashboard &>/dev/null
|
||||||
msg_ok "Installed ESPHome Beta"
|
msg_ok "Installed ESPHome Beta"
|
||||||
echo -e " Go to ${LOCAL_IP}:6052"
|
echo -e " Go to $(hostname -I | awk '{print $1}'):6052"
|
||||||
exec $SHELL
|
exec $SHELL
|
||||||
fi
|
fi
|
||||||
|
|
||||||
read -r -p "Would you like to install Matter-Server (Beta)? <y/N> " prompt
|
read -r -p "Would you like to install Matter-Server (Beta)? <y/N> " prompt
|
||||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||||
msg_info "Installing Matter Server"
|
msg_info "Installing Matter Server"
|
||||||
$STD apt install -y \
|
apt-get install -y \
|
||||||
libcairo2-dev \
|
libcairo2-dev \
|
||||||
libjpeg62-turbo-dev \
|
libjpeg62-turbo-dev \
|
||||||
libgirepository1.0-dev \
|
libgirepository1.0-dev \
|
||||||
libpango1.0-dev \
|
libpango1.0-dev \
|
||||||
libgif-dev \
|
libgif-dev \
|
||||||
g++
|
g++ &>/dev/null
|
||||||
$STD python3 -m pip install wheel
|
python3 -m pip install wheel
|
||||||
$STD pip3 install --upgrade pip
|
pip3 install --upgrade pip
|
||||||
$STD pip install python-matter-server[server]
|
pip install python-matter-server[server]
|
||||||
msg_ok "Installed Matter Server"
|
msg_ok "Installed Matter Server"
|
||||||
echo -e "Start server > python -m matter_server.server"
|
echo -e "Start server > python -m matter_server.server"
|
||||||
fi
|
fi
|
||||||
msg_ok "\nFinished\n"
|
msg_ok "\nFinished\n"
|
||||||
exec $SHELL
|
exec $SHELL
|
||||||
|
|
||||||
|
|||||||
+39
-31
@@ -5,22 +5,6 @@
|
|||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Source: https://www.webmin.com/ | Github: https://github.com/webmin/webmin
|
# Source: https://www.webmin.com/ | Github: https://github.com/webmin/webmin
|
||||||
|
|
||||||
APP="Webmin"
|
|
||||||
APP_TYPE="addon"
|
|
||||||
|
|
||||||
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/tools.func)
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/error_handler.func)
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
|
|
||||||
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "webmin" "addon"
|
|
||||||
|
|
||||||
# Enable error handling
|
|
||||||
set -Eeuo pipefail
|
|
||||||
trap 'error_handler' ERR
|
|
||||||
|
|
||||||
# Initialize all core functions (colors, formatting, icons, STD mode)
|
|
||||||
load_functions
|
|
||||||
|
|
||||||
function header_info {
|
function header_info {
|
||||||
clear
|
clear
|
||||||
cat <<"EOF"
|
cat <<"EOF"
|
||||||
@@ -31,27 +15,51 @@ function header_info {
|
|||||||
|
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
set -eEuo pipefail
|
||||||
|
YW=$(echo "\033[33m")
|
||||||
|
BL=$(echo "\033[36m")
|
||||||
|
BGN=$(echo "\033[4;92m")
|
||||||
|
GN=$(echo "\033[1;92m")
|
||||||
|
DGN=$(echo "\033[32m")
|
||||||
|
CL=$(echo "\033[m")
|
||||||
|
CM="${GN}✓${CL}"
|
||||||
|
BFR="\\r\\033[K"
|
||||||
|
HOLD="-"
|
||||||
|
|
||||||
|
msg_info() {
|
||||||
|
local msg="$1"
|
||||||
|
echo -ne " ${HOLD} ${YW}${msg}..."
|
||||||
|
}
|
||||||
|
|
||||||
|
msg_ok() {
|
||||||
|
local msg="$1"
|
||||||
|
echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Telemetry
|
||||||
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
|
||||||
|
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "webmin" "addon"
|
||||||
|
|
||||||
header_info
|
header_info
|
||||||
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} Installer" --yesno "This Will Install ${APP} on this LXC Container. Proceed?" 10 58
|
whiptail --backtitle "Proxmox VE Helper Scripts" --title "Webmin Installer" --yesno "This Will Install Webmin on this LXC Container. Proceed?" 10 58
|
||||||
|
|
||||||
msg_info "Installing Prerequisites"
|
msg_info "Installing Prerequisites"
|
||||||
$STD apt update
|
apt update &>/dev/null
|
||||||
$STD apt install -y \
|
apt-get -y install libnet-ssleay-perl libauthen-pam-perl libio-pty-perl unzip shared-mime-info curl &>/dev/null
|
||||||
libnet-ssleay-perl \
|
|
||||||
libauthen-pam-perl \
|
|
||||||
libio-pty-perl \
|
|
||||||
unzip \
|
|
||||||
shared-mime-info \
|
|
||||||
curl
|
|
||||||
msg_ok "Installed Prerequisites"
|
msg_ok "Installed Prerequisites"
|
||||||
|
|
||||||
msg_info "Installing ${APP}"
|
LATEST=$(curl -fsSL https://api.github.com/repos/webmin/webmin/releases/latest | grep '"tag_name":' | cut -d'"' -f4)
|
||||||
fetch_and_deploy_gh_release "webmin" "webmin/webmin" "binary" "latest" "/opt/webmin" "webmin_*_all.deb"
|
|
||||||
|
msg_info "Downloading Webmin"
|
||||||
|
curl -fsSL "https://github.com/webmin/webmin/releases/download/$LATEST/webmin_${LATEST}_all.deb" -o $(basename "https://github.com/webmin/webmin/releases/download/$LATEST/webmin_${LATEST}_all.deb")
|
||||||
|
msg_ok "Downloaded Webmin"
|
||||||
|
|
||||||
|
msg_info "Installing Webmin"
|
||||||
|
dpkg -i webmin_${LATEST}_all.deb &>/dev/null
|
||||||
/usr/share/webmin/changepass.pl /etc/webmin root root &>/dev/null
|
/usr/share/webmin/changepass.pl /etc/webmin root root &>/dev/null
|
||||||
msg_ok "Installed ${APP}"
|
rm -rf /root/webmin_${LATEST}_all.deb
|
||||||
|
msg_ok "Installed Webmin"
|
||||||
get_lxc_ip
|
|
||||||
echo -e "Successfully Installed!! ${APP} should be reachable by going to ${BL}https://${LOCAL_IP}:10000${CL}"
|
|
||||||
|
|
||||||
|
IP=$(hostname -I | cut -f1 -d ' ')
|
||||||
|
echo -e "Successfully Installed!! Webmin should be reachable by going to ${BL}https://${IP}:10000${CL}"
|
||||||
|
|||||||
Reference in New Issue
Block a user