mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-02-04 20:33:24 +01:00
Compare commits
144 Commits
refactor/t
...
2026-01-05
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
65063f9f5f | ||
|
|
467fba7d0e | ||
|
|
9d7ec0e91a | ||
|
|
91ce09982c | ||
|
|
337fa761fe | ||
|
|
22643791ec | ||
|
|
312454fa68 | ||
|
|
a761c05fc5 | ||
|
|
0eccb274d5 | ||
|
|
91234cc835 | ||
|
|
8bbbdf4c41 | ||
|
|
c4b9cd465a | ||
|
|
7ef1dd7111 | ||
|
|
28a68384c1 | ||
|
|
3a35cc8282 | ||
|
|
0e2bbc2733 | ||
|
|
b1b0f47eaa | ||
|
|
32927d903e | ||
|
|
66808d03a8 | ||
|
|
b59e04fa94 | ||
|
|
cc1117db5d | ||
|
|
a1005795fc | ||
|
|
4f2fb3c6cc | ||
|
|
cd8991875b | ||
|
|
c6a2548f10 | ||
|
|
ad22b8ddd4 | ||
|
|
03f805e54b | ||
|
|
5f67c385b8 | ||
|
|
eeb4c0a860 | ||
|
|
266a23d319 | ||
|
|
7cafd046ca | ||
|
|
41c8c4ce0b | ||
|
|
a4f62116c9 | ||
|
|
3cd02aac77 | ||
|
|
aebb4c3a55 | ||
|
|
a30c6fc3a9 | ||
|
|
dbe2c553fe | ||
|
|
195f073ea3 | ||
|
|
57d43f1a94 | ||
|
|
11dced98c2 | ||
|
|
d025bf1cf6 | ||
|
|
7cd1546135 | ||
|
|
64e8aaab03 | ||
|
|
7c3e338aae | ||
|
|
f6eab1c6a0 | ||
|
|
254ea64c99 | ||
|
|
e02023a2fc | ||
|
|
3befc843c1 | ||
|
|
7a88f38789 | ||
|
|
d8788bd935 | ||
|
|
a5f4ab4c71 | ||
|
|
de1bc809eb | ||
|
|
09899b2824 | ||
|
|
1739745aca | ||
|
|
450c116723 | ||
|
|
e93e87b0bc | ||
|
|
136e3f0405 | ||
|
|
bf1b43ecf5 | ||
|
|
7d3437d4b3 | ||
|
|
12599f359f | ||
|
|
8c0fda523e | ||
|
|
eb9cee4fab | ||
|
|
f464d9d4cb | ||
|
|
6faef00835 | ||
|
|
df5cc68ea1 | ||
|
|
cd2acd93cd | ||
|
|
b208b2a20d | ||
|
|
ca5cd83c40 | ||
|
|
12767b4ffa | ||
|
|
ded7da536d | ||
|
|
e351925119 | ||
|
|
2ccbf11741 | ||
|
|
53a2635240 | ||
|
|
1f5191c071 | ||
|
|
9b7cfcff73 | ||
|
|
b7e2706eff | ||
|
|
2d859aba23 | ||
|
|
76f20024f3 | ||
|
|
bf35ad0d21 | ||
|
|
8bac0e66f4 | ||
|
|
72a7777328 | ||
|
|
8dbc4161c7 | ||
|
|
49f92e1cf4 | ||
|
|
0fba391aa6 | ||
|
|
fd60467db9 | ||
|
|
8ea1ec247e | ||
|
|
08eded6e37 | ||
|
|
e9b22f04ab | ||
|
|
eb5a1cb9f7 | ||
|
|
f4ceff8d8e | ||
|
|
4e988a7d60 | ||
|
|
8839ad5127 | ||
|
|
784e4171ce | ||
|
|
cb4ab231b9 | ||
|
|
95cb440b2e | ||
|
|
e4eea7a6ae | ||
|
|
2cc54fdbdf | ||
|
|
86069a1663 | ||
|
|
78b4f44447 | ||
|
|
62ca1552a8 | ||
|
|
eba6fd8c6d | ||
|
|
0cefe4c5c5 | ||
|
|
57295c31ab | ||
|
|
5a43b901b5 | ||
|
|
f7d013287b | ||
|
|
6b1a7228d3 | ||
|
|
9667c7a17e | ||
|
|
b4a25160e4 | ||
|
|
547043e842 | ||
|
|
1d278f53f6 | ||
|
|
a471006c3d | ||
|
|
7b08f8d8a2 | ||
|
|
cc8bb3ec9f | ||
|
|
8c02a1023f | ||
|
|
e17a42f905 | ||
|
|
bef77dde87 | ||
|
|
59a752a6ab | ||
|
|
99a7f30b06 | ||
|
|
a1586a748d | ||
|
|
9a5d121910 | ||
|
|
dfb4e00550 | ||
|
|
d095da7949 | ||
|
|
73c626bd3c | ||
|
|
7bfb9447b2 | ||
|
|
8526a25541 | ||
|
|
5671d554f1 | ||
|
|
1962eb3d5b | ||
|
|
2f7c54b827 | ||
|
|
e912ef1e7d | ||
|
|
6251b24eff | ||
|
|
6fa0d47ff2 | ||
|
|
1cab60ac6a | ||
|
|
0e89a65597 | ||
|
|
183b92dc4b | ||
|
|
375076d294 | ||
|
|
9582910787 | ||
|
|
046e50778c | ||
|
|
1d34ecc981 | ||
|
|
c62b78f34b | ||
|
|
fcfb4e9f4b | ||
|
|
a25a469177 | ||
|
|
e5943404f9 | ||
|
|
023a6e54a4 | ||
|
|
bbc326ec23 |
199
CHANGELOG.md
199
CHANGELOG.md
@@ -10,8 +10,207 @@
|
||||
> [!CAUTION]
|
||||
Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit the project's popularity for potentially malicious purposes.
|
||||
|
||||
## 2026-01-06
|
||||
|
||||
## 2026-01-05
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- reitti: add postgis extension to PostgreSQL DB setup [@MickLesk](https://github.com/MickLesk) ([#10555](https://github.com/community-scripts/ProxmoxVE/pull/10555))
|
||||
- openWRT: separate disk attachment and resizing in VM setup [@MickLesk](https://github.com/MickLesk) ([#10557](https://github.com/community-scripts/ProxmoxVE/pull/10557))
|
||||
- paperless-ai: Set TMPDIR for pip to use disk during install [@MickLesk](https://github.com/MickLesk) ([#10559](https://github.com/community-scripts/ProxmoxVE/pull/10559))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- Refactor: Monica [@tremor021](https://github.com/tremor021) ([#10552](https://github.com/community-scripts/ProxmoxVE/pull/10552))
|
||||
- Upgrade Wazuh LXC Container to Debian 13 [@heinemannj](https://github.com/heinemannj) ([#10551](https://github.com/community-scripts/ProxmoxVE/pull/10551))
|
||||
- Upgrade evcc LXC to Debian 13 [@heinemannj](https://github.com/heinemannj) ([#10548](https://github.com/community-scripts/ProxmoxVE/pull/10548))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- Harden setup_hwaccel for old Intel GPUs [@MickLesk](https://github.com/MickLesk) ([#10556](https://github.com/community-scripts/ProxmoxVE/pull/10556))
|
||||
|
||||
### 🧰 Tools
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- Refactor: IP-Tag (Multiple IP / Performance / Execution Time) [@MickLesk](https://github.com/MickLesk) ([#10558](https://github.com/community-scripts/ProxmoxVE/pull/10558))
|
||||
|
||||
## 2026-01-04
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- PocketID: Update PocketID for 2.x [@tremor021](https://github.com/tremor021) ([#10506](https://github.com/community-scripts/ProxmoxVE/pull/10506))
|
||||
- fix: reitti: nginx [@CrazyWolf13](https://github.com/CrazyWolf13) ([#10511](https://github.com/community-scripts/ProxmoxVE/pull/10511))
|
||||
- MagicMirror: bump to nodejs 24 [@MickLesk](https://github.com/MickLesk) ([#10534](https://github.com/community-scripts/ProxmoxVE/pull/10534))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- Refactor: SFTPGo [@tremor021](https://github.com/tremor021) ([#10518](https://github.com/community-scripts/ProxmoxVE/pull/10518))
|
||||
- Refactor: Pelican Wings [@tremor021](https://github.com/tremor021) ([#10517](https://github.com/community-scripts/ProxmoxVE/pull/10517))
|
||||
- Refactor: Pelican Panel [@tremor021](https://github.com/tremor021) ([#10516](https://github.com/community-scripts/ProxmoxVE/pull/10516))
|
||||
- Refactor: Audiobookshelf [@tremor021](https://github.com/tremor021) ([#10519](https://github.com/community-scripts/ProxmoxVE/pull/10519))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Export IPV6_METHOD to trigger verb_ip6() function [@remz1337](https://github.com/remz1337) ([#10538](https://github.com/community-scripts/ProxmoxVE/pull/10538))
|
||||
|
||||
### 🌐 Website
|
||||
|
||||
- #### 📝 Script Information
|
||||
|
||||
- Prowlarr: Update config_path [@tremor021](https://github.com/tremor021) ([#10504](https://github.com/community-scripts/ProxmoxVE/pull/10504))
|
||||
|
||||
## 2026-01-03
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Fix ownership and permissions for InvoiceNinja setup [@twinzdragonz](https://github.com/twinzdragonz) ([#10298](https://github.com/community-scripts/ProxmoxVE/pull/10298))
|
||||
- Fix headscale Caddyfile to pass non-API URLs [@IlyaSemenov](https://github.com/IlyaSemenov) ([#10493](https://github.com/community-scripts/ProxmoxVE/pull/10493))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- [core]: Preserve log files [@tremor021](https://github.com/tremor021) ([#10509](https://github.com/community-scripts/ProxmoxVE/pull/10509))
|
||||
|
||||
### ❔ Uncategorized
|
||||
|
||||
- Wireguard: Update WGDashboard notes URL to the new link [@tremor021](https://github.com/tremor021) ([#10496](https://github.com/community-scripts/ProxmoxVE/pull/10496))
|
||||
- InvoiceNinja: Update database credentias information [@tremor021](https://github.com/tremor021) ([#10497](https://github.com/community-scripts/ProxmoxVE/pull/10497))
|
||||
|
||||
## 2026-01-02
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Fix Intel Level Zero package conflict on Debian 13 [@Copilot](https://github.com/Copilot) ([#10467](https://github.com/community-scripts/ProxmoxVE/pull/10467))
|
||||
|
||||
### ❔ Uncategorized
|
||||
|
||||
- Extend guidance for changing the immich upload location for #10447 [@jshprentz](https://github.com/jshprentz) ([#10475](https://github.com/community-scripts/ProxmoxVE/pull/10475))
|
||||
|
||||
## 2026-01-01
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- fix(sabnzbd): update script now migrates old service files to use venv Python [@vidonnus](https://github.com/vidonnus) ([#10466](https://github.com/community-scripts/ProxmoxVE/pull/10466))
|
||||
- fix(bazarr): update script now migrates old service files to use venv Python [@vidonnus](https://github.com/vidonnus) ([#10459](https://github.com/community-scripts/ProxmoxVE/pull/10459))
|
||||
- fix #10453 broken sonarqube update [@Karlito83](https://github.com/Karlito83) ([#10456](https://github.com/community-scripts/ProxmoxVE/pull/10456))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Fix MariaDB runtime directory persistence on container reboot [@Copilot](https://github.com/Copilot) ([#10468](https://github.com/community-scripts/ProxmoxVE/pull/10468))
|
||||
|
||||
## 2025-12-31
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- fix(wazuh): add LXC rootcheck exclusion to prevent false positives [@brettlyons](https://github.com/brettlyons) ([#10436](https://github.com/community-scripts/ProxmoxVE/pull/10436))
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Increase BentoPDF RAM requirement from 2GB to 4GB [@Copilot](https://github.com/Copilot) ([#10449](https://github.com/community-scripts/ProxmoxVE/pull/10449))
|
||||
- fix(swizzin): Use HTTPS and add curl error handling [@fmcglinn](https://github.com/fmcglinn) ([#10440](https://github.com/community-scripts/ProxmoxVE/pull/10440))
|
||||
|
||||
## 2025-12-30
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- Unlink default nginx config [@iLikeToCode](https://github.com/iLikeToCode) ([#10432](https://github.com/community-scripts/ProxmoxVE/pull/10432))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- Refactor: Firefly [@tremor021](https://github.com/tremor021) ([#10421](https://github.com/community-scripts/ProxmoxVE/pull/10421))
|
||||
|
||||
### 🗑️ Deleted Scripts
|
||||
|
||||
- Remove: GoAway [@MickLesk](https://github.com/MickLesk) ([#10429](https://github.com/community-scripts/ProxmoxVE/pull/10429))
|
||||
|
||||
## 2025-12-29
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- syncthing: check for deb822 source [@MickLesk](https://github.com/MickLesk) ([#10414](https://github.com/community-scripts/ProxmoxVE/pull/10414))
|
||||
- speedtest-tracker: add external IP URL and internet check hostname in .env [@MickLesk](https://github.com/MickLesk) ([#10078](https://github.com/community-scripts/ProxmoxVE/pull/10078))
|
||||
- Pelican-panel: prevent composer superuser prompt [@MickLesk](https://github.com/MickLesk) ([#10418](https://github.com/community-scripts/ProxmoxVE/pull/10418))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- add libmfx-gen1.2 for intel gpu hwaccel [@jcnix](https://github.com/jcnix) ([#10400](https://github.com/community-scripts/ProxmoxVE/pull/10400))
|
||||
|
||||
## 2025-12-28
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- Mail-Archiver ([#10393](https://github.com/community-scripts/ProxmoxVE/pull/10393))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Fix mongodb update logic [@durzo](https://github.com/durzo) ([#10388](https://github.com/community-scripts/ProxmoxVE/pull/10388))
|
||||
- fix pulse downloading incorrect tarball [@durzo](https://github.com/durzo) ([#10383](https://github.com/community-scripts/ProxmoxVE/pull/10383))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- Linkwarden: enable Corepack and prepare Yarn v4 before running yarn [@MickLesk](https://github.com/MickLesk) ([#10390](https://github.com/community-scripts/ProxmoxVE/pull/10390))
|
||||
- metube: use pnpm + corepack for frontend build [@MickLesk](https://github.com/MickLesk) ([#10392](https://github.com/community-scripts/ProxmoxVE/pull/10392))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Set default LANG in locale configuration [@jamezpolley](https://github.com/jamezpolley) ([#10378](https://github.com/community-scripts/ProxmoxVE/pull/10378))
|
||||
|
||||
### ❔ Uncategorized
|
||||
|
||||
- Updated Frontend Debian and Ubuntu VM notes so links can be copied quickly. [@mzb2xeo](https://github.com/mzb2xeo) ([#10379](https://github.com/community-scripts/ProxmoxVE/pull/10379))
|
||||
|
||||
## 2025-12-27
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- nextcloud-exporter ([#10314](https://github.com/community-scripts/ProxmoxVE/pull/10314))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Dotnet ASP Web API: Fix need for verbose [@tremor021](https://github.com/tremor021) ([#10368](https://github.com/community-scripts/ProxmoxVE/pull/10368))
|
||||
- Npm: fix build for 2.13.5 [@durzo](https://github.com/durzo) ([#10340](https://github.com/community-scripts/ProxmoxVE/pull/10340))
|
||||
- Outline: Fix for database connection string [@tremor021](https://github.com/tremor021) ([#10359](https://github.com/community-scripts/ProxmoxVE/pull/10359))
|
||||
|
||||
## 2025-12-26
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- phpipam: use PHP 8.4 with correct mysql module for PDO support [@MickLesk](https://github.com/MickLesk) ([#10348](https://github.com/community-scripts/ProxmoxVE/pull/10348))
|
||||
- hyperion: increase disk to 4GB and tools.func: fix /root/. path error [@MickLesk](https://github.com/MickLesk) ([#10349](https://github.com/community-scripts/ProxmoxVE/pull/10349))
|
||||
|
||||
### ❔ Uncategorized
|
||||
|
||||
- fix: zoraxy: category [@CrazyWolf13](https://github.com/CrazyWolf13) ([#10344](https://github.com/community-scripts/ProxmoxVE/pull/10344))
|
||||
|
||||
@@ -11,7 +11,7 @@ var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-5}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-12}"
|
||||
var_version="${var_version:-13}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
@@ -30,7 +30,7 @@ function update_script() {
|
||||
|
||||
msg_info "Updating $APP LXC"
|
||||
$STD apt-get update
|
||||
$STD apt-get -y upgrade
|
||||
$STD apt-get upgrade -y
|
||||
msg_ok "Updated $APP LXC"
|
||||
msg_ok "Updated successfully!"
|
||||
exit
|
||||
|
||||
@@ -38,8 +38,13 @@ function update_script() {
|
||||
msg_info "Setup Bazarr"
|
||||
mkdir -p /var/lib/bazarr/
|
||||
chmod 775 /opt/bazarr /var/lib/bazarr/
|
||||
# Always ensure venv exists
|
||||
if [[ ! -d /opt/bazarr/venv/ ]]; then
|
||||
$STD uv venv /opt/bazarr/venv --python 3.12
|
||||
fi
|
||||
|
||||
# Always check and fix service file if needed
|
||||
if [[ -f /etc/systemd/system/bazarr.service ]] && grep -q "ExecStart=/usr/bin/python3" /etc/systemd/system/bazarr.service; then
|
||||
sed -i "s|ExecStart=/usr/bin/python3 /opt/bazarr/bazarr.py|ExecStart=/opt/bazarr/venv/bin/python3 /opt/bazarr/bazarr.py|g" /etc/systemd/system/bazarr.service
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
|
||||
@@ -8,7 +8,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
||||
APP="BentoPDF"
|
||||
var_tags="${var_tags:-pdf-editor}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_ram="${var_ram:-4096}"
|
||||
var_disk="${var_disk:-4}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
|
||||
@@ -11,7 +11,7 @@ var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-4096}"
|
||||
var_disk="${var_disk:-20}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-12}"
|
||||
var_version="${var_version:-13}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
var_gpu="${var_gpu:-yes}"
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-1024}"
|
||||
var_disk="${var_disk:-4}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-12}"
|
||||
var_version="${var_version:-13}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
|
||||
@@ -11,7 +11,7 @@ var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-1024}"
|
||||
var_disk="${var_disk:-2}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-12}"
|
||||
var_version="${var_version:-13}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
@@ -73,17 +73,13 @@ function update_script() {
|
||||
msg_ok "Updated Firefly"
|
||||
|
||||
if [[ "${IMPORTER_INSTALLED:-0}" -eq 1 ]]; then
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "dataimporter" "firefly-iii/data-importer" "prebuild" "latest" "/opt/firefly/dataimporter" "DataImporter-v*.tar.gz"
|
||||
|
||||
msg_info "Updating Firefly Importer"
|
||||
IMPORTER_RELEASE=$(curl -fsSL https://api.github.com/repos/firefly-iii/data-importer/releases/latest | grep tag_name | cut -d '"' -f 4 | sed 's/v//')
|
||||
rm -rf /opt/firefly/dataimporter
|
||||
mkdir -p /opt/firefly/dataimporter
|
||||
curl -fsSL "https://github.com/firefly-iii/data-importer/releases/download/v${IMPORTER_RELEASE}/DataImporter-v${IMPORTER_RELEASE}.tar.gz" -o "/opt/DataImporter.tar.gz"
|
||||
tar -xzf /opt/DataImporter.tar.gz -C /opt/firefly/dataimporter
|
||||
if [[ -f /opt/dataimporter.env ]]; then
|
||||
cp /opt/dataimporter.env /opt/firefly/dataimporter/.env
|
||||
fi
|
||||
chown -R www-data:www-data /opt/firefly/dataimporter
|
||||
rm -f /opt/DataImporter.tar.gz
|
||||
msg_ok "Updated Firefly Importer"
|
||||
fi
|
||||
systemctl start apache2
|
||||
|
||||
54
ct/goaway.sh
54
ct/goaway.sh
@@ -1,54 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: Slaviša Arežina (tremor021)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/pommee/goaway
|
||||
|
||||
APP="GoAway"
|
||||
var_tags="${var_tags:-network}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-1024}"
|
||||
var_disk="${var_disk:-4}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /opt/goaway ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "goaway" "pommee/goaway"; then
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop goaway
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
fetch_and_deploy_gh_release "goaway" "pommee/goaway" "prebuild" "latest" "/opt/goaway" "goaway_*_linux_amd64.tar.gz"
|
||||
|
||||
msg_info "Starting Services"
|
||||
systemctl start goaway
|
||||
msg_ok "Started Services"
|
||||
|
||||
msg_ok "Updated successfully!"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080${CL}"
|
||||
@@ -1,6 +0,0 @@
|
||||
______ ___
|
||||
/ ____/___ / |_ ______ ___ __
|
||||
/ / __/ __ \/ /| | | /| / / __ `/ / / /
|
||||
/ /_/ / /_/ / ___ | |/ |/ / /_/ / /_/ /
|
||||
\____/\____/_/ |_|__/|__/\__,_/\__, /
|
||||
/____/
|
||||
6
ct/headers/mail-archiver
Normal file
6
ct/headers/mail-archiver
Normal file
@@ -0,0 +1,6 @@
|
||||
__ ___ _ __ ___ __ _
|
||||
/ |/ /___ _(_) / / | __________/ /_ (_) _____ _____
|
||||
/ /|_/ / __ `/ / /_____/ /| | / ___/ ___/ __ \/ / | / / _ \/ ___/
|
||||
/ / / / /_/ / / /_____/ ___ |/ / / /__/ / / / /| |/ / __/ /
|
||||
/_/ /_/\__,_/_/_/ /_/ |_/_/ \___/_/ /_/_/ |___/\___/_/
|
||||
|
||||
@@ -9,7 +9,7 @@ APP="Hyperion"
|
||||
var_tags="${var_tags:-ambient-lightning}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-512}"
|
||||
var_disk="${var_disk:-2}"
|
||||
var_disk="${var_disk:-4}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
@@ -42,11 +42,23 @@ function update_script() {
|
||||
|
||||
fetch_and_deploy_gh_release "linkwarden" "linkwarden/linkwarden"
|
||||
|
||||
msg_info "Updating ${APP}"
|
||||
msg_info "Updating Linkwarden"
|
||||
cd /opt/linkwarden
|
||||
yarn_ver="4.12.0"
|
||||
if [[ -f package.json ]]; then
|
||||
pkg_manager=$(jq -r '.packageManager // empty' package.json 2>/dev/null || true)
|
||||
if [[ -n "$pkg_manager" && "$pkg_manager" == yarn@* ]]; then
|
||||
yarn_spec="${pkg_manager#yarn@}"
|
||||
yarn_ver="${yarn_spec%%+*}"
|
||||
fi
|
||||
fi
|
||||
if command -v corepack >/dev/null 2>&1; then
|
||||
$STD corepack enable
|
||||
$STD corepack prepare "yarn@${yarn_ver}" --activate || true
|
||||
fi
|
||||
$STD yarn
|
||||
$STD npx playwright install-deps
|
||||
$STD yarn playwright install
|
||||
$STD npx playwright install
|
||||
mv /opt/.env /opt/linkwarden/.env
|
||||
$STD yarn prisma:generate
|
||||
$STD yarn web:build
|
||||
@@ -55,7 +67,7 @@ function update_script() {
|
||||
rm -rf ~/.cargo/registry ~/.cargo/git ~/.cargo/.package-cache
|
||||
rm -rf /root/.cache/yarn
|
||||
rm -rf /opt/linkwarden/.next/cache
|
||||
msg_ok "Updated ${APP}"
|
||||
msg_ok "Updated Linkwarden"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start linkwarden
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
systemctl stop magicmirror
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
msg_info "Backing up data"
|
||||
rm -rf /opt/magicmirror-backup
|
||||
mkdir /opt/magicmirror-backup
|
||||
|
||||
71
ct/mail-archiver.sh
Normal file
71
ct/mail-archiver.sh
Normal file
@@ -0,0 +1,71 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: Slaviša Arežina (tremor021)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/s1t5/mail-archiver
|
||||
|
||||
APP="Mail-Archiver"
|
||||
var_tags="${var_tags:-mail-archiver}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-8}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /opt/mail-archiver ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "mail-archiver" "s1t5/mail-archiver"; then
|
||||
msg_info "Stopping Mail-Archiver"
|
||||
systemctl stop mail-archiver
|
||||
msg_ok "Stopped Mail-Archiver"
|
||||
|
||||
msg_info "Creating Backup"
|
||||
cp /opt/mail-archiver/appsettings.json /opt/mail-archiver/.env /opt/
|
||||
[[ -d /opt/mail-archiver/DataProtection-Keys ]] && cp -r /opt/mail-archiver/DataProtection-Keys /opt
|
||||
msg_ok "Created Backup"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "mail-archiver" "s1t5/mail-archiver" "tarball"
|
||||
|
||||
msg_info "Updating Mail-Archiver"
|
||||
mv /opt/mail-archiver /opt/mail-archiver-build
|
||||
cd /opt/mail-archiver-build
|
||||
$STD dotnet restore
|
||||
$STD dotnet publish -c Release -o /opt/mail-archiver
|
||||
rm -rf /opt/mail-archiver-build
|
||||
msg_ok "Updated Mail-Archiver"
|
||||
|
||||
msg_info "Restoring Backup"
|
||||
cp /opt/appsettings.json /opt/.env /opt/mail-archiver
|
||||
[[ -d /opt/DataProtection-Keys ]] && cp -r /opt/DataProtection-Keys /opt/mail-archiver/
|
||||
msg_ok "Restored Backup"
|
||||
|
||||
msg_info "Starting Mail-Archiver"
|
||||
systemctl start mail-archiver
|
||||
msg_ok "Started Mail-Archiver"
|
||||
msg_ok "Updated successfully!"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:5000${CL}"
|
||||
10
ct/metube.sh
10
ct/metube.sh
@@ -40,6 +40,8 @@ function update_script() {
|
||||
fi
|
||||
fi
|
||||
|
||||
NODE_VERSION="24" NODE_MODULE="pnpm" setup_nodejs
|
||||
|
||||
if check_for_gh_release "metube" "alexta69/metube"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop metube
|
||||
@@ -56,8 +58,12 @@ function update_script() {
|
||||
|
||||
msg_info "Building Frontend"
|
||||
cd /opt/metube/ui
|
||||
$STD npm install
|
||||
$STD node_modules/.bin/ng build
|
||||
if command -v corepack >/dev/null 2>&1; then
|
||||
$STD corepack enable
|
||||
$STD corepack prepare pnpm --activate || true
|
||||
fi
|
||||
$STD pnpm install --frozen-lockfile
|
||||
$STD pnpm run build
|
||||
msg_ok "Built Frontend"
|
||||
|
||||
PYTHON_VERSION="3.13" setup_uv
|
||||
|
||||
@@ -23,13 +23,14 @@ function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -f /etc/apt/sources.list.d/mongodb-org-7.0.list && ! -f /etc/apt/sources.list.d/mongodb-org-8.0.list ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
if ! command -v mongod &>/dev/null; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "Updating ${APP} LXC"
|
||||
|
||||
msg_info "Updating MongoDB LXC"
|
||||
$STD apt update
|
||||
$STD apt -y upgrade
|
||||
$STD apt upgrade -y
|
||||
msg_ok "Updated successfully!"
|
||||
exit
|
||||
}
|
||||
|
||||
@@ -27,10 +27,15 @@ function update_script() {
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
setup_mariadb
|
||||
|
||||
setup_mariadb
|
||||
NODE_VERSION="22" NODE_MODULE="yarn@latest" setup_nodejs
|
||||
|
||||
# Fix for previous versions not having cronjob
|
||||
if ! grep -Fq 'php /opt/monica/artisan schedule:run' /etc/crontab; then
|
||||
echo '* * * * * root php /opt/monica/artisan schedule:run >> /dev/null 2>&1' >>/etc/crontab
|
||||
fi
|
||||
|
||||
if check_for_gh_release "monica" "monicahq/monica"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop apache2
|
||||
|
||||
@@ -53,7 +53,7 @@ function update_script() {
|
||||
#grep "tag_name" |
|
||||
#awk '{print substr($2, 3, length($2)-4) }')
|
||||
|
||||
RELEASE="2.13.4"
|
||||
RELEASE="2.13.5"
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "nginxproxymanager" "NginxProxyManager/nginx-proxy-manager" "tarball" "v${RELEASE}" "/opt/nginxproxymanager"
|
||||
|
||||
msg_info "Stopping Services"
|
||||
@@ -126,6 +126,7 @@ function update_script() {
|
||||
# Replace node-sass with sass in package.json before installation
|
||||
sed -E -i 's/"node-sass" *: *"([^"]*)"/"sass": "\1"/g' package.json
|
||||
$STD yarn install --network-timeout 600000
|
||||
$STD yarn locale-compile
|
||||
$STD yarn build
|
||||
cp -r /opt/nginxproxymanager/frontend/dist/* /app/frontend
|
||||
cp -r /opt/nginxproxymanager/frontend/public/images/* /app/frontend/images
|
||||
|
||||
@@ -27,37 +27,31 @@ function update_script() {
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
setup_mariadb
|
||||
CURRENT_PHP=$(php -v 2>/dev/null | awk '/^PHP/{print $2}' | cut -d. -f1,2)
|
||||
setup_composer
|
||||
|
||||
if [[ "$CURRENT_PHP" != "8.4" ]]; then
|
||||
msg_info "Migrating PHP $CURRENT_PHP to 8.4"
|
||||
$STD curl -fsSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
|
||||
$STD dpkg -i /tmp/debsuryorg-archive-keyring.deb
|
||||
$STD sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
|
||||
$STD apt update
|
||||
$STD apt remove -y php"${CURRENT_PHP//./}"*
|
||||
$STD apt install -y \
|
||||
php8.4 \
|
||||
php8.4-{gd,mysql,mbstring,bcmath,xml,curl,zip,intl,fpm} \
|
||||
libapache2-mod-php8.4
|
||||
PHP_VERSION="8.4" PHP_MODULE="mysql,sqlite3" PHP_APACHE="YES" PHP_FPM="YES" setup_php
|
||||
msg_ok "Migrated PHP $CURRENT_PHP to 8.4"
|
||||
fi
|
||||
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/pelican-dev/panel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||
if check_for_gh_release "pelican-panel" "pelican-dev/panel"; then
|
||||
msg_info "Stopping Service"
|
||||
cd /opt/pelican-panel
|
||||
$STD php artisan down
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Updating ${APP} to v${RELEASE}"
|
||||
cp -r /opt/pelican-panel/.env /opt/
|
||||
SQLITE_INSTALL=$(ls /opt/pelican-panel/database/*.sqlite 1>/dev/null 2>&1 && echo "true" || echo "false")
|
||||
$SQLITE_INSTALL && cp -r /opt/pelican-panel/database/*.sqlite /opt/
|
||||
rm -rf * .*
|
||||
curl -fsSL "https://github.com/pelican-dev/panel/releases/download/v${RELEASE}/panel.tar.gz" -o $(basename "https://github.com/pelican-dev/panel/releases/download/v${RELEASE}/panel.tar.gz")
|
||||
tar -xzf "panel.tar.gz"
|
||||
fetch_and_deploy_gh_release "pelican-panel" "pelican-dev/panel" "prebuild" "latest" "/opt/pelican-panel" "panel.tar.gz"
|
||||
|
||||
msg_info "Updating Pelican Panel"
|
||||
mv /opt/.env /opt/pelican-panel/
|
||||
$SQLITE_INSTALL && mv /opt/*.sqlite /opt/pelican-panel/database/
|
||||
$STD composer install --no-dev --optimize-autoloader --no-interaction
|
||||
@@ -68,17 +62,13 @@ function update_script() {
|
||||
$STD php artisan migrate --seed --force
|
||||
chown -R www-data:www-data /opt/pelican-panel
|
||||
chmod -R 755 /opt/pelican-panel/storage /opt/pelican-panel/bootstrap/cache/
|
||||
rm -rf "/opt/pelican-panel/panel.tar.gz"
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Updated $APP to v${RELEASE}"
|
||||
msg_ok "Updated Pelican Panel"
|
||||
|
||||
msg_info "Starting Service"
|
||||
$STD php artisan queue:restart
|
||||
$STD php artisan up
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Updated successfully!"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
@@ -27,25 +27,18 @@ function update_script() {
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/pelican-dev/wings/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||
|
||||
if check_for_gh_release "wings" "pelican-dev/wings"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop wings
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Updating ${APP} to v${RELEASE}"
|
||||
rm /usr/local/bin/wings
|
||||
curl -fsSL "https://github.com/pelican-dev/wings/releases/download/v${RELEASE}/wings_linux_amd64" -o "/usr/local/bin/wings"
|
||||
chmod u+x /usr/local/bin/wings
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Updated $APP to v${RELEASE}"
|
||||
fetch_and_deploy_gh_release "wings" "pelican-dev/wings" "singlefile" "latest" "/usr/local/bin" "wings_linux_amd64"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start wings
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Updated successfully!"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ function update_script() {
|
||||
systemctl stop apache2
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
PHP_VERSION="8.3" PHP_APACHE="YES" PHP_FPM="YES" PHP_MODULE="mysql,gmp,snmp,ldap,apcu" setup_php
|
||||
PHP_VERSION="8.4" PHP_APACHE="YES" PHP_FPM="YES" PHP_MODULE="mysql,gmp,snmp,ldap,apcu" setup_php
|
||||
|
||||
msg_info "Installing PHP-PEAR"
|
||||
$STD apt install -y \
|
||||
|
||||
@@ -29,6 +29,12 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
|
||||
# Mandatory as of v2.x.x
|
||||
ENCRYPTION_KEY=$(openssl rand -base64 32)
|
||||
if ! grep -q '^ENCRYPTION_KEY=' /opt/pocket-id/.env; then
|
||||
echo "ENCRYPTION_KEY=$ENCRYPTION_KEY" >> /opt/pocket-id/.env
|
||||
fi
|
||||
|
||||
if check_for_gh_release "pocket-id" "pocket-id/pocket-id"; then
|
||||
if [ "$(printf '%s\n%s' "$(cat ~/.pocket-id 2>/dev/null || echo 0.0.0)" "1.0.0" | sort -V | head -n1)" = "$(cat ~/.pocket-id 2>/dev/null || echo 0.0.0)" ] &&
|
||||
[ "$(cat ~/.pocket-id 2>/dev/null || echo 0.0.0)" != "1.0.0" ]; then
|
||||
|
||||
@@ -38,7 +38,7 @@ function update_script() {
|
||||
rm -f /opt/pulse/pulse
|
||||
fi
|
||||
|
||||
fetch_and_deploy_gh_release "pulse" "rcourtman/Pulse" "prebuild" "latest" "/opt/pulse" "*-linux-amd64.tar.gz"
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "pulse" "rcourtman/Pulse" "prebuild" "latest" "/opt/pulse" "pulse-v*-linux-amd64.tar.gz"
|
||||
ln -sf /opt/pulse/bin/pulse /usr/local/bin/pulse
|
||||
mkdir -p /etc/pulse
|
||||
chown pulse:pulse /etc/pulse
|
||||
|
||||
14
ct/reitti.sh
14
ct/reitti.sh
@@ -28,11 +28,22 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
|
||||
# Enable PostGIS extension if not already enabled
|
||||
if systemctl is-active --quiet postgresql; then
|
||||
if ! sudo -u postgres psql -d reitti_db -tAc "SELECT 1 FROM pg_extension WHERE extname='postgis'" 2>/dev/null | grep -q 1; then
|
||||
msg_info "Enabling PostGIS extension"
|
||||
sudo -u postgres psql -d reitti_db -c "CREATE EXTENSION IF NOT EXISTS postgis;" &>/dev/null
|
||||
msg_ok "Enabled PostGIS extension"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -d /var/cache/nginx/tiles ]; then
|
||||
msg_info "Installing Nginx Tile Cache"
|
||||
mkdir -p /var/cache/nginx/tiles
|
||||
$STD apt install -y nginx
|
||||
cat <<EOF >/etc/nginx/nginx.conf
|
||||
user www-data;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
@@ -51,7 +62,8 @@ http {
|
||||
}
|
||||
}
|
||||
EOF
|
||||
chown -R www-data:www-data /var/cache/nginx/tiles
|
||||
chown -R www-data:www-data /var/cache/nginx
|
||||
chmod -R 750 /var/cache/nginx
|
||||
systemctl restart nginx
|
||||
echo "reitti.ui.tiles.cache.url=http://127.0.0.1" >> /opt/reitti/application.properties
|
||||
systemctl restart reitti
|
||||
|
||||
@@ -38,16 +38,18 @@ function update_script() {
|
||||
cp -r /opt/sabnzbd /opt/sabnzbd_backup_$(date +%s)
|
||||
fetch_and_deploy_gh_release "sabnzbd-org" "sabnzbd/sabnzbd" "prebuild" "latest" "/opt/sabnzbd" "SABnzbd-*-src.tar.gz"
|
||||
|
||||
# Always ensure venv exists
|
||||
if [[ ! -d /opt/sabnzbd/venv ]]; then
|
||||
msg_info "Migrating SABnzbd to uv virtual environment"
|
||||
$STD uv venv /opt/sabnzbd/venv
|
||||
msg_ok "Created uv venv at /opt/sabnzbd/venv"
|
||||
fi
|
||||
|
||||
if grep -q "ExecStart=python3 SABnzbd.py" /etc/systemd/system/sabnzbd.service; then
|
||||
sed -i "s|ExecStart=python3 SABnzbd.py|ExecStart=/opt/sabnzbd/venv/bin/python SABnzbd.py|" /etc/systemd/system/sabnzbd.service
|
||||
systemctl daemon-reload
|
||||
msg_ok "Updated SABnzbd service to use uv venv"
|
||||
fi
|
||||
# Always check and fix service file if needed
|
||||
if [[ -f /etc/systemd/system/sabnzbd.service ]] && grep -q "ExecStart=python3 SABnzbd.py" /etc/systemd/system/sabnzbd.service; then
|
||||
sed -i "s|ExecStart=python3 SABnzbd.py|ExecStart=/opt/sabnzbd/venv/bin/python SABnzbd.py|" /etc/systemd/system/sabnzbd.service
|
||||
systemctl daemon-reload
|
||||
msg_ok "Updated SABnzbd service to use uv venv"
|
||||
fi
|
||||
$STD uv pip install --upgrade pip --python=/opt/sabnzbd/venv/bin/python
|
||||
$STD uv pip install -r /opt/sabnzbd/requirements.txt --python=/opt/sabnzbd/venv/bin/python
|
||||
|
||||
@@ -27,10 +27,11 @@ function update_script() {
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "Updating $APP LXC"
|
||||
|
||||
msg_info "Updating SFTPGo"
|
||||
$STD apt update
|
||||
$STD apt -y upgrade
|
||||
msg_ok "Updated $APP LXC"
|
||||
$STD apt upgrade -y
|
||||
msg_ok "Updated SFTPGo"
|
||||
msg_ok "Updated successfully!"
|
||||
exit
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ function update_script() {
|
||||
RELEASE=$(get_latest_github_release "SonarSource/sonarqube")
|
||||
curl -fsSL "https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-${RELEASE}.zip" -o $temp_file
|
||||
unzip -q "$temp_file" -d /opt
|
||||
mv /opt/sonarqube-* /opt/sonarqube
|
||||
mv /opt/sonarqube-${RELEASE} /opt/sonarqube
|
||||
msg_ok "Updated SonarQube"
|
||||
|
||||
msg_info "Restoring Backup"
|
||||
|
||||
@@ -33,6 +33,7 @@ function update_script() {
|
||||
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="common,sqlite3,redis" setup_php
|
||||
setup_composer
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
setcap cap_net_raw+ep /bin/ping
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop speedtest-tracker
|
||||
|
||||
@@ -23,7 +23,7 @@ function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -f /etc/apt/sources.list.d/syncthing.list ]]; then
|
||||
if [[ ! -f /etc/apt/sources.list.d/syncthing.list && ! -f /etc/apt/sources.list.d/syncthing.sources ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
10
ct/wazuh.sh
10
ct/wazuh.sh
@@ -11,7 +11,7 @@ var_cpu="${var_cpu:-4}"
|
||||
var_ram="${var_ram:-4096}"
|
||||
var_disk="${var_disk:-25}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-12}"
|
||||
var_version="${var_version:-13}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
@@ -27,10 +27,10 @@ function update_script() {
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "Updating ${APP} LXC"
|
||||
$STD apt-get update
|
||||
$STD apt-get -y upgrade
|
||||
msg_ok "Updated ${APP} LXC"
|
||||
msg_info "Updating Wazuh LXC"
|
||||
$STD apt update
|
||||
$STD apt upgrade -y
|
||||
msg_ok "Updated Wazuh LXC"
|
||||
msg_ok "Updated successfully!"
|
||||
exit
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
"ram": 2048,
|
||||
"hdd": 5,
|
||||
"os": "debian",
|
||||
"version": "12"
|
||||
"version": "13"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"script": "ct/bentopdf.sh",
|
||||
"resources": {
|
||||
"cpu": 1,
|
||||
"ram": 2048,
|
||||
"ram": 4096,
|
||||
"hdd": 4,
|
||||
"os": "debian",
|
||||
"version": "13"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
"ram": 4096,
|
||||
"hdd": 20,
|
||||
"os": "Debian",
|
||||
"version": "12"
|
||||
"version": "13"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
@@ -37,11 +37,11 @@
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
"text": "After installation, checkout: ´https://github.com/community-scripts/ProxmoxVE/discussions/836´ for useful Debian commands",
|
||||
"text": "For additional Debian commands and tips after installation, checkout: `https://github.com/community-scripts/ProxmoxVE/discussions/836`",
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
"text": "If you use Cloud-init, checkout after installation: ´https://github.com/community-scripts/ProxmoxVE/discussions/272´",
|
||||
"text": "If you use Cloud-init, checkout cloud-init discussion: `https://github.com/community-scripts/ProxmoxVE/discussions/272`",
|
||||
"type": "info"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
"text": "After installation, checkout: ´https://github.com/community-scripts/ProxmoxVE/discussions/836´ for useful Debian commands",
|
||||
"text": "For additional Debian commands and tips after installation, checkout: `https://github.com/community-scripts/ProxmoxVE/discussions/836`",
|
||||
"type": "info"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
"ram": 1024,
|
||||
"hdd": 4,
|
||||
"os": "debian",
|
||||
"version": "12"
|
||||
"version": "13"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
"ram": 1024,
|
||||
"hdd": 2,
|
||||
"os": "debian",
|
||||
"version": "12"
|
||||
"version": "13"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
{
|
||||
"name": "GoAway",
|
||||
"slug": "goaway",
|
||||
"categories": [
|
||||
5
|
||||
],
|
||||
"date_created": "2025-09-25",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 8080,
|
||||
"documentation": "https://github.com/pommee/goaway#configuration-file",
|
||||
"config_path": "/opt/goaway/config/settings.yaml",
|
||||
"website": "https://github.com/pommee/goaway",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/goaway.webp",
|
||||
"description": "Lightweight DNS sinkhole written in Go with a modern dashboard client. Very good looking new alternative to Pi-Hole and Adguard Home.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/goaway.sh",
|
||||
"resources": {
|
||||
"cpu": 1,
|
||||
"ram": 1024,
|
||||
"hdd": 4,
|
||||
"os": "Debian",
|
||||
"version": "13"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"text": "Type `cat ~/goaway.creds` to see login credentials.",
|
||||
"type": "info"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -21,7 +21,7 @@
|
||||
"resources": {
|
||||
"cpu": 1,
|
||||
"ram": 512,
|
||||
"hdd": 2,
|
||||
"hdd": 4,
|
||||
"os": "debian",
|
||||
"version": "13"
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
"text": "To change upload location, edit 'IMMICH_MEDIA_LOCATION' in `/opt/immich/.env`, and create the symlink 'upload' in /opt/immich/app & /opt/immich/app/machine-learning to your new upload location",
|
||||
"text": "To change upload location, edit 'IMMICH_MEDIA_LOCATION' in `/opt/immich/.env`, retarget the symlink 'upload' in /opt/immich/app and /opt/immich/app/machine-learning to your new upload location, copy the default upload location `/opt/immich/upload` and its contents to the new upload location, confirm that the new upload location and its contents are owned by `immich:immich`, and restart the Immich server. See `https://github.com/community-scripts/ProxmoxVE/discussions/5075` for more information.",
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
"text": "Database credentials are stored in ~/invoiceninja.creds",
|
||||
"text": "Database credentials are stored in `~/invoiceninja.creds`. Use them in the above initial configuration step.",
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
|
||||
35
frontend/public/json/mail-archiver.json
Normal file
35
frontend/public/json/mail-archiver.json
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "Mail-Archiver",
|
||||
"slug": "mail-archiver",
|
||||
"categories": [
|
||||
7
|
||||
],
|
||||
"date_created": "2025-12-28",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 5000,
|
||||
"documentation": "https://github.com/s1t5/mail-archiver/blob/main/doc/Index.md",
|
||||
"config_path": "/opt/mail-archiver/.env, /opt/mail-archiver/appsettings.json",
|
||||
"website": "https://github.com/s1t5/mail-archiver",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/mail-archiver.webp",
|
||||
"description": "Mail-Archiver is a web application for archiving, searching, and exporting emails from multiple accounts. Featuring folder sync, attachment support, mailbox migration and a dashboard.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/mail-archiver.sh",
|
||||
"resources": {
|
||||
"cpu": 1,
|
||||
"ram": 2048,
|
||||
"hdd": 8,
|
||||
"os": "Debian",
|
||||
"version": "13"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": "admin",
|
||||
"password": "secure123!"
|
||||
},
|
||||
"notes": []
|
||||
}
|
||||
35
frontend/public/json/nextcloud-exporter.json
Normal file
35
frontend/public/json/nextcloud-exporter.json
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "Nextcloud Exporter",
|
||||
"slug": "nextcloud-exporter",
|
||||
"categories": [
|
||||
9
|
||||
],
|
||||
"date_created": "2025-12-27",
|
||||
"type": "addon",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 9205,
|
||||
"documentation": "https://github.com/xperimental/nextcloud-exporter",
|
||||
"website": "https://github.com/xperimental/nextcloud-exporter",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/nextcloud.webp",
|
||||
"config_path": "/etc/nextcloud-exporter.env",
|
||||
"description": "Prometheus exporter for Nextcloud servers. ",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "tools/addon/nextcloud-exporter.sh",
|
||||
"resources": {
|
||||
"cpu": null,
|
||||
"ram": null,
|
||||
"hdd": null,
|
||||
"os": null,
|
||||
"version": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": []
|
||||
}
|
||||
@@ -12,7 +12,7 @@
|
||||
"documentation": "https://wiki.servarr.com/prowlarr",
|
||||
"website": "https://github.com/Prowlarr/Prowlarr",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/prowlarr.webp",
|
||||
"config_path": "",
|
||||
"config_path": "/var/lib/prowlarr/",
|
||||
"description": "Prowlarr is a software tool designed to integrate with various PVR (Personal Video Recorder) apps. It is built on a popular *arr .net/ReactJS base stack and serves as an indexer manager and proxy. Prowlarr makes it easy to manage and organize TV show and movie collections, by integrating with popular PVR apps and automating the downloading and organizing of media files. The software provides a web-based interface for managing and organizing TV shows and movies, making it easy to search and find content. Prowlarr also supports metadata management, including show and movie information, making it easy for users to keep their media collection organized and up-to-date. The software is designed to be easy to use and provides a simple and intuitive interface for managing and organizing media collections, making it a valuable tool for media enthusiasts who want to keep their collection organized and up-to-date. With Prowlarr, users can enjoy their media collection from anywhere, making it a powerful tool for managing and sharing media files.",
|
||||
"install_methods": [
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"text": "after installation, checkout: ´https://github.com/community-scripts/ProxmoxVE/discussions/272´",
|
||||
"text": "This VM uses Cloud-init, for more information see cloud-init discussion: `https://github.com/community-scripts/ProxmoxVE/discussions/272`",
|
||||
"type": "info"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"text": "after installation, checkout: ´https://github.com/community-scripts/ProxmoxVE/discussions/272´",
|
||||
"text": "This VM uses Cloud-init, for more information see cloud-init discussion: `https://github.com/community-scripts/ProxmoxVE/discussions/272`",
|
||||
"type": "info"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"text": "after installation, checkout: ´https://github.com/community-scripts/ProxmoxVE/discussions/272´",
|
||||
"text": "This VM uses Cloud-init, for more information see cloud-init discussion: `https://github.com/community-scripts/ProxmoxVE/discussions/272`",
|
||||
"type": "info"
|
||||
}
|
||||
]
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -23,7 +23,7 @@
|
||||
"ram": 4096,
|
||||
"hdd": 25,
|
||||
"os": "debian",
|
||||
"version": "12"
|
||||
"version": "13"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"text": "Wireguard and WGDashboard are not the same. More info: `https://docs.wgdashboard.dev/what-is-wireguard-what-is-wgdashboard.html`",
|
||||
"text": "Wireguard and WGDashboard are not the same. More info: `https://wgdashboard.dev/`",
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -17,13 +17,17 @@ msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y ffmpeg
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
setup_deb822_repo \
|
||||
"audiobookshelf" \
|
||||
"https://advplyr.github.io/audiobookshelf-ppa/KEY.gpg" \
|
||||
"https://advplyr.github.io/audiobookshelf-ppa" \
|
||||
"./"
|
||||
|
||||
msg_info "Setup audiobookshelf"
|
||||
curl -fsSL https://advplyr.github.io/audiobookshelf-ppa/KEY.gpg >/etc/apt/trusted.gpg.d/audiobookshelf-ppa.asc
|
||||
echo "deb [signed-by=/etc/apt/trusted.gpg.d/audiobookshelf-ppa.asc] https://advplyr.github.io/audiobookshelf-ppa ./" >/etc/apt/sources.list.d/audiobookshelf.list
|
||||
$STD apt update
|
||||
$STD apt install -y audiobookshelf
|
||||
echo "FFMPEG_PATH=/usr/bin/ffmpeg" >>/etc/default/audiobookshelf
|
||||
echo "FFPROBE_PATH=/usr/bin/ffprobe" >>/etc/default/audiobookshelf
|
||||
systemctl restart audiobookshelf
|
||||
msg_ok "Setup audiobookshelf"
|
||||
|
||||
motd_ssh
|
||||
|
||||
@@ -17,7 +17,7 @@ setup_hwaccel
|
||||
setup_imagemagick
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y \
|
||||
$STD apt install -y \
|
||||
assimp-utils \
|
||||
calibre \
|
||||
dcraw \
|
||||
|
||||
@@ -26,11 +26,8 @@ $STD apt-get install -y \
|
||||
nginx
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Configure Application"
|
||||
var_project_name="default"
|
||||
read -r -p "${TAB3}Type the assembly name of the project: " var_project_name
|
||||
echo "Target assembly: '${var_project_name}'"
|
||||
msg_ok "Application Configured"
|
||||
|
||||
msg_info "Setting up FTP Server"
|
||||
useradd ftpuser
|
||||
|
||||
@@ -16,24 +16,10 @@ update_os
|
||||
PHP_VERSION="8.4" PHP_APACHE="YES" PHP_MODULE="mysql" setup_php
|
||||
setup_composer
|
||||
setup_mariadb
|
||||
LOCAL_IP=$(hostname -I | awk '{print $1}')
|
||||
|
||||
msg_info "Setting up database"
|
||||
DB_NAME=firefly
|
||||
DB_USER=firefly
|
||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||
$STD mariadb -u root -e "CREATE DATABASE $DB_NAME;"
|
||||
$STD mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
|
||||
mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||
{
|
||||
echo "Firefly-Credentials"
|
||||
echo "Firefly Database User: $DB_USER"
|
||||
echo "Firefly Database Password: $DB_PASS"
|
||||
echo "Firefly Database Name: $DB_NAME"
|
||||
} >>~/firefly.creds
|
||||
msg_ok "Set up database"
|
||||
|
||||
MARIADB_DB_NAME="firefly" MARIADB_DB_USER="firefly" setup_mariadb_db
|
||||
import_local_ip
|
||||
fetch_and_deploy_gh_release "firefly" "firefly-iii/firefly-iii" "prebuild" "latest" "/opt/firefly" "FireflyIII-*.zip"
|
||||
fetch_and_deploy_gh_release "dataimporter" "firefly-iii/data-importer" "prebuild" "latest" "/opt/firefly/dataimporter" "DataImporter-v*.tar.gz"
|
||||
|
||||
msg_info "Configuring Firefly III (Patience)"
|
||||
chown -R www-data:www-data /opt/firefly
|
||||
@@ -41,22 +27,19 @@ chmod -R 775 /opt/firefly/storage
|
||||
cd /opt/firefly
|
||||
cp .env.example .env
|
||||
sed -i "s/DB_HOST=.*/DB_HOST=localhost/" /opt/firefly/.env
|
||||
sed -i "s/DB_PASSWORD=.*/DB_PASSWORD=$DB_PASS/" /opt/firefly/.env
|
||||
sed -i "s/DB_PASSWORD=.*/DB_PASSWORD=$MARIADB_DB_PASS/" /opt/firefly/.env
|
||||
$STD composer install --no-dev --no-plugins --no-interaction
|
||||
$STD php artisan firefly:upgrade-database
|
||||
$STD php artisan firefly:correct-database
|
||||
$STD php artisan firefly:report-integrity
|
||||
$STD php artisan firefly:laravel-passport-keys
|
||||
IMPORTER_RELEASE=$(curl -fsSL https://api.github.com/repos/firefly-iii/data-importer/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4)}')
|
||||
mkdir -p /opt/firefly/dataimporter
|
||||
cd /opt
|
||||
curl -fsSL "https://github.com/firefly-iii/data-importer/releases/download/v${IMPORTER_RELEASE}/DataImporter-v${IMPORTER_RELEASE}.tar.gz" -o "DataImporter-v${IMPORTER_RELEASE}.tar.gz"
|
||||
tar -xzf "DataImporter-v${IMPORTER_RELEASE}.tar.gz" -C /opt/firefly/dataimporter
|
||||
msg_ok "Configured Firefly III"
|
||||
|
||||
msg_info "Configuring Data Importer"
|
||||
cp /opt/firefly/dataimporter/.env.example /opt/firefly/dataimporter/.env
|
||||
sed -i "s#FIREFLY_III_URL=#FIREFLY_III_URL=http://${LOCAL_IP}#g" /opt/firefly/dataimporter/.env
|
||||
chown -R www-data:www-data /opt/firefly
|
||||
rm -rf "/opt/DataImporter-v${IMPORTER_RELEASE}.tar.gz"
|
||||
msg_ok "Configured Firefly III"
|
||||
msg_ok "Configured Data Importer"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/apache2/sites-available/firefly.conf
|
||||
@@ -69,6 +52,8 @@ cat <<EOF >/etc/apache2/sites-available/firefly.conf
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
RedirectMatch 301 ^/dataimporter$ /dataimporter/
|
||||
|
||||
Alias /dataimporter/ /opt/firefly/dataimporter/public/
|
||||
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: Slaviša Arežina (tremor021)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/pommee/goaway
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y net-tools
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
fetch_and_deploy_gh_release "goaway" "pommee/goaway" "prebuild" "latest" "/opt/goaway" "goaway_*_linux_amd64.tar.gz"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/goaway.service
|
||||
[Unit]
|
||||
Description=GoAway Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/goaway
|
||||
ExecStart=/opt/goaway/goaway
|
||||
StandardOutput=file:/var/log/goaway.log
|
||||
StandardError=inherit
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now goaway
|
||||
sleep 10
|
||||
for i in {1..30}; do
|
||||
ADMIN_PASS=$(awk -F': ' "/Randomly generated admin password:/ {print \$2; exit}" /var/log/goaway.log)
|
||||
[ -n "$ADMIN_PASS" ] && break
|
||||
sleep 1
|
||||
done
|
||||
{
|
||||
echo "GoAway Credentials"
|
||||
echo "Admin User: admin"
|
||||
echo "Admin Password: $ADMIN_PASS"
|
||||
} >>~/goaway.creds
|
||||
msg_ok "Service Created"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -28,7 +28,7 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
|
||||
|
||||
redir /admin /admin/
|
||||
|
||||
handle_path /admin* {
|
||||
handle_path /admin/* {
|
||||
root * /opt/headscale-admin
|
||||
encode gzip zstd
|
||||
|
||||
@@ -36,14 +36,11 @@ handle_path /admin* {
|
||||
X-Content-Type-Options nosniff
|
||||
}
|
||||
|
||||
try_files {path} {path}/ /opt/headscale-admin/index.html
|
||||
try_files {path} /opt/headscale-admin/index.html
|
||||
file_server
|
||||
}
|
||||
|
||||
handle /api/* {
|
||||
reverse_proxy localhost:8080
|
||||
}
|
||||
|
||||
reverse_proxy localhost:8080
|
||||
EOF
|
||||
caddy fmt --overwrite /etc/caddy/Caddyfile
|
||||
systemctl start caddy
|
||||
|
||||
@@ -86,7 +86,8 @@ EOF
|
||||
mkdir -p /opt/invoiceninja/bootstrap/cache
|
||||
mkdir -p /opt/invoiceninja/storage/{app/public,framework/{cache/data,sessions,views},logs}
|
||||
chown -R www-data:www-data /opt/invoiceninja
|
||||
chmod -R 775 /opt/invoiceninja/storage /opt/invoiceninja/bootstrap/cache
|
||||
chown -R www-data:www-data /opt/invoiceninja/storage
|
||||
chown -R www-data:www-data /opt/invoiceninja/bootstrap/cache
|
||||
msg_ok "Configured InvoiceNinja"
|
||||
|
||||
msg_info "Downloading Chromium for PDF Generation"
|
||||
|
||||
@@ -19,45 +19,42 @@ $STD apt install -y \
|
||||
build-essential
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
NODE_VERSION="22" NODE_MODULE="yarn@latest" setup_nodejs
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
PG_VERSION="16" setup_postgresql
|
||||
RUST_CRATES="monolith" setup_rust
|
||||
|
||||
msg_info "Setting up PostgreSQL DB"
|
||||
DB_NAME=linkwardendb
|
||||
DB_USER=linkwarden
|
||||
DB_PASS="$(openssl rand -base64 18 | tr -d '/' | cut -c1-13)"
|
||||
SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)"
|
||||
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
|
||||
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"
|
||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';"
|
||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';"
|
||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC';"
|
||||
{
|
||||
echo "Linkwarden-Credentials"
|
||||
echo "Linkwarden Database User: $DB_USER"
|
||||
echo "Linkwarden Database Password: $DB_PASS"
|
||||
echo "Linkwarden Database Name: $DB_NAME"
|
||||
echo "Linkwarden Secret: $SECRET_KEY"
|
||||
} >>~/linkwarden.creds
|
||||
msg_ok "Set up PostgreSQL DB"
|
||||
PG_DB_NAME="linkwardendb" PG_DB_USER="linkwarden" setup_postgresql_db
|
||||
|
||||
read -r -p "${TAB3}Would you like to add Adminer? <y/N> " prompt
|
||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||
setup_adminer
|
||||
fi
|
||||
|
||||
msg_info "Installing Linkwarden (Patience)"
|
||||
fetch_and_deploy_gh_release "linkwarden" "linkwarden/linkwarden"
|
||||
|
||||
msg_info "Installing Linkwarden (Patience)"
|
||||
SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)"
|
||||
echo "Linkwarden Secret: $SECRET_KEY" >>"${HOME}/linkwarden.creds"
|
||||
cd /opt/linkwarden
|
||||
yarn_ver="4.12.0"
|
||||
if [[ -f package.json ]]; then
|
||||
pkg_manager=$(jq -r '.packageManager // empty' package.json 2>/dev/null || true)
|
||||
if [[ -n "$pkg_manager" && "$pkg_manager" == yarn@* ]]; then
|
||||
yarn_spec="${pkg_manager#yarn@}"
|
||||
yarn_ver="${yarn_spec%%+*}"
|
||||
fi
|
||||
fi
|
||||
if command -v corepack >/dev/null 2>&1; then
|
||||
$STD corepack enable
|
||||
$STD corepack prepare "yarn@${yarn_ver}" --activate || true
|
||||
fi
|
||||
$STD yarn
|
||||
$STD npx playwright install-deps
|
||||
$STD yarn playwright install
|
||||
$STD npx playwright install
|
||||
IP=$(hostname -I | awk '{print $1}')
|
||||
cat <<EOF >/opt/linkwarden/.env
|
||||
NEXTAUTH_SECRET=${SECRET_KEY}
|
||||
NEXTAUTH_URL=http://${IP}:3000
|
||||
DATABASE_URL=postgresql://${DB_USER}:${DB_PASS}@localhost:5432/${DB_NAME}
|
||||
DATABASE_URL=postgresql://${PG_DB_USER}:${PG_DB_PASS}@localhost:5432/${PG_DB_NAME}
|
||||
EOF
|
||||
$STD yarn prisma:generate
|
||||
$STD yarn web:build
|
||||
|
||||
@@ -13,7 +13,7 @@ setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
fetch_and_deploy_gh_release "magicmirror" "MagicMirrorOrg/MagicMirror" "tarball"
|
||||
|
||||
msg_info "Configuring MagicMirror"
|
||||
|
||||
68
install/mail-archiver-install.sh
Normal file
68
install/mail-archiver-install.sh
Normal file
@@ -0,0 +1,68 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: Slaviša Arežina (tremor021)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/s1t5/mail-archiver
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
setup_deb822_repo \
|
||||
"microsoft" \
|
||||
"https://packages.microsoft.com/keys/microsoft-2025.asc" \
|
||||
"https://packages.microsoft.com/debian/13/prod/" \
|
||||
"trixie" \
|
||||
"main"
|
||||
$STD apt install -y \
|
||||
dotnet-sdk-10.0 \
|
||||
aspnetcore-runtime-8.0
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PG_VERSION="17" setup_postgresql
|
||||
PG_DB_NAME="mailarchiver_db" PG_DB_USER="mailarchiver" setup_postgresql_db
|
||||
fetch_and_deploy_gh_release "mail-archiver" "s1t5/mail-archiver" "tarball"
|
||||
|
||||
msg_info "Setting up Mail-Archiver"
|
||||
mv /opt/mail-archiver /opt/mail-archiver-build
|
||||
cd /opt/mail-archiver-build
|
||||
$STD dotnet restore
|
||||
$STD dotnet publish -c Release -o /opt/mail-archiver
|
||||
cp /opt/mail-archiver-build/appsettings.json /opt/mail-archiver/appsettings.json
|
||||
sed -i "s|\"DefaultConnection\": \"[^\"]*\"|\"DefaultConnection\": \"Host=localhost;Database=mailarchiver_db;Username=mailarchiver;Password=$PG_DB_PASS\"|" /opt/mail-archiver/appsettings.json
|
||||
rm -rf /opt/mail-archiver-build
|
||||
|
||||
cat <<EOF >/opt/mail-archiver/.env
|
||||
ASPNETCORE_URLS=http://+:5000
|
||||
ASPNETCORE_ENVIRONMENT=Production
|
||||
TZ=UTC
|
||||
EOF
|
||||
msg_ok "Setup Mail-Archiver"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/mail-archiver.service
|
||||
[Unit]
|
||||
Description=Mail-Archiver Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=/opt/mail-archiver/.env
|
||||
WorkingDirectory=/opt/mail-archiver
|
||||
ExecStart=/usr/bin/dotnet MailArchiver.dll
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now mail-archiver
|
||||
msg_info "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -23,7 +23,7 @@ $STD apt install -y \
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PYTHON_VERSION="3.13" setup_uv
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
NODE_VERSION="24" NODE_MODULE="pnpm" setup_nodejs
|
||||
|
||||
msg_info "Installing Deno"
|
||||
export DENO_INSTALL="/usr/local"
|
||||
@@ -37,8 +37,12 @@ fetch_and_deploy_gh_release "metube" "alexta69/metube" "tarball" "latest"
|
||||
|
||||
msg_info "Installing MeTube"
|
||||
cd /opt/metube/ui
|
||||
$STD npm ci
|
||||
$STD node_modules/.bin/ng build --configuration production
|
||||
if command -v corepack >/dev/null 2>&1; then
|
||||
$STD corepack enable
|
||||
$STD corepack prepare pnpm --activate || true
|
||||
fi
|
||||
$STD pnpm install --frozen-lockfile
|
||||
$STD pnpm run build
|
||||
cd /opt/metube
|
||||
$STD uv sync
|
||||
mkdir -p /opt/metube_downloads /opt/metube_downloads/.metube /opt/metube_downloads/music /opt/metube_downloads/videos
|
||||
|
||||
@@ -16,23 +16,8 @@ update_os
|
||||
PHP_VERSION="8.2" PHP_APACHE="YES" PHP_MODULE="dom,gmp,iconv,mysqli,pdo-mysql,redis,tokenizer" setup_php
|
||||
setup_composer
|
||||
setup_mariadb
|
||||
MARIADB_DB_NAME="monica" MARIADB_DB_USER="monica" setup_mariadb_db
|
||||
NODE_VERSION="22" NODE_MODULE="yarn@latest" setup_nodejs
|
||||
|
||||
msg_info "Setting up MariaDB"
|
||||
DB_NAME=monica
|
||||
DB_USER=monica
|
||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||
$STD mariadb -u root -e "CREATE DATABASE $DB_NAME;"
|
||||
$STD mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
|
||||
$STD mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||
{
|
||||
echo "monica-Credentials"
|
||||
echo "monica Database User: $DB_USER"
|
||||
echo "monica Database Password: $DB_PASS"
|
||||
echo "monica Database Name: $DB_NAME"
|
||||
} >>~/monica.creds
|
||||
msg_ok "Set up MariaDB"
|
||||
|
||||
fetch_and_deploy_gh_release "monica" "monicahq/monica" "prebuild" "latest" "/opt/monica" "monica-v*.tar.bz2"
|
||||
|
||||
msg_info "Configuring monica"
|
||||
@@ -51,6 +36,7 @@ $STD php artisan key:generate
|
||||
$STD php artisan setup:production --email=admin@helper-scripts.com --password=helper-scripts.com --force
|
||||
chown -R www-data:www-data /opt/monica
|
||||
chmod -R 775 /opt/monica/storage
|
||||
echo "* * * * * root php /opt/monica/artisan schedule:run >> /dev/null 2>&1" >>/etc/crontab
|
||||
msg_ok "Configured monica"
|
||||
|
||||
msg_info "Creating Service"
|
||||
|
||||
@@ -57,9 +57,9 @@ NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs
|
||||
# RELEASE=$(curl -fsSL https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest |
|
||||
# grep "tag_name" |
|
||||
# awk '{print substr($2, 3, length($2)-4) }')
|
||||
RELEASE="2.13.4"
|
||||
RELEASE="2.13.5"
|
||||
|
||||
fetch_and_deploy_gh_release "nginxproxymanager" "NginxProxyManager/nginx-proxy-manager" "tarball" "v2.13.4"
|
||||
fetch_and_deploy_gh_release "nginxproxymanager" "NginxProxyManager/nginx-proxy-manager" "tarball" "v2.13.5"
|
||||
|
||||
msg_info "Setting up Environment"
|
||||
ln -sf /usr/bin/python3 /usr/bin/python
|
||||
@@ -117,6 +117,7 @@ cd /opt/nginxproxymanager/frontend
|
||||
# Replace node-sass with sass in package.json before installation
|
||||
sed -E -i 's/"node-sass" *: *"([^"]*)"/"sass": "\1"/g' package.json
|
||||
$STD yarn install --network-timeout 600000
|
||||
$STD yarn locale-compile
|
||||
$STD yarn build
|
||||
cp -r /opt/nginxproxymanager/frontend/dist/* /app/frontend
|
||||
cp -r /opt/nginxproxymanager/frontend/public/images/* /app/frontend/images
|
||||
|
||||
@@ -44,7 +44,18 @@ msg_ok "Set up Intel® Repositories"
|
||||
setup_hwaccel
|
||||
|
||||
msg_info "Installing Intel® Level Zero"
|
||||
$STD apt -y install intel-level-zero-gpu level-zero level-zero-dev 2>/dev/null || true
|
||||
# Debian 13+ has newer Level Zero packages in system repos that conflict with Intel repo packages
|
||||
if is_debian && [[ "$(get_os_version_major)" -ge 13 ]]; then
|
||||
# Use system packages on Debian 13+ (avoid conflicts with libze1)
|
||||
$STD apt -y install libze1 libze-dev intel-level-zero-gpu 2>/dev/null || {
|
||||
msg_warn "Failed to install some Level Zero packages, continuing anyway"
|
||||
}
|
||||
else
|
||||
# Use Intel repository packages for older systems
|
||||
$STD apt -y install intel-level-zero-gpu level-zero level-zero-dev 2>/dev/null || {
|
||||
msg_warn "Failed to install Intel Level Zero packages, continuing anyway"
|
||||
}
|
||||
fi
|
||||
msg_ok "Installed Intel® Level Zero"
|
||||
|
||||
msg_info "Installing Intel® oneAPI Base Toolkit (Patience)"
|
||||
|
||||
@@ -50,7 +50,18 @@ EOF
|
||||
msg_ok "Set up Intel® Repositories"
|
||||
|
||||
msg_info "Installing Intel® Level Zero"
|
||||
$STD apt -y install intel-level-zero-gpu level-zero level-zero-dev 2>/dev/null || true
|
||||
# Debian 13+ has newer Level Zero packages in system repos that conflict with Intel repo packages
|
||||
if is_debian && [[ "$(get_os_version_major)" -ge 13 ]]; then
|
||||
# Use system packages on Debian 13+ (avoid conflicts with libze1)
|
||||
$STD apt -y install libze1 libze-dev intel-level-zero-gpu 2>/dev/null || {
|
||||
msg_warn "Failed to install some Level Zero packages, continuing anyway"
|
||||
}
|
||||
else
|
||||
# Use Intel repository packages for older systems
|
||||
$STD apt -y install intel-level-zero-gpu level-zero level-zero-dev 2>/dev/null || {
|
||||
msg_warn "Failed to install Intel Level Zero packages, continuing anyway"
|
||||
}
|
||||
fi
|
||||
msg_ok "Installed Intel® Level Zero"
|
||||
|
||||
msg_info "Installing Intel® oneAPI Base Toolkit (Patience)"
|
||||
|
||||
@@ -33,7 +33,7 @@ cp .env.sample .env
|
||||
export NODE_ENV=development
|
||||
sed -i 's/NODE_ENV=production/NODE_ENV=development/g' /opt/outline/.env
|
||||
sed -i "s/generate_a_new_key/${SECRET_KEY}/g" /opt/outline/.env
|
||||
sed -i "s/user:pass@postgres/${DB_USER}:${DB_PASS}@localhost/g" /opt/outline/.env
|
||||
sed -i "s/user:pass@postgres/${PG_DB_USER}:${PG_DB_PASS}@localhost/g" /opt/outline/.env
|
||||
sed -i 's/redis:6379/localhost:6379/g' /opt/outline/.env
|
||||
sed -i "5s#URL=#URL=http://${LOCAL_IP}#g" /opt/outline/.env
|
||||
sed -i 's/FORCE_HTTPS=true/FORCE_HTTPS=false/g' /opt/outline/.env
|
||||
|
||||
@@ -37,8 +37,12 @@ msg_info "Setup Paperless-AI"
|
||||
cd /opt/paperless-ai
|
||||
$STD python3 -m venv /opt/paperless-ai/venv
|
||||
source /opt/paperless-ai/venv/bin/activate
|
||||
# TMPDIR to use container disk instead of tmpfs for large pip downloads (https://github.com/community-scripts/ProxmoxVE/issues/10338)
|
||||
export TMPDIR=/opt/paperless-ai/tmp
|
||||
mkdir -p "$TMPDIR"
|
||||
$STD pip install --upgrade pip
|
||||
$STD pip install --no-cache-dir -r requirements.txt
|
||||
rm -rf "$TMPDIR"
|
||||
mkdir -p data/chromadb
|
||||
$STD npm ci --only=production
|
||||
mkdir -p /opt/paperless-ai/data
|
||||
|
||||
@@ -13,65 +13,20 @@ setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y \
|
||||
lsb-release \
|
||||
apache2 \
|
||||
composer
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PHP_VERSION="8.4" PHP_MODULE="mysql,sqlite3" PHP_APACHE="YES" PHP_FPM="YES" setup_php
|
||||
setup_composer
|
||||
setup_mariadb
|
||||
|
||||
msg_info "Adding PHP8.4 Repository"
|
||||
$STD curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
|
||||
$STD dpkg -i /tmp/debsuryorg-archive-keyring.deb
|
||||
cat <<EOF >/etc/apt/sources.list.d/php.sources
|
||||
Types: deb
|
||||
URIs: https://packages.sury.org/php/
|
||||
Suites: $(lsb_release -sc)
|
||||
Components: main
|
||||
Signed-By: /usr/share/keyrings/deb.sury.org-php.gpg
|
||||
EOF
|
||||
$STD apt update
|
||||
msg_ok "Added PHP8.4 Repository"
|
||||
|
||||
msg_info "Installing PHP"
|
||||
$STD apt remove -y php8.2*
|
||||
$STD apt install -y \
|
||||
php8.4 \
|
||||
php8.4-{gd,mysql,mbstring,bcmath,xml,curl,zip,intl,sqlite3,fpm} \
|
||||
libapache2-mod-php8.4
|
||||
msg_info "Installed PHP"
|
||||
|
||||
msg_info "Setting up MariaDB"
|
||||
DB_NAME=panel
|
||||
DB_USER=pelican
|
||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||
$STD mariadb -u root -e "CREATE DATABASE $DB_NAME;"
|
||||
$STD mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
|
||||
$STD mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||
{
|
||||
echo "Pelican Panel-Credentials"
|
||||
echo "Pelican Panel Database User: $DB_USER"
|
||||
echo "Pelican Panel Database Password: $DB_PASS"
|
||||
echo "Pelican Panel Database Name: $DB_NAME"
|
||||
} >>~/pelican-panel.creds
|
||||
msg_ok "Set up MariaDB"
|
||||
MARIADB_DB_NAME="panel" MARIADB_DB_USER="pelican" setup_mariadb_db
|
||||
fetch_and_deploy_gh_release "pelican-panel" "pelican-dev/panel" "prebuild" "latest" "/opt/pelican-panel" "panel.tar.gz"
|
||||
|
||||
msg_info "Installing Pelican Panel"
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/pelican-dev/panel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
mkdir /opt/pelican-panel
|
||||
cd /opt/pelican-panel
|
||||
curl -fsSL "https://github.com/pelican-dev/panel/releases/download/v${RELEASE}/panel.tar.gz" -o "panel.tar.gz"
|
||||
tar -xzf "panel.tar.gz"
|
||||
$STD composer install --no-dev --optimize-autoloader --no-interaction
|
||||
$STD php artisan p:environment:setup
|
||||
$STD php artisan p:environment:queue-service --no-interaction
|
||||
echo "* * * * * php /opt/pelican-panel/artisan schedule:run >> /dev/null 2>&1" | crontab -u www-data -
|
||||
chown -R www-data:www-data /opt/pelican-panel
|
||||
chmod -R 755 /opt/pelican-panel/storage /opt/pelican-panel/bootstrap/cache/
|
||||
rm -rf "/opt/pelican-panel/panel.tar.gz"
|
||||
echo "${RELEASE}" >/opt/"${APPLICATION}"_version.txt
|
||||
msg_ok "Installed Pelican Panel"
|
||||
|
||||
msg_info "Creating Service"
|
||||
|
||||
@@ -15,19 +15,14 @@ update_os
|
||||
|
||||
msg_info "Installing Docker"
|
||||
DOCKER_CONFIG_PATH='/etc/docker/daemon.json'
|
||||
mkdir -p $(dirname $DOCKER_CONFIG_PATH)
|
||||
echo -e '{\n "log-driver": "journald"\n}' >/etc/docker/daemon.json
|
||||
mkdir -p "$(dirname $DOCKER_CONFIG_PATH)"
|
||||
echo -e '{\n "log-driver": "journald"\n}' >"$DOCKER_CONFIG_PATH"
|
||||
$STD sh <(curl -fsSL https://get.docker.com)
|
||||
systemctl enable -q --now docker
|
||||
msg_ok "Installed Docker"
|
||||
|
||||
msg_info "Installing Pelican Wings"
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/pelican-dev/wings/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
curl -fsSL "https://github.com/pelican-dev/wings/releases/download/v${RELEASE}/wings_linux_amd64" -o "/usr/local/bin/wings"
|
||||
chmod u+x /usr/local/bin/wings
|
||||
fetch_and_deploy_gh_release "wings" "pelican-dev/wings" "singlefile" "latest" "/usr/local/bin" "wings_linux_amd64"
|
||||
mkdir -p /etc/pelican /var/run/wings
|
||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||
msg_ok "Installed Pelican Wings"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/wings.service
|
||||
|
||||
@@ -17,7 +17,7 @@ msg_info "Installing Dependencies"
|
||||
$STD apt install -y fping
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PHP_VERSION="8.3" PHP_APACHE="YES" PHP_FPM="YES" PHP_MODULE="pdo,pdo-mysql,gmp,snmp,ldap,apcu" setup_php
|
||||
PHP_VERSION="8.4" PHP_APACHE="YES" PHP_FPM="YES" PHP_MODULE="mysql,gmp,snmp,ldap,apcu" setup_php
|
||||
|
||||
msg_info "Installing PHP-PEAR"
|
||||
$STD apt install -y \
|
||||
@@ -39,7 +39,7 @@ sed -i -e "s/\(\$disable_installer = \).*/\1true;/" \
|
||||
-e "s/\(\$db\['pass'\] = \).*/\1'$MARIADB_DB_PASS';/" \
|
||||
-e "s/\(\$db\['name'\] = \).*/\1'$MARIADB_DB_NAME';/" \
|
||||
/opt/phpipam/config.php
|
||||
sed -i '/max_execution_time/s/= .*/= 600/' /etc/php/8.3/apache2/php.ini
|
||||
sed -i '/max_execution_time/s/= .*/= 600/' /etc/php/8.4/apache2/php.ini
|
||||
msg_ok "Installed phpIPAM"
|
||||
|
||||
msg_info "Creating Service"
|
||||
|
||||
@@ -17,6 +17,8 @@ read -r -p "${TAB3}What public URL do you want to use (e.g. pocketid.mydomain.co
|
||||
fetch_and_deploy_gh_release "pocket-id" "pocket-id/pocket-id" "singlefile" "latest" "/opt/pocket-id/" "pocket-id-linux-amd64"
|
||||
|
||||
msg_info "Configuring Pocket ID"
|
||||
ENCRYPTION_KEY=$(openssl rand -base64 32)
|
||||
|
||||
cat <<EOF >/opt/pocket-id/.env
|
||||
APP_ENV=production
|
||||
APP_URL=https://${public_url}
|
||||
@@ -24,6 +26,7 @@ TRUST_PROXY=false
|
||||
# MAXMIND_LICENSE_KEY=
|
||||
PORT=1411
|
||||
HOST=0.0.0.0
|
||||
ENCRYPTION_KEY=${ENCRYPTION_KEY}
|
||||
EOF
|
||||
msg_ok "Configured Pocket ID"
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ else
|
||||
fi
|
||||
|
||||
mkdir -p /etc/pulse
|
||||
fetch_and_deploy_gh_release "pulse" "rcourtman/Pulse" "prebuild" "latest" "/opt/pulse" "*-linux-amd64.tar.gz"
|
||||
fetch_and_deploy_gh_release "pulse" "rcourtman/Pulse" "prebuild" "latest" "/opt/pulse" "pulse-v*-linux-amd64.tar.gz"
|
||||
ln -sf /opt/pulse/bin/pulse /usr/local/bin/pulse
|
||||
chown -R pulse:pulse /etc/pulse /opt/pulse
|
||||
msg_ok "Installed Pulse"
|
||||
|
||||
@@ -24,7 +24,7 @@ msg_ok "Installed Dependencies"
|
||||
|
||||
JAVA_VERSION="25" setup_java
|
||||
PG_VERSION="17" PG_MODULES="postgis" setup_postgresql
|
||||
PG_DB_NAME="reitti_db" PG_DB_USER="reitti" setup_postgresql_db
|
||||
PG_DB_NAME="reitti_db" PG_DB_USER="reitti" PG_DB_EXTENSIONS="postgis" setup_postgresql_db
|
||||
|
||||
msg_info "Configuring RabbitMQ"
|
||||
RABBIT_USER="reitti"
|
||||
@@ -50,6 +50,8 @@ mv /opt/photon/photon-*.jar /opt/photon/photon.jar
|
||||
msg_info "Installing Nginx Tile Cache"
|
||||
mkdir -p /var/cache/nginx/tiles
|
||||
cat <<EOF >/etc/nginx/nginx.conf
|
||||
user www-data;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
@@ -68,7 +70,8 @@ http {
|
||||
}
|
||||
}
|
||||
EOF
|
||||
chown -R www-data:www-data /var/cache/nginx/tiles
|
||||
chown -R www-data:www-data /var/cache/nginx
|
||||
chmod -R 750 /var/cache/nginx
|
||||
systemctl restart nginx
|
||||
msg_info "Installed Nginx Tile Cache"
|
||||
|
||||
|
||||
@@ -17,18 +17,13 @@ msg_info "Installing Dependencies"
|
||||
$STD apt install -y sqlite3
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
setup_go
|
||||
setup_deb822_repo \
|
||||
"sftpgo" \
|
||||
"https://ftp.osuosl.org/pub/sftpgo/apt/gpg.key" \
|
||||
"https://ftp.osuosl.org/pub/sftpgo/apt" \
|
||||
"trixie"
|
||||
|
||||
msg_info "Installing SFTPGo"
|
||||
curl -fsSL https://ftp.osuosl.org/pub/sftpgo/apt/gpg.key | gpg --dearmor -o /usr/share/keyrings/sftpgo-archive-keyring.gpg
|
||||
cat <<EOF >/etc/apt/sources.list.d/sftpgo.sources
|
||||
Types: deb
|
||||
URIs: https://ftp.osuosl.org/pub/sftpgo/apt
|
||||
Suites: bookworm
|
||||
Components: main
|
||||
Signed-By: /usr/share/keyrings/sftpgo-archive-keyring.gpg
|
||||
EOF
|
||||
$STD apt update
|
||||
$STD apt install -y sftpgo
|
||||
msg_ok "Installed SFTPGo"
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ msg_info "Installing Dependencies"
|
||||
$STD apt install -y \
|
||||
nginx \
|
||||
sqlite3
|
||||
setcap cap_net_raw+ep /bin/ping
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="common,sqlite3,redis" setup_php
|
||||
@@ -71,6 +72,8 @@ SESSION_LIFETIME=120
|
||||
|
||||
SPEEDTEST_SCHEDULE="0 */6 * * *"
|
||||
SPEEDTEST_SERVERS=
|
||||
SPEEDTEST_EXTERNAL_IP_URL=https://ip.me
|
||||
SPEEDTEST_INTERNET_CHECK_HOSTNAME=1.1.1.1
|
||||
PRUNE_RESULTS_OLDER_THAN=0
|
||||
|
||||
DISPLAY_TIMEZONE=${TIMEZONE}
|
||||
|
||||
@@ -23,7 +23,7 @@ if [[ ! "$CONFIRM" =~ ^([yY][eE][sS]|[yY])$ ]]; then
|
||||
msg_error "Aborted by user. No changes have been made."
|
||||
exit 10
|
||||
fi
|
||||
bash <(curl -sL s5n.sh)
|
||||
bash <(curl -fsSL https://s5n.sh)
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
@@ -39,6 +39,14 @@ rm -f wazuh-*.sh
|
||||
rm -f ~/wazuh-install.output
|
||||
msg_ok "Setup Wazuh"
|
||||
|
||||
# Fix LXC container false positives in rootcheck
|
||||
# When running Wazuh in an LXC container, /dev/.lxc/* paths trigger false alerts
|
||||
if [ -d /dev/.lxc ]; then
|
||||
msg_info "Adding LXC rootcheck exclusion"
|
||||
sed -i '/<\/rootcheck>/i \ <ignore>/dev/.lxc</ignore>' /var/ossec/etc/ossec.conf
|
||||
msg_ok "Added LXC rootcheck exclusion"
|
||||
fi
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
|
||||
@@ -52,6 +52,7 @@ msg_ok "Installed Zammad"
|
||||
msg_info "Setup Services"
|
||||
cp /opt/zammad/contrib/nginx/zammad.conf /etc/nginx/sites-available/zammad.conf
|
||||
sed -i "s/server_name localhost;/server_name $LOCAL_IP;/g" /etc/nginx/sites-available/zammad.conf
|
||||
unlink /etc/nginx/sites-available/default
|
||||
$STD systemctl reload nginx
|
||||
msg_ok "Created Service"
|
||||
|
||||
|
||||
@@ -2783,6 +2783,7 @@ build_container() {
|
||||
export PCT_OSTYPE="$var_os"
|
||||
export PCT_OSVERSION="$var_version"
|
||||
export PCT_DISK_SIZE="$DISK_SIZE"
|
||||
export IPV6_METHOD="$IPV6_METHOD"
|
||||
|
||||
# DEV_MODE exports (optional, for debugging)
|
||||
export BUILD_LOG="$BUILD_LOG"
|
||||
@@ -3181,7 +3182,8 @@ EOF'
|
||||
pct exec "$CTID" -- ash -c "apk add bash newt curl openssh nano mc ncurses jq >/dev/null"
|
||||
else
|
||||
sleep 3
|
||||
pct exec "$CTID" -- bash -c "sed -i '/$LANG/ s/^# //' /etc/locale.gen"
|
||||
LANG=${LANG:-en_US.UTF-8}
|
||||
pct exec "$CTID" -- bash -c "sed -i \"/$LANG/ s/^# //\" /etc/locale.gen"
|
||||
pct exec "$CTID" -- bash -c "locale_line=\$(grep -v '^#' /etc/locale.gen | grep -E '^[a-zA-Z]' | awk '{print \$1}' | head -n 1) && \
|
||||
echo LANG=\$locale_line >/etc/default/locale && \
|
||||
locale-gen >/dev/null && \
|
||||
|
||||
@@ -809,21 +809,15 @@ cleanup_lxc() {
|
||||
find /tmp /var/tmp -type f -name 'tmp*' -delete 2>/dev/null || true
|
||||
find /tmp /var/tmp -type f -name 'tempfile*' -delete 2>/dev/null || true
|
||||
|
||||
# Truncate writable log files silently (permission errors ignored)
|
||||
if command -v truncate >/dev/null 2>&1; then
|
||||
find /var/log -type f -writable -print0 2>/dev/null |
|
||||
xargs -0 -n1 truncate -s 0 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Node.js npm - directly remove cache directory
|
||||
# npm cache clean/verify can fail with ENOTEMPTY errors, so we skip them
|
||||
if command -v npm &>/dev/null; then
|
||||
rm -rf /root/.npm/_cacache /root/.npm/_logs 2>/dev/null || true
|
||||
fi
|
||||
# Node.js yarn
|
||||
if command -v yarn &>/dev/null; then $STD yarn cache clean || true; fi
|
||||
if command -v yarn &>/dev/null; then yarn cache clean &>/dev/null || true; fi
|
||||
# Node.js pnpm
|
||||
if command -v pnpm &>/dev/null; then $STD pnpm store prune || true; fi
|
||||
if command -v pnpm &>/dev/null; then pnpm store prune &>/dev/null || true; fi
|
||||
# Go
|
||||
if command -v go &>/dev/null; then $STD go clean -cache -modcache || true; fi
|
||||
# Rust cargo
|
||||
@@ -831,11 +825,8 @@ cleanup_lxc() {
|
||||
# Ruby gem
|
||||
if command -v gem &>/dev/null; then $STD gem cleanup || true; fi
|
||||
# Composer (PHP)
|
||||
if command -v composer &>/dev/null; then COMPOSER_ALLOW_SUPERUSER=1 && $STD composer clear-cache || true; fi
|
||||
if command -v composer &>/dev/null; then COMPOSER_ALLOW_SUPERUSER=1 $STD composer clear-cache || true; fi
|
||||
|
||||
if command -v journalctl &>/dev/null; then
|
||||
$STD journalctl --vacuum-time=10m || true
|
||||
fi
|
||||
msg_ok "Cleaned"
|
||||
}
|
||||
|
||||
|
||||
279
misc/tools.func
279
misc/tools.func
@@ -2571,6 +2571,12 @@ function setup_gs() {
|
||||
# - Some things are fetched from intel repositories due to not being in debian repositories.
|
||||
# ------------------------------------------------------------------------------
|
||||
function setup_hwaccel() {
|
||||
# Check if user explicitly disabled GPU in advanced settings
|
||||
if [[ "${var_gpu:-no}" == "no" ]]; then
|
||||
msg_info "GPU acceleration disabled by user (var_gpu=no) - skipping setup"
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Check if GPU passthrough is enabled (device nodes must exist)
|
||||
# /dev/dri = Intel iGPU, AMD GPU (open-source drivers)
|
||||
# /dev/nvidia* = NVIDIA proprietary drivers
|
||||
@@ -2583,14 +2589,14 @@ function setup_hwaccel() {
|
||||
msg_info "Setup Hardware Acceleration"
|
||||
|
||||
if ! command -v lspci &>/dev/null; then
|
||||
$STD apt -y update || {
|
||||
msg_error "Failed to update package list"
|
||||
return 1
|
||||
}
|
||||
$STD apt -y install pciutils || {
|
||||
msg_error "Failed to install pciutils"
|
||||
return 1
|
||||
}
|
||||
if ! $STD apt -y update; then
|
||||
msg_warn "Failed to update package list - skipping hardware acceleration setup"
|
||||
return 0
|
||||
fi
|
||||
if ! $STD apt -y install pciutils; then
|
||||
msg_warn "Failed to install pciutils - skipping hardware acceleration setup"
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
|
||||
# Detect GPU vendor (Intel, AMD, NVIDIA)
|
||||
@@ -2622,33 +2628,76 @@ function setup_hwaccel() {
|
||||
case "$gpu_vendor" in
|
||||
Intel)
|
||||
# Detect Intel GPU generation for driver selection
|
||||
# Gen 9+ (Skylake and newer) benefit from non-free drivers
|
||||
# Gen 9+ (Skylake 2015 and newer): UHD, Iris, Arc - benefit from latest drivers
|
||||
# Gen 7-8 (Haswell 2013-Broadwell 2014): HD 4xxx-5xxx - use repo drivers only
|
||||
# Gen 6 and older (Sandy Bridge 2011 and earlier): HD 2xxx-3xxx - basic repo support
|
||||
local intel_gen=""
|
||||
local use_repo_only=false
|
||||
local needs_nonfree=false
|
||||
|
||||
# Check for specific Intel GPU models that need non-free drivers
|
||||
if echo "$gpu_info" | grep -Ei 'HD Graphics [56][0-9]{2}|UHD Graphics|Iris|Arc|DG[12]' &>/dev/null; then
|
||||
# Detect older Intel GPUs (Gen 6-8: HD 2xxx through HD 5xxx series)
|
||||
# These should ONLY use repository packages, not latest GitHub releases
|
||||
if echo "$gpu_info" | grep -Ei 'HD Graphics [2-5][0-9]{3}' &>/dev/null; then
|
||||
use_repo_only=true
|
||||
intel_gen="gen6-8"
|
||||
msg_info "Detected older Intel GPU (HD 2000-5999) - using stable repository drivers only"
|
||||
# Detect newer Intel GPUs (Gen 9+: HD 6xxx+, UHD, Iris, Arc)
|
||||
elif echo "$gpu_info" | grep -Ei 'HD Graphics [6-9][0-9]{2,3}|UHD Graphics|Iris|Arc|DG[12]' &>/dev/null; then
|
||||
needs_nonfree=true
|
||||
intel_gen="gen9+"
|
||||
msg_info "Detected newer Intel GPU (Gen 9+) - installing latest drivers"
|
||||
else
|
||||
# Unknown Intel GPU - play it safe with repo only
|
||||
use_repo_only=true
|
||||
intel_gen="unknown"
|
||||
msg_warn "Unknown Intel GPU detected - using stable repository drivers only"
|
||||
fi
|
||||
|
||||
if [[ "$os_id" == "ubuntu" ]]; then
|
||||
# Ubuntu: Use packages from Ubuntu repos
|
||||
$STD apt -y install \
|
||||
if ! $STD apt -y install \
|
||||
va-driver-all \
|
||||
ocl-icd-libopencl1 \
|
||||
intel-opencl-icd \
|
||||
vainfo \
|
||||
intel-gpu-tools || {
|
||||
msg_error "Failed to install Intel GPU dependencies"
|
||||
return 1
|
||||
}
|
||||
# Try to install intel-media-va-driver for newer GPUs
|
||||
$STD apt -y install intel-media-va-driver 2>/dev/null || true
|
||||
intel-gpu-tools; then
|
||||
msg_warn "Failed to install Intel GPU dependencies - skipping hardware acceleration"
|
||||
return 0
|
||||
fi
|
||||
# Try newer packages that may not be available on all versions
|
||||
$STD apt -y install intel-opencl-icd 2>/dev/null || msg_warn "intel-opencl-icd not available, skipping"
|
||||
$STD apt -y install libmfx-gen1.2 2>/dev/null || msg_warn "libmfx-gen1.2 not available, skipping"
|
||||
$STD apt -y install intel-media-va-driver 2>/dev/null || msg_warn "intel-media-va-driver not available, skipping"
|
||||
|
||||
elif [[ "$os_id" == "debian" ]]; then
|
||||
# Debian: Check version and install appropriate drivers
|
||||
if [[ "$needs_nonfree" == true ]]; then
|
||||
# For older GPUs or when we want repo-only packages
|
||||
if [[ "$use_repo_only" == true ]]; then
|
||||
msg_info "Installing Intel GPU drivers from Debian repositories"
|
||||
|
||||
# Fix any broken packages first
|
||||
$STD apt --fix-broken install -y 2>/dev/null || true
|
||||
|
||||
# Install base VA-API and tools (these should always work)
|
||||
if ! $STD apt -y install \
|
||||
va-driver-all \
|
||||
i965-va-driver \
|
||||
vainfo \
|
||||
intel-gpu-tools \
|
||||
ocl-icd-libopencl1; then
|
||||
msg_warn "Failed to install base Intel GPU support - skipping hardware acceleration"
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Try to install additional packages that might help but aren't critical
|
||||
$STD apt -y install mesa-va-drivers 2>/dev/null || msg_warn "mesa-va-drivers not available"
|
||||
# Skip intel-opencl-icd on Debian 12 (Bookworm) - causes dependency issues with old GPUs
|
||||
if [[ "$os_codename" != "bookworm" ]]; then
|
||||
$STD apt -y install intel-opencl-icd 2>/dev/null || msg_warn "OpenCL support not available from repositories"
|
||||
fi
|
||||
|
||||
msg_ok "Installed Intel GPU drivers from Debian repositories (stable)"
|
||||
|
||||
# For newer GPUs, try non-free drivers first, then fallback
|
||||
elif [[ "$needs_nonfree" == true ]]; then
|
||||
# Add non-free repo for intel-media-va-driver-non-free
|
||||
if [[ "$os_codename" == "bookworm" ]]; then
|
||||
# Debian 12 Bookworm
|
||||
@@ -2661,16 +2710,38 @@ Components: non-free non-free-firmware
|
||||
EOF
|
||||
$STD apt update
|
||||
fi
|
||||
$STD apt -y install \
|
||||
intel-media-va-driver-non-free \
|
||||
ocl-icd-libopencl1 \
|
||||
intel-opencl-icd \
|
||||
vainfo \
|
||||
intel-gpu-tools || {
|
||||
msg_warn "Non-free driver install failed, falling back to open drivers"
|
||||
needs_nonfree=false
|
||||
|
||||
# Fetch Intel IGC packages from GitHub - not available in Debian 12 repos
|
||||
# intel-opencl-icd and libigdgmm12 are available, so we install those via apt
|
||||
msg_info "Installing Intel IGC packages from GitHub releases"
|
||||
|
||||
fetch_and_deploy_gh_release "intel-igc-core" "intel/intel-graphics-compiler" "binary" "latest" "" "intel-igc-core_*_amd64.deb" || {
|
||||
msg_warn "Failed to deploy Intel IGC core"
|
||||
}
|
||||
|
||||
fetch_and_deploy_gh_release "intel-graphics-compiler" "intel/intel-graphics-compiler" "binary" "latest" "" "intel-graphics-compiler_*_amd64.deb" || {
|
||||
msg_warn "Failed to deploy Intel graphics compiler"
|
||||
}
|
||||
|
||||
fetch_and_deploy_gh_release "intel-igc-opencl" "intel/intel-graphics-compiler" "binary" "latest" "" "intel-igc-opencl_*_amd64.deb" || {
|
||||
msg_warn "Failed to deploy Intel IGC OpenCL"
|
||||
}
|
||||
|
||||
# Try installing non-free drivers for newer Intel GPUs
|
||||
if $STD apt -y install \
|
||||
intel-media-va-driver-non-free \
|
||||
intel-opencl-icd \
|
||||
libigdgmm12 \
|
||||
ocl-icd-libopencl1 \
|
||||
vainfo \
|
||||
libmfx-gen1.2 \
|
||||
intel-gpu-tools; then
|
||||
msg_ok "Installed Intel non-free drivers for Gen 9+ GPU"
|
||||
else
|
||||
msg_warn "Non-free driver install failed, falling back to repository drivers"
|
||||
use_repo_only=true
|
||||
fi
|
||||
|
||||
elif [[ "$os_codename" == "trixie" || "$os_codename" == "sid" ]]; then
|
||||
# Debian 13 Trixie / Sid
|
||||
if [[ ! -f /etc/apt/sources.list.d/non-free.sources ]]; then
|
||||
@@ -2687,61 +2758,88 @@ Components: non-free non-free-firmware
|
||||
EOF
|
||||
$STD apt update
|
||||
fi
|
||||
$STD apt -y install \
|
||||
|
||||
# Fetch Intel packages from GitHub - not available in Debian 13 repos
|
||||
# libigdgmm12 is available in trixie, but intel-opencl-icd is missing
|
||||
msg_info "Installing Intel packages from GitHub releases"
|
||||
|
||||
fetch_and_deploy_gh_release "intel-igc-core" "intel/intel-graphics-compiler" "binary" "latest" "" "intel-igc-core_*_amd64.deb" || {
|
||||
msg_warn "Failed to deploy Intel IGC core"
|
||||
}
|
||||
|
||||
fetch_and_deploy_gh_release "intel-graphics-compiler" "intel/intel-graphics-compiler" "binary" "latest" "" "intel-graphics-compiler_*_amd64.deb" || {
|
||||
msg_warn "Failed to deploy Intel graphics compiler"
|
||||
}
|
||||
|
||||
fetch_and_deploy_gh_release "intel-igc-opencl" "intel/intel-graphics-compiler" "binary" "latest" "" "intel-igc-opencl_*_amd64.deb" || {
|
||||
msg_warn "Failed to deploy Intel IGC OpenCL"
|
||||
}
|
||||
|
||||
fetch_and_deploy_gh_release "intel-opencl-icd" "intel/compute-runtime" "binary" "latest" "" "intel-opencl-icd_*_amd64.deb" || {
|
||||
msg_warn "Failed to deploy Intel OpenCL ICD (missing from trixie repos)"
|
||||
}
|
||||
|
||||
# Try installing packages for Debian 13
|
||||
if $STD apt -y install \
|
||||
intel-media-va-driver-non-free \
|
||||
libigdgmm12 \
|
||||
ocl-icd-libopencl1 \
|
||||
mesa-opencl-icd \
|
||||
mesa-va-drivers \
|
||||
libvpl2 \
|
||||
vainfo \
|
||||
intel-gpu-tools 2>/dev/null || {
|
||||
msg_warn "Non-free driver install failed, falling back to open drivers"
|
||||
needs_nonfree=false
|
||||
}
|
||||
libmfx-gen1.2 \
|
||||
intel-gpu-tools 2>/dev/null; then
|
||||
msg_ok "Installed Intel drivers for Gen 9+ GPU (Debian 13)"
|
||||
else
|
||||
msg_warn "Advanced driver install failed, falling back to repository drivers"
|
||||
use_repo_only=true
|
||||
fi
|
||||
else
|
||||
# Unknown Debian version - use repo only
|
||||
use_repo_only=true
|
||||
fi
|
||||
fi
|
||||
|
||||
# Fallback to open drivers or older Intel GPUs
|
||||
if [[ "$needs_nonfree" == false ]]; then
|
||||
# Fetch latest Intel drivers from GitHub for Debian
|
||||
fetch_and_deploy_gh_release "" "intel/intel-graphics-compiler" "binary" "latest" "" "intel-igc-core-2_*_amd64.deb" || {
|
||||
msg_warn "Failed to deploy Intel IGC core 2"
|
||||
}
|
||||
fetch_and_deploy_gh_release "" "intel/intel-graphics-compiler" "binary" "latest" "" "intel-igc-opencl-2_*_amd64.deb" || {
|
||||
msg_warn "Failed to deploy Intel IGC OpenCL 2"
|
||||
}
|
||||
fetch_and_deploy_gh_release "" "intel/compute-runtime" "binary" "latest" "" "libigdgmm12_*_amd64.deb" || {
|
||||
msg_warn "Failed to deploy Intel GDGMM12"
|
||||
}
|
||||
fetch_and_deploy_gh_release "" "intel/compute-runtime" "binary" "latest" "" "intel-opencl-icd_*_amd64.deb" || {
|
||||
msg_warn "Failed to deploy Intel OpenCL ICD"
|
||||
}
|
||||
# Fallback: If we set use_repo_only during error handling above
|
||||
if [[ "$use_repo_only" == true && "$needs_nonfree" == true ]]; then
|
||||
msg_info "Installing fallback Intel GPU drivers from repositories"
|
||||
|
||||
$STD apt -y install \
|
||||
# Fix any broken packages from failed install attempts
|
||||
$STD apt --fix-broken install -y 2>/dev/null || true
|
||||
$STD apt -y autoremove 2>/dev/null || true
|
||||
|
||||
# Remove any partially installed packages that are causing issues
|
||||
dpkg -l | grep -E 'intel-igc|libigdgmm|intel-opencl-icd' | awk '{print $2}' | xargs -r dpkg --purge 2>/dev/null || true
|
||||
|
||||
# Clean install of stable repository packages
|
||||
if ! $STD apt -y install \
|
||||
va-driver-all \
|
||||
i965-va-driver \
|
||||
ocl-icd-libopencl1 \
|
||||
mesa-opencl-icd \
|
||||
mesa-va-drivers \
|
||||
vainfo \
|
||||
intel-gpu-tools || {
|
||||
msg_error "Failed to install Intel GPU dependencies"
|
||||
return 1
|
||||
}
|
||||
intel-gpu-tools; then
|
||||
msg_warn "Failed to install fallback Intel GPU dependencies - skipping hardware acceleration"
|
||||
return 0
|
||||
fi
|
||||
msg_ok "Installed fallback Intel GPU drivers from repositories"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
AMD)
|
||||
$STD apt -y install \
|
||||
if ! $STD apt -y install \
|
||||
mesa-va-drivers \
|
||||
mesa-vdpau-drivers \
|
||||
mesa-opencl-icd \
|
||||
ocl-icd-libopencl1 \
|
||||
vainfo \
|
||||
clinfo 2>/dev/null || {
|
||||
msg_error "Failed to install AMD GPU dependencies"
|
||||
return 1
|
||||
}
|
||||
clinfo 2>/dev/null; then
|
||||
msg_warn "Failed to install AMD GPU dependencies - skipping hardware acceleration"
|
||||
return 0
|
||||
fi
|
||||
|
||||
# For AMD GPUs, firmware-amd-graphics requires non-free repositories
|
||||
if [[ "$os_id" == "debian" ]]; then
|
||||
@@ -2816,19 +2914,33 @@ EOF
|
||||
|
||||
# Set permissions for /dev/dri (only in privileged containers and if /dev/dri exists)
|
||||
if [[ "$in_ct" == "0" && -d /dev/dri ]]; then
|
||||
chgrp video /dev/dri 2>/dev/null || true
|
||||
chmod 755 /dev/dri 2>/dev/null || true
|
||||
chmod 660 /dev/dri/* 2>/dev/null || true
|
||||
$STD adduser "$(id -u -n)" video 2>/dev/null || true
|
||||
$STD adduser "$(id -u -n)" render 2>/dev/null || true
|
||||
# Verify /dev/dri contains actual device nodes
|
||||
if ls /dev/dri/card* /dev/dri/renderD* &>/dev/null; then
|
||||
chgrp video /dev/dri 2>/dev/null || true
|
||||
chmod 755 /dev/dri 2>/dev/null || true
|
||||
chmod 660 /dev/dri/* 2>/dev/null || true
|
||||
$STD adduser "$(id -u -n)" video 2>/dev/null || true
|
||||
$STD adduser "$(id -u -n)" render 2>/dev/null || true
|
||||
|
||||
# Sync GID for video/render groups between host and container
|
||||
local host_video_gid host_render_gid
|
||||
host_video_gid=$(getent group video | cut -d: -f3)
|
||||
host_render_gid=$(getent group render | cut -d: -f3)
|
||||
if [[ -n "$host_video_gid" && -n "$host_render_gid" ]]; then
|
||||
sed -i "s/^video:x:[0-9]*:/video:x:$host_video_gid:/" /etc/group 2>/dev/null || true
|
||||
sed -i "s/^render:x:[0-9]*:/render:x:$host_render_gid:/" /etc/group 2>/dev/null || true
|
||||
# Sync GID for video/render groups between host and container
|
||||
local host_video_gid host_render_gid
|
||||
host_video_gid=$(getent group video | cut -d: -f3)
|
||||
host_render_gid=$(getent group render | cut -d: -f3)
|
||||
if [[ -n "$host_video_gid" && -n "$host_render_gid" ]]; then
|
||||
sed -i "s/^video:x:[0-9]*:/video:x:$host_video_gid:/" /etc/group 2>/dev/null || true
|
||||
sed -i "s/^render:x:[0-9]*:/render:x:$host_render_gid:/" /etc/group 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Basic GPU functionality test
|
||||
if command -v vainfo &>/dev/null; then
|
||||
if vainfo &>/dev/null; then
|
||||
msg_info "GPU hardware acceleration verified and working"
|
||||
else
|
||||
msg_warn "GPU drivers installed but vainfo test failed - check host GPU passthrough configuration"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
msg_warn "/dev/dri exists but contains no device nodes - GPU passthrough may not be configured correctly"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -3258,6 +3370,31 @@ setup_mariadb() {
|
||||
}
|
||||
fi
|
||||
|
||||
# Configure tmpfiles.d to ensure /run/mysqld directory is created on boot
|
||||
# This fixes the issue where MariaDB fails to start after container reboot
|
||||
msg_info "Configuring MariaDB runtime directory persistence"
|
||||
|
||||
# Create tmpfiles.d configuration with error handling
|
||||
if ! printf '# Ensure /run/mysqld directory exists with correct permissions for MariaDB\nd /run/mysqld 0755 mysql mysql -\n' >/etc/tmpfiles.d/mariadb.conf; then
|
||||
msg_warn "Failed to create /etc/tmpfiles.d/mariadb.conf - runtime directory may not persist on reboot"
|
||||
fi
|
||||
|
||||
# Create the directory now if it doesn't exist
|
||||
# Verify mysql user exists before attempting ownership change
|
||||
if [[ ! -d /run/mysqld ]]; then
|
||||
mkdir -p /run/mysqld
|
||||
# Set permissions first (works regardless of user existence)
|
||||
chmod 755 /run/mysqld
|
||||
# Set ownership only if mysql user exists
|
||||
if getent passwd mysql >/dev/null 2>&1; then
|
||||
chown mysql:mysql /run/mysqld
|
||||
else
|
||||
msg_warn "mysql user not found - directory created with correct permissions but ownership not set"
|
||||
fi
|
||||
fi
|
||||
|
||||
msg_ok "Configured MariaDB runtime directory persistence"
|
||||
|
||||
cache_installed_version "mariadb" "$MARIADB_VERSION"
|
||||
msg_ok "Setup MariaDB $MARIADB_VERSION"
|
||||
}
|
||||
|
||||
209
tools/addon/nextcloud-exporter.sh
Normal file
209
tools/addon/nextcloud-exporter.sh
Normal file
@@ -0,0 +1,209 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: CrazyWolf13
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/xperimental/nextcloud-exporter
|
||||
|
||||
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)
|
||||
|
||||
# Enable error handling
|
||||
set -Eeuo pipefail
|
||||
trap 'error_handler' ERR
|
||||
load_functions
|
||||
|
||||
# ==============================================================================
|
||||
# CONFIGURATION
|
||||
# ==============================================================================
|
||||
VERBOSE=${var_verbose:-no}
|
||||
APP="nextcloud-exporter"
|
||||
APP_TYPE="tools"
|
||||
BINARY_PATH="/usr/bin/nextcloud-exporter"
|
||||
CONFIG_PATH="/etc/nextcloud-exporter.env"
|
||||
SERVICE_PATH="/etc/systemd/system/nextcloud-exporter.service"
|
||||
|
||||
# ==============================================================================
|
||||
# OS DETECTION
|
||||
# ==============================================================================
|
||||
if ! grep -qE 'ID=debian|ID=ubuntu' /etc/os-release 2>/dev/null; then
|
||||
echo -e "${CROSS} Unsupported OS detected. This script only supports Debian and Ubuntu."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# ==============================================================================
|
||||
# UNINSTALL
|
||||
# ==============================================================================
|
||||
function uninstall() {
|
||||
msg_info "Uninstalling Nextcloud-Exporter"
|
||||
systemctl disable -q --now nextcloud-exporter
|
||||
rm -f "$SERVICE_PATH"
|
||||
|
||||
if dpkg -l | grep -q nextcloud-exporter; then
|
||||
$STD apt-get remove -y nextcloud-exporter || $STD dpkg -r nextcloud-exporter
|
||||
fi
|
||||
|
||||
rm -f "$CONFIG_PATH"
|
||||
rm -f "/usr/local/bin/update_nextcloud-exporter"
|
||||
rm -f "$HOME/.nextcloud-exporter"
|
||||
msg_ok "Nextcloud-Exporter has been uninstalled"
|
||||
}
|
||||
|
||||
# ==============================================================================
|
||||
# UPDATE
|
||||
# ==============================================================================
|
||||
function update() {
|
||||
if check_for_gh_release "nextcloud-exporter" "xperimental/nextcloud-exporter"; then
|
||||
msg_info "Stopping service"
|
||||
systemctl stop nextcloud-exporter
|
||||
msg_ok "Stopped service"
|
||||
|
||||
fetch_and_deploy_gh_release "nextcloud-exporter" "xperimental/nextcloud-exporter" "binary" "latest"
|
||||
|
||||
msg_info "Starting service"
|
||||
systemctl start nextcloud-exporter
|
||||
msg_ok "Started service"
|
||||
msg_ok "Updated successfully"
|
||||
exit
|
||||
fi
|
||||
}
|
||||
|
||||
# ==============================================================================
|
||||
# INSTALL
|
||||
# ==============================================================================
|
||||
function install() {
|
||||
read -erp "Enter URL of Nextcloud, example: (http://127.0.0.1:8080): " NEXTCLOUD_SERVER
|
||||
read -rsp "Enter Nextcloud auth token (press Enter to use username/password instead): " NEXTCLOUD_AUTH_TOKEN
|
||||
printf "\n"
|
||||
|
||||
if [[ -z "$NEXTCLOUD_AUTH_TOKEN" ]]; then
|
||||
read -erp "Enter Nextcloud username: " NEXTCLOUD_USERNAME
|
||||
read -rsp "Enter Nextcloud password: " NEXTCLOUD_PASSWORD
|
||||
printf "\n"
|
||||
fi
|
||||
|
||||
read -erp "Query additional info for apps? [Y/n]: " QUERY_APPS
|
||||
if [[ "${QUERY_APPS,,}" =~ ^(n|no)$ ]]; then
|
||||
NEXTCLOUD_INFO_APPS="false"
|
||||
fi
|
||||
|
||||
read -erp "Query update information? [Y/n]: " QUERY_UPDATES
|
||||
if [[ "${QUERY_UPDATES,,}" =~ ^(n|no)$ ]]; then
|
||||
NEXTCLOUD_INFO_UPDATE="false"
|
||||
fi
|
||||
|
||||
read -erp "Do you want to skip TLS-Verification (if using a self-signed Certificate on Nextcloud) [y/N]: " SKIP_TLS
|
||||
if [[ "${SKIP_TLS,,}" =~ ^(y|yes)$ ]]; then
|
||||
NEXTCLOUD_TLS_SKIP_VERIFY="true"
|
||||
fi
|
||||
|
||||
fetch_and_deploy_gh_release "nextcloud-exporter" "xperimental/nextcloud-exporter" "binary" "latest"
|
||||
|
||||
msg_info "Creating configuration"
|
||||
cat <<EOF >"$CONFIG_PATH"
|
||||
# https://github.com/xperimental/nextcloud-exporter
|
||||
NEXTCLOUD_SERVER="${NEXTCLOUD_SERVER}"
|
||||
NEXTCLOUD_AUTH_TOKEN="${NEXTCLOUD_AUTH_TOKEN:-}"
|
||||
NEXTCLOUD_USERNAME="${NEXTCLOUD_USERNAME:-}"
|
||||
NEXTCLOUD_PASSWORD="${NEXTCLOUD_PASSWORD:-}"
|
||||
NEXTCLOUD_INFO_UPDATE=${NEXTCLOUD_INFO_UPDATE:-"true"}
|
||||
NEXTCLOUD_INFO_APPS=${NEXTCLOUD_INFO_APPS:-"true"}
|
||||
NEXTCLOUD_TLS_SKIP_VERIFY=${NEXTCLOUD_TLS_SKIP_VERIFY:-"false"}
|
||||
NEXTCLOUD_LISTEN_ADDRESS=":9205"
|
||||
EOF
|
||||
msg_ok "Created configuration"
|
||||
|
||||
msg_info "Creating service"
|
||||
cat <<EOF >"$SERVICE_PATH"
|
||||
[Unit]
|
||||
Description=nextcloud-exporter
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
EnvironmentFile=$CONFIG_PATH
|
||||
ExecStart=$BINARY_PATH
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl daemon-reload
|
||||
systemctl enable -q --now nextcloud-exporter
|
||||
msg_ok "Created and started service"
|
||||
|
||||
# Create update script
|
||||
msg_info "Creating update script"
|
||||
ensure_usr_local_bin_persist
|
||||
cat <<'UPDATEEOF' >/usr/local/bin/update_nextcloud-exporter
|
||||
#!/usr/bin/env bash
|
||||
# nextcloud-exporter Update Script
|
||||
type=update bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/addon/nextcloud-exporter.sh)"
|
||||
UPDATEEOF
|
||||
chmod +x /usr/local/bin/update_nextcloud-exporter
|
||||
msg_ok "Created update script (/usr/local/bin/update_nextcloud-exporter)"
|
||||
|
||||
echo ""
|
||||
msg_ok "Nextcloud-Exporter installed successfully"
|
||||
msg_ok "Metrics: ${BL}http://${LOCAL_IP}:9205/metrics${CL}"
|
||||
msg_ok "Config: ${BL}${CONFIG_PATH}${CL}"
|
||||
}
|
||||
|
||||
# ==============================================================================
|
||||
# MAIN
|
||||
# ==============================================================================
|
||||
header_info
|
||||
ensure_usr_local_bin_persist
|
||||
import_local_ip
|
||||
|
||||
# Handle type=update (called from update script)
|
||||
if [[ "${type:-}" == "update" ]]; then
|
||||
if [[ -f "$BINARY_PATH" ]]; then
|
||||
update
|
||||
else
|
||||
msg_error "Nextcloud-Exporter is not installed. Nothing to update."
|
||||
exit 1
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Check if already installed
|
||||
if [[ -f "$BINARY_PATH" ]]; then
|
||||
msg_warn "Nextcloud-Exporter is already installed."
|
||||
echo ""
|
||||
|
||||
echo -n "${TAB}Uninstall Nextcloud-Exporter? (y/N): "
|
||||
read -r uninstall_prompt
|
||||
if [[ "${uninstall_prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||
uninstall
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo -n "${TAB}Update Nextcloud-Exporter? (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
|
||||
|
||||
# Fresh installation
|
||||
msg_warn "Nextcloud-Exporter is not installed."
|
||||
echo ""
|
||||
echo -e "${TAB}${INFO} This will install:"
|
||||
echo -e "${TAB} - Nextcloud Exporter (binary)"
|
||||
echo -e "${TAB} - Systemd service"
|
||||
echo ""
|
||||
|
||||
echo -n "${TAB}Install Nextcloud-Exporter? (y/N): "
|
||||
read -r install_prompt
|
||||
if [[ "${install_prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||
install
|
||||
else
|
||||
msg_warn "Installation cancelled. Exiting."
|
||||
exit 0
|
||||
fi
|
||||
6
tools/headers/nextcloud-exporter
Normal file
6
tools/headers/nextcloud-exporter
Normal file
@@ -0,0 +1,6 @@
|
||||
__ __ __ __
|
||||
____ ___ _ __/ /______/ /___ __ ______/ / ___ _ ______ ____ _____/ /____ _____
|
||||
/ __ \/ _ \| |/_/ __/ ___/ / __ \/ / / / __ /_____/ _ \| |/_/ __ \/ __ \/ ___/ __/ _ \/ ___/
|
||||
/ / / / __/> </ /_/ /__/ / /_/ / /_/ / /_/ /_____/ __/> </ /_/ / /_/ / / / /_/ __/ /
|
||||
/_/ /_/\___/_/|_|\__/\___/_/\____/\__,_/\__,_/ \___/_/|_/ .___/\____/_/ \__/\___/_/
|
||||
/_/
|
||||
@@ -57,7 +57,7 @@ spinner() {
|
||||
local frames=('⠋' '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
|
||||
local spin_i=0
|
||||
local interval=0.1
|
||||
|
||||
|
||||
trap 'exit 0' TERM INT
|
||||
printf "\e[?25l" 2>/dev/null
|
||||
|
||||
@@ -107,7 +107,6 @@ migrate_config() {
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# Update existing installation
|
||||
update_installation() {
|
||||
msg_info "Updating IP-Tag Scripts"
|
||||
@@ -179,7 +178,7 @@ EOF
|
||||
systemctl daemon-reload &>/dev/null
|
||||
systemctl enable -q --now iptag.service &>/dev/null
|
||||
msg_ok "Updated IP-Tag Scripts"
|
||||
|
||||
|
||||
# Show configuration information after update
|
||||
show_post_install_info
|
||||
}
|
||||
@@ -187,7 +186,7 @@ EOF
|
||||
# Install only command without service
|
||||
install_command_only() {
|
||||
msg_info "Installing IP-Tag Command Only"
|
||||
|
||||
|
||||
# Create directory if it doesn't exist
|
||||
if [[ ! -d "/opt/iptag" ]]; then
|
||||
mkdir -p /opt/iptag
|
||||
@@ -207,15 +206,15 @@ install_command_only() {
|
||||
echo -e "\n${YW}Configuration file already exists.${CL}"
|
||||
read -p "Do you want to reconfigure tag format? (y/n): " reconfigure
|
||||
case $reconfigure in
|
||||
[Yy]*)
|
||||
interactive_config_setup_command
|
||||
msg_info "Updating Configuration"
|
||||
generate_config >/opt/iptag/iptag.conf
|
||||
msg_ok "Updated configuration file"
|
||||
;;
|
||||
*)
|
||||
msg_ok "Keeping existing configuration file"
|
||||
;;
|
||||
[Yy]*)
|
||||
interactive_config_setup_command
|
||||
msg_info "Updating Configuration"
|
||||
generate_config >/opt/iptag/iptag.conf
|
||||
msg_ok "Updated configuration file"
|
||||
;;
|
||||
*)
|
||||
msg_ok "Keeping existing configuration file"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
@@ -240,7 +239,7 @@ exec "$SCRIPT_FILE"
|
||||
EOF
|
||||
chmod +x /usr/local/bin/iptag-run
|
||||
msg_ok "Created iptag-run command"
|
||||
|
||||
|
||||
msg_ok "IP-Tag Command installed successfully! Use 'iptag-run' to run manually."
|
||||
}
|
||||
|
||||
@@ -248,14 +247,14 @@ EOF
|
||||
show_post_install_info() {
|
||||
stop_spinner
|
||||
echo -e "\n${YW}=== Next Steps ===${CL}"
|
||||
|
||||
|
||||
# Show usage information
|
||||
if command -v iptag-run >/dev/null 2>&1; then
|
||||
echo -e "${YW}Run IP tagging manually: ${GN}iptag-run${CL}"
|
||||
echo -e "${YW}Add to cron for scheduled execution if needed${CL}"
|
||||
echo -e ""
|
||||
fi
|
||||
|
||||
|
||||
echo -e "${RD}IMPORTANT: Configure your network subnets!${CL}"
|
||||
echo -e ""
|
||||
echo -e "${YW}Configuration file: ${GN}/opt/iptag/iptag.conf${CL}"
|
||||
@@ -274,37 +273,37 @@ show_post_install_info() {
|
||||
# Interactive configuration setup for command-only (TAG_FORMAT only)
|
||||
interactive_config_setup_command() {
|
||||
echo -e "\n${YW}=== Configuration Setup ===${CL}"
|
||||
|
||||
|
||||
# TAG_FORMAT configuration
|
||||
echo -e "\n${YW}Select tag format:${CL}"
|
||||
echo -e "${GN}1)${CL} last_two_octets - Show last two octets (e.g., 0.100) [Default]"
|
||||
echo -e "${GN}2)${CL} last_octet - Show only last octet (e.g., 100)"
|
||||
echo -e "${GN}3)${CL} full - Show full IP address (e.g., 192.168.0.100)"
|
||||
|
||||
|
||||
while true; do
|
||||
read -p "Enter your choice (1-3) [1]: " tag_choice
|
||||
case ${tag_choice:-1} in
|
||||
1)
|
||||
TAG_FORMAT="last_two_octets"
|
||||
echo -e "${GN}✓ Selected: last_two_octets${CL}"
|
||||
break
|
||||
;;
|
||||
2)
|
||||
TAG_FORMAT="last_octet"
|
||||
echo -e "${GN}✓ Selected: last_octet${CL}"
|
||||
break
|
||||
;;
|
||||
3)
|
||||
TAG_FORMAT="full"
|
||||
echo -e "${GN}✓ Selected: full${CL}"
|
||||
break
|
||||
;;
|
||||
*)
|
||||
echo -e "${RD}Please enter 1, 2, or 3.${CL}"
|
||||
;;
|
||||
1)
|
||||
TAG_FORMAT="last_two_octets"
|
||||
echo -e "${GN}✓ Selected: last_two_octets${CL}"
|
||||
break
|
||||
;;
|
||||
2)
|
||||
TAG_FORMAT="last_octet"
|
||||
echo -e "${GN}✓ Selected: last_octet${CL}"
|
||||
break
|
||||
;;
|
||||
3)
|
||||
TAG_FORMAT="full"
|
||||
echo -e "${GN}✓ Selected: full${CL}"
|
||||
break
|
||||
;;
|
||||
*)
|
||||
echo -e "${RD}Please enter 1, 2, or 3.${CL}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
# Set default LOOP_INTERVAL for command mode
|
||||
LOOP_INTERVAL=300
|
||||
}
|
||||
@@ -312,46 +311,46 @@ interactive_config_setup_command() {
|
||||
# Interactive configuration setup for service (TAG_FORMAT + LOOP_INTERVAL)
|
||||
interactive_config_setup() {
|
||||
echo -e "\n${YW}=== Configuration Setup ===${CL}"
|
||||
|
||||
|
||||
# TAG_FORMAT configuration
|
||||
echo -e "\n${YW}Select tag format:${CL}"
|
||||
echo -e "${GN}1)${CL} last_two_octets - Show last two octets (e.g., 0.100) [Default]"
|
||||
echo -e "${GN}2)${CL} last_octet - Show only last octet (e.g., 100)"
|
||||
echo -e "${GN}3)${CL} full - Show full IP address (e.g., 192.168.0.100)"
|
||||
|
||||
|
||||
while true; do
|
||||
read -p "Enter your choice (1-3) [1]: " tag_choice
|
||||
case ${tag_choice:-1} in
|
||||
1)
|
||||
TAG_FORMAT="last_two_octets"
|
||||
echo -e "${GN}✓ Selected: last_two_octets${CL}"
|
||||
break
|
||||
;;
|
||||
2)
|
||||
TAG_FORMAT="last_octet"
|
||||
echo -e "${GN}✓ Selected: last_octet${CL}"
|
||||
break
|
||||
;;
|
||||
3)
|
||||
TAG_FORMAT="full"
|
||||
echo -e "${GN}✓ Selected: full${CL}"
|
||||
break
|
||||
;;
|
||||
*)
|
||||
echo -e "${RD}Please enter 1, 2, or 3.${CL}"
|
||||
;;
|
||||
1)
|
||||
TAG_FORMAT="last_two_octets"
|
||||
echo -e "${GN}✓ Selected: last_two_octets${CL}"
|
||||
break
|
||||
;;
|
||||
2)
|
||||
TAG_FORMAT="last_octet"
|
||||
echo -e "${GN}✓ Selected: last_octet${CL}"
|
||||
break
|
||||
;;
|
||||
3)
|
||||
TAG_FORMAT="full"
|
||||
echo -e "${GN}✓ Selected: full${CL}"
|
||||
break
|
||||
;;
|
||||
*)
|
||||
echo -e "${RD}Please enter 1, 2, or 3.${CL}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
# LOOP_INTERVAL configuration
|
||||
echo -e "\n${YW}Set check interval (in seconds):${CL}"
|
||||
echo -e "${YW}Default: 300 seconds (5 minutes)${CL}"
|
||||
echo -e "${YW}Recommended range: 300-3600 seconds${CL}"
|
||||
|
||||
|
||||
while true; do
|
||||
read -p "Enter interval in seconds [300]: " interval_input
|
||||
interval_input=${interval_input:-300}
|
||||
|
||||
|
||||
if [[ $interval_input =~ ^[0-9]+$ ]] && [ $interval_input -ge 300 ] && [ $interval_input -le 7200 ]; then
|
||||
LOOP_INTERVAL=$interval_input
|
||||
echo -e "${GN}✓ Selected: ${LOOP_INTERVAL} seconds${CL}"
|
||||
@@ -646,21 +645,40 @@ get_vm_ips() {
|
||||
echo "$unique_ips"
|
||||
}
|
||||
|
||||
# Cache for configs to avoid repeated reads
|
||||
declare -A CONFIG_CACHE
|
||||
declare -A IP_CACHE
|
||||
|
||||
# Update tags for container or VM
|
||||
update_tags() {
|
||||
local type="$1" vmid="$2"
|
||||
local current_ips_full
|
||||
local current_tags_raw=""
|
||||
|
||||
if [[ "$type" == "lxc" ]]; then
|
||||
current_ips_full=$(get_lxc_ips "${vmid}")
|
||||
while IFS= read -r line; do
|
||||
[[ "$line" == tags:* ]] && current_tags_raw="${line#tags: }" && break
|
||||
done < <(pct config "$vmid" 2>/dev/null)
|
||||
# Get IPs with caching
|
||||
local cache_key="${type}_${vmid}"
|
||||
if [[ -n "${IP_CACHE[$cache_key]:-}" ]]; then
|
||||
current_ips_full="${IP_CACHE[$cache_key]}"
|
||||
debug_log "$type $vmid: using cached IPs"
|
||||
else
|
||||
if [[ "$type" == "lxc" ]]; then
|
||||
current_ips_full=$(get_lxc_ips "${vmid}")
|
||||
else
|
||||
current_ips_full=$(get_vm_ips "${vmid}")
|
||||
fi
|
||||
IP_CACHE[$cache_key]="$current_ips_full"
|
||||
fi
|
||||
|
||||
# Get current tags (optimized file reading)
|
||||
if [[ "$type" == "lxc" ]]; then
|
||||
local config_file="/etc/pve/lxc/${vmid}.conf"
|
||||
if [[ -f "$config_file" ]]; then
|
||||
current_tags_raw=$(grep "^tags:" "$config_file" 2>/dev/null | cut -d: -f2 | sed 's/^[[:space:]]*//')
|
||||
fi
|
||||
else
|
||||
current_ips_full=$(get_vm_ips "${vmid}")
|
||||
local vm_config="/etc/pve/qemu-server/${vmid}.conf"
|
||||
if [[ -f "$vm_config" ]]; then
|
||||
local current_tags_raw=$(grep "^tags:" "$vm_config" 2>/dev/null | cut -d: -f2 | sed 's/^[[:space:]]*//')
|
||||
current_tags_raw=$(grep "^tags:" "$vm_config" 2>/dev/null | cut -d: -f2 | sed 's/^[[:space:]]*//')
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -818,11 +836,15 @@ update_tags() {
|
||||
update_all_tags() {
|
||||
local type="$1" vmids count=0
|
||||
|
||||
# Get list of all containers/VMs
|
||||
if [[ "$type" == "lxc" ]]; then
|
||||
vmids=($(pct list 2>/dev/null | grep -v VMID | awk '{print $1}'))
|
||||
else
|
||||
local all_vm_configs=($(ls /etc/pve/qemu-server/*.conf 2>/dev/null | sed 's/.*\/\([0-9]*\)\.conf/\1/' | sort -n))
|
||||
vmids=("${all_vm_configs[@]}")
|
||||
# More efficient: direct file listing instead of ls+sed
|
||||
vmids=()
|
||||
for conf in /etc/pve/qemu-server/*.conf 2>/dev/null; do
|
||||
[[ -f "$conf" ]] && vmids+=("${conf##*/}" | sed 's/\.conf$//')
|
||||
done
|
||||
fi
|
||||
|
||||
count=${#vmids[@]}
|
||||
@@ -830,14 +852,16 @@ update_all_tags() {
|
||||
|
||||
# Display processing header with color
|
||||
if [[ "$type" == "lxc" ]]; then
|
||||
log_info "Processing ${WHITE}${count}${NC} LXC container(s) sequentially"
|
||||
log_info "Processing ${WHITE}${count}${NC} LXC container(s)"
|
||||
else
|
||||
log_info "Processing ${WHITE}${count}${NC} virtual machine(s) sequentially"
|
||||
log_info "Processing ${WHITE}${count}${NC} virtual machine(s)"
|
||||
fi
|
||||
|
||||
# Process each VM/LXC container sequentially
|
||||
# Process each VM/LXC container
|
||||
local processed=0
|
||||
for vmid in "${vmids[@]}"; do
|
||||
update_tags "$type" "$vmid"
|
||||
((processed++))
|
||||
done
|
||||
|
||||
# Add completion message
|
||||
@@ -848,32 +872,25 @@ update_all_tags() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Check if status changed
|
||||
check_status_changed() {
|
||||
local type="$1" current
|
||||
case "$type" in
|
||||
"lxc") current=$(pct list 2>/dev/null | grep -v VMID) ;;
|
||||
"vm") current=$(ls -la /etc/pve/qemu-server/*.conf 2>/dev/null) ;;
|
||||
"fw") current=$(ip link show type bridge 2>/dev/null) ;;
|
||||
esac
|
||||
local last_var="last_${type}_status"
|
||||
[[ "${!last_var}" == "$current" ]] && return 1
|
||||
eval "$last_var='$current'"
|
||||
return 0
|
||||
}
|
||||
|
||||
# Main check function
|
||||
check() {
|
||||
local current_time=$(date +%s)
|
||||
local start_time=$(date +%s)
|
||||
|
||||
# Simple periodic check - always update both LXC and VM every loop
|
||||
log_info "Starting periodic check"
|
||||
|
||||
# Clear caches before each run
|
||||
CONFIG_CACHE=()
|
||||
IP_CACHE=()
|
||||
|
||||
# Update LXC containers
|
||||
update_all_tags "lxc"
|
||||
|
||||
# Update VMs
|
||||
update_all_tags "vm"
|
||||
|
||||
local end_time=$(date +%s)
|
||||
local duration=$((end_time - start_time))
|
||||
log_success "Check completed in ${WHITE}${duration}${NC} seconds"
|
||||
}
|
||||
|
||||
# Main loop
|
||||
@@ -917,40 +934,54 @@ get_lxc_ips() {
|
||||
|
||||
local ips=""
|
||||
|
||||
# Method 1: Check Proxmox config for static IP
|
||||
# Method 1: Check Proxmox config for ALL static IPs (multiple interfaces)
|
||||
local pve_lxc_config="/etc/pve/lxc/${vmid}.conf"
|
||||
if [[ -f "$pve_lxc_config" ]]; then
|
||||
local static_ip=$(grep -E "^net[0-9]+:" "$pve_lxc_config" 2>/dev/null | grep -oE 'ip=([0-9]{1,3}\.){3}[0-9]{1,3}' | cut -d'=' -f2 | head -1)
|
||||
if [[ -n "$static_ip" && "$static_ip" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then
|
||||
debug_log "lxc $vmid: found static IP $static_ip in config"
|
||||
ips="$static_ip"
|
||||
local static_ips=$(grep -E "^net[0-9]+:" "$pve_lxc_config" 2>/dev/null | grep -oE 'ip=([0-9]{1,3}\.){3}[0-9]{1,3}' | cut -d'=' -f2)
|
||||
if [[ -n "$static_ips" ]]; then
|
||||
while IFS= read -r ip; do
|
||||
if [[ "$ip" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then
|
||||
debug_log "lxc $vmid: found static IP $ip in config"
|
||||
ips="${ips}${ips:+ }${ip}"
|
||||
fi
|
||||
done <<< "$static_ips"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Method 2: ARP table lookup if no static IP
|
||||
# Method 2: ARP table lookup for ALL MAC addresses if no static IPs found
|
||||
if [[ -z "$ips" && -f "$pve_lxc_config" ]]; then
|
||||
local mac_addr=$(grep -Eo 'hwaddr=([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}' "$pve_lxc_config" | head -1 | cut -d'=' -f2)
|
||||
if [[ -n "$mac_addr" ]]; then
|
||||
local bridge_name=$(grep -Eo 'bridge=[^,]+' "$pve_lxc_config" | head -1 | cut -d'=' -f2)
|
||||
local arp_ip=$(ip neighbor show | grep "$mac_addr" | grep -oE '([0-9]{1,3}\.){3}[0-9]{1,3}' | head -1)
|
||||
if [[ -n "$arp_ip" && "$arp_ip" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then
|
||||
debug_log "lxc $vmid: found IP $arp_ip via ARP table"
|
||||
ips="$arp_ip"
|
||||
fi
|
||||
local mac_addrs=$(grep -Eo 'hwaddr=([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}' "$pve_lxc_config" | cut -d'=' -f2)
|
||||
if [[ -n "$mac_addrs" ]]; then
|
||||
while IFS= read -r mac_addr; do
|
||||
[[ -z "$mac_addr" ]] && continue
|
||||
local arp_ip=$(ip neighbor show | grep -i "$mac_addr" | grep -oE '([0-9]{1,3}\.){3}[0-9]{1,3}' | head -1)
|
||||
if [[ -n "$arp_ip" && "$arp_ip" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then
|
||||
debug_log "lxc $vmid: found IP $arp_ip via ARP table for MAC $mac_addr"
|
||||
ips="${ips}${ips:+ }${arp_ip}"
|
||||
fi
|
||||
done <<< "$mac_addrs"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Method 3: Direct container command if ARP failed
|
||||
# Method 3: Direct container command to get ALL IPs if previous methods failed
|
||||
if [[ -z "$ips" ]]; then
|
||||
local container_ip=$(timeout 5s pct exec "$vmid" -- ip -4 addr show 2>/dev/null | grep -oE '([0-9]{1,3}\.){3}[0-9]{1,3}' | grep -v '127.0.0.1' | head -1)
|
||||
if [[ -n "$container_ip" ]] && is_valid_ipv4 "$container_ip"; then
|
||||
debug_log "lxc $vmid: found IP $container_ip via pct exec"
|
||||
ips="$container_ip"
|
||||
local container_ips=$(timeout 5s pct exec "$vmid" -- ip -4 addr show 2>/dev/null | grep -oE 'inet ([0-9]{1,3}\.){3}[0-9]{1,3}' | awk '{print $2}' | grep -v '127.0.0.1')
|
||||
if [[ -n "$container_ips" ]]; then
|
||||
while IFS= read -r ip; do
|
||||
if is_valid_ipv4 "$ip"; then
|
||||
debug_log "lxc $vmid: found IP $ip via pct exec"
|
||||
ips="${ips}${ips:+ }${ip}"
|
||||
fi
|
||||
done <<< "$container_ips"
|
||||
fi
|
||||
fi
|
||||
|
||||
debug_log "lxc $vmid: final IPs: '$ips'"
|
||||
echo "$ips"
|
||||
# Remove duplicates and clean up
|
||||
local unique_ips=$(echo "$ips" | tr ' ' '\n' | sort -u | tr '\n' ' ')
|
||||
unique_ips="${unique_ips% }"
|
||||
|
||||
debug_log "lxc $vmid: final IPs: '$unique_ips'"
|
||||
echo "$unique_ips"
|
||||
}
|
||||
|
||||
main
|
||||
@@ -967,28 +998,28 @@ echo -e "${RD}4)${CL} Cancel"
|
||||
while true; do
|
||||
read -p "Enter your choice (1-4): " choice
|
||||
case $choice in
|
||||
1)
|
||||
INSTALL_MODE="service"
|
||||
echo -e "${GN}✓ Selected: Service installation${CL}"
|
||||
break
|
||||
;;
|
||||
2)
|
||||
INSTALL_MODE="command"
|
||||
echo -e "${GN}✓ Selected: Command-only installation${CL}"
|
||||
break
|
||||
;;
|
||||
3)
|
||||
echo -e "${GN}✓ Selected: Update installation${CL}"
|
||||
update_installation
|
||||
exit 0
|
||||
;;
|
||||
4)
|
||||
msg_error "Action cancelled."
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
msg_error "Please enter 1, 2, 3, or 4."
|
||||
;;
|
||||
1)
|
||||
INSTALL_MODE="service"
|
||||
echo -e "${GN}✓ Selected: Service installation${CL}"
|
||||
break
|
||||
;;
|
||||
2)
|
||||
INSTALL_MODE="command"
|
||||
echo -e "${GN}✓ Selected: Command-only installation${CL}"
|
||||
break
|
||||
;;
|
||||
3)
|
||||
echo -e "${GN}✓ Selected: Update installation${CL}"
|
||||
update_installation
|
||||
exit 0
|
||||
;;
|
||||
4)
|
||||
msg_error "Action cancelled."
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
msg_error "Please enter 1, 2, 3, or 4."
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
@@ -1043,15 +1074,15 @@ if [[ "$INSTALL_MODE" == "service" ]]; then
|
||||
echo -e "\n${YW}Configuration file already exists.${CL}"
|
||||
read -p "Do you want to reconfigure tag format and loop interval? (y/n): " reconfigure
|
||||
case $reconfigure in
|
||||
[Yy]*)
|
||||
interactive_config_setup
|
||||
msg_info "Updating Configuration"
|
||||
generate_config >/opt/iptag/iptag.conf
|
||||
msg_ok "Updated configuration file"
|
||||
;;
|
||||
*)
|
||||
msg_ok "Keeping existing configuration file"
|
||||
;;
|
||||
[Yy]*)
|
||||
interactive_config_setup
|
||||
msg_info "Updating Configuration"
|
||||
generate_config >/opt/iptag/iptag.conf
|
||||
msg_ok "Updated configuration file"
|
||||
;;
|
||||
*)
|
||||
msg_ok "Keeping existing configuration file"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
@@ -1083,21 +1114,21 @@ exec "$SCRIPT_FILE"
|
||||
EOF
|
||||
chmod +x /usr/local/bin/iptag-run
|
||||
msg_ok "Created iptag-run command"
|
||||
|
||||
|
||||
echo -e "\n${GN}${APP} service installation completed successfully! ${CL}"
|
||||
echo -e "${YW}The service is now running automatically.${CL}"
|
||||
echo -e "${YW}You can also run it manually with: ${GN}iptag-run${CL}\n"
|
||||
|
||||
|
||||
# Show configuration information
|
||||
show_post_install_info
|
||||
|
||||
|
||||
elif [[ "$INSTALL_MODE" == "command" ]]; then
|
||||
# Command-only installation
|
||||
install_command_only
|
||||
|
||||
|
||||
stop_spinner
|
||||
echo -e "\n${GN}${APP} command installation completed successfully! ${CL}"
|
||||
|
||||
|
||||
# Show configuration information
|
||||
show_post_install_info
|
||||
fi
|
||||
|
||||
@@ -552,10 +552,14 @@ fi
|
||||
|
||||
qm set "$VMID" \
|
||||
-efidisk0 "${STORAGE}:0,efitype=4m,size=4M" \
|
||||
-scsi0 "${DISK_REF},size=${DISK_SIZE}" \
|
||||
-scsi0 "${DISK_REF}" \
|
||||
-boot order=scsi0 \
|
||||
-tags community-script >/dev/null
|
||||
msg_ok "Attached disk (${DISK_SIZE})"
|
||||
msg_ok "Attached disk"
|
||||
|
||||
msg_info "Resizing disk to ${DISK_SIZE}"
|
||||
qm disk resize "$VMID" scsi0 "${DISK_SIZE}" >/dev/null
|
||||
msg_ok "Resized disk to ${DISK_SIZE}"
|
||||
|
||||
DESCRIPTION=$(
|
||||
cat <<EOF
|
||||
|
||||
Reference in New Issue
Block a user