mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-12-14 19:23:32 +01:00
Compare commits
91 Commits
2025-12-05
...
add-script
| Author | SHA1 | Date | |
|---|---|---|---|
| 1ca57736bc | |||
| 9921490e2e | |||
| c0af8cb9e8 | |||
| da7cafd82c | |||
| 7800578ad4 | |||
| 7c39bc8787 | |||
| 7a91dc765a | |||
| 8b858f4a65 | |||
| 96dc87ddd5 | |||
| f0f1708c31 | |||
| 76c4277f4b | |||
| 10ee5f2eb4 | |||
| 9611267657 | |||
| 4dce90530b | |||
| cb28199964 | |||
| c28e404bd9 | |||
| 42d1f2980a | |||
| 0ab80c814b | |||
| 0f183d0b2f | |||
| fd75b03435 | |||
| 2abb7db794 | |||
| f07e6a92b0 | |||
| ee3c4f843d | |||
| 5ad841da76 | |||
| 02da3fc888 | |||
| d51c37d134 | |||
| 938a66a67e | |||
| bea9a62cce | |||
| 1458aade19 | |||
| cf7d32548f | |||
| 3be34bdac8 | |||
| 6cdc26badc | |||
| 92a26677f7 | |||
| 0bcffdc8b0 | |||
| f2597f4d35 | |||
| 7b139fa763 | |||
| f6f131efab | |||
| e4d5ce221b | |||
| 4e182bd5b9 | |||
| 12a7ecd85d | |||
| b658959c7b | |||
| 5eb9d2bcdf | |||
| 7d37743981 | |||
| b0e7cdfe13 | |||
| 31c19bed09 | |||
| bff0650d72 | |||
| d9b05882a3 | |||
| 31dbf2554c | |||
| f95cc5a7ad | |||
| 3fb9d02f36 | |||
| a748be9a1f | |||
| 4d4ced6b63 | |||
| a5d017c83b | |||
| 5378d822f8 | |||
| 243cb34d47 | |||
| 59699425f8 | |||
| 155a8571ba | |||
| 1cae72bdec | |||
| 531ecad4c7 | |||
| 9e8ab9de01 | |||
| 70557798ec | |||
| 4b554900ca | |||
| 9f84eae07f | |||
| ba5bdd94ad | |||
| d18baa2177 | |||
| 779c06f232 | |||
| 9e2b6524c4 | |||
| a328d7b8ba | |||
| dfa4d82951 | |||
| 5e5a8cd104 | |||
| 0da3231d3c | |||
| 5a6a30e594 | |||
| 97ac2520ec | |||
| bd5fe17228 | |||
| f42586c083 | |||
| fab5539c82 | |||
| 1ecb5bbeab | |||
| 64dbd4e9f7 | |||
| 2ba63b28f0 | |||
| 2a3b09b413 | |||
| d6ca5676df | |||
| 478194ba1a | |||
| d241c03b3d | |||
| 8cd037ff88 | |||
| fb15c13833 | |||
| e95541260b | |||
| a37ac14907 | |||
| 74a870bc5c | |||
| e0f65f2db8 | |||
| 01b246f375 | |||
| 53dd0efddd |
111
CHANGELOG.md
111
CHANGELOG.md
@ -10,8 +10,119 @@
|
|||||||
> [!CAUTION]
|
> [!CAUTION]
|
||||||
Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit the project's popularity for potentially malicious purposes.
|
Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit the project's popularity for potentially malicious purposes.
|
||||||
|
|
||||||
|
## 2025-12-10
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- #### 🔧 Refactor
|
||||||
|
|
||||||
|
- Tracktor: Remove unused variable [@tremor021](https://github.com/tremor021) ([#9841](https://github.com/community-scripts/ProxmoxVE/pull/9841))
|
||||||
|
|
||||||
|
## 2025-12-09
|
||||||
|
|
||||||
|
### 🆕 New Scripts
|
||||||
|
|
||||||
|
- Dokploy ([#9793](https://github.com/community-scripts/ProxmoxVE/pull/9793))
|
||||||
|
- Coolify ([#9792](https://github.com/community-scripts/ProxmoxVE/pull/9792))
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- #### ✨ New Features
|
||||||
|
|
||||||
|
- Refactor: Zerotier-One [@tremor021](https://github.com/tremor021) ([#9804](https://github.com/community-scripts/ProxmoxVE/pull/9804))
|
||||||
|
- Refactor: Zabbix [@tremor021](https://github.com/tremor021) ([#9807](https://github.com/community-scripts/ProxmoxVE/pull/9807))
|
||||||
|
|
||||||
|
- #### 🔧 Refactor
|
||||||
|
|
||||||
|
- Refactor: Zigbee2MQTT [@tremor021](https://github.com/tremor021) ([#9803](https://github.com/community-scripts/ProxmoxVE/pull/9803))
|
||||||
|
- Refactor: Wordpress [@tremor021](https://github.com/tremor021) ([#9808](https://github.com/community-scripts/ProxmoxVE/pull/9808))
|
||||||
|
- Wizarr: Various fixes [@tremor021](https://github.com/tremor021) ([#9809](https://github.com/community-scripts/ProxmoxVE/pull/9809))
|
||||||
|
- Refactor: Wiki.js [@tremor021](https://github.com/tremor021) ([#9810](https://github.com/community-scripts/ProxmoxVE/pull/9810))
|
||||||
|
- Zammad: Various fixes [@tremor021](https://github.com/tremor021) ([#9805](https://github.com/community-scripts/ProxmoxVE/pull/9805))
|
||||||
|
- Refactor: Zipline [@tremor021](https://github.com/tremor021) ([#9801](https://github.com/community-scripts/ProxmoxVE/pull/9801))
|
||||||
|
|
||||||
|
### 💾 Core
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- fix(tools): handle repos with 30+ pre-releases in check_for_gh_release [@vidonnus](https://github.com/vidonnus) ([#9786](https://github.com/community-scripts/ProxmoxVE/pull/9786))
|
||||||
|
|
||||||
|
- #### ✨ New Features
|
||||||
|
|
||||||
|
- Feature: extend advanced settings with more options & inherit app defaults [@MickLesk](https://github.com/MickLesk) ([#9776](https://github.com/community-scripts/ProxmoxVE/pull/9776))
|
||||||
|
|
||||||
|
### 📚 Documentation
|
||||||
|
|
||||||
|
- website: fix/check updateable flags [@MickLesk](https://github.com/MickLesk) ([#9777](https://github.com/community-scripts/ProxmoxVE/pull/9777))
|
||||||
|
- fixed grammar on alert that pops up when you copy the curl command [@Sarthak-Sidhant](https://github.com/Sarthak-Sidhant) ([#9799](https://github.com/community-scripts/ProxmoxVE/pull/9799))
|
||||||
|
|
||||||
|
### ❔ Uncategorized
|
||||||
|
|
||||||
|
- Website: Remove Palmr script [@tremor021](https://github.com/tremor021) ([#9824](https://github.com/community-scripts/ProxmoxVE/pull/9824))
|
||||||
|
|
||||||
|
## 2025-12-08
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- typo: tandoor instead of trandoor [@Neonize](https://github.com/Neonize) ([#9771](https://github.com/community-scripts/ProxmoxVE/pull/9771))
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- Tandoor: Remove postgres17-contrib package [@tremor021](https://github.com/tremor021) ([#9781](https://github.com/community-scripts/ProxmoxVE/pull/9781))
|
||||||
|
|
||||||
|
- #### ✨ New Features
|
||||||
|
|
||||||
|
- feat: Add var_gpu flag for GPU passthrough configuration [@MickLesk](https://github.com/MickLesk) ([#9764](https://github.com/community-scripts/ProxmoxVE/pull/9764))
|
||||||
|
|
||||||
|
### 💾 Core
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- fix: always show SSH access dialog in advanced settings [@MickLesk](https://github.com/MickLesk) ([#9765](https://github.com/community-scripts/ProxmoxVE/pull/9765))
|
||||||
|
|
||||||
|
## 2025-12-07
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- wanderer: add meilisearch dumpless upgrade for database migration [@MickLesk](https://github.com/MickLesk) ([#9749](https://github.com/community-scripts/ProxmoxVE/pull/9749))
|
||||||
|
|
||||||
|
- #### 💥 Breaking Changes
|
||||||
|
|
||||||
|
- Refactor: Inventree (uses now ubuntu 24.04) [@MickLesk](https://github.com/MickLesk) ([#9752](https://github.com/community-scripts/ProxmoxVE/pull/9752))
|
||||||
|
- Revert Zammad: use Debian 12 and dynamic APT source version [@MickLesk](https://github.com/MickLesk) ([#9750](https://github.com/community-scripts/ProxmoxVE/pull/9750))
|
||||||
|
|
||||||
|
### 💾 Core
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- tools.func: handle empty grep results in stop_all_services [@MickLesk](https://github.com/MickLesk) ([#9748](https://github.com/community-scripts/ProxmoxVE/pull/9748))
|
||||||
|
- Remove Debian from GPU passthrough [@MickLesk](https://github.com/MickLesk) ([#9754](https://github.com/community-scripts/ProxmoxVE/pull/9754))
|
||||||
|
|
||||||
|
- #### ✨ New Features
|
||||||
|
|
||||||
|
- core: motd - dynamically read OS version on each login [@MickLesk](https://github.com/MickLesk) ([#9751](https://github.com/community-scripts/ProxmoxVE/pull/9751))
|
||||||
|
|
||||||
|
### 🌐 Website
|
||||||
|
|
||||||
|
- FAQ update [@tremor021](https://github.com/tremor021) ([#9742](https://github.com/community-scripts/ProxmoxVE/pull/9742))
|
||||||
|
|
||||||
## 2025-12-06
|
## 2025-12-06
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- Update domain-locker-install.sh to enable auto-start after reboot [@alexindigo](https://github.com/alexindigo) ([#9715](https://github.com/community-scripts/ProxmoxVE/pull/9715))
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- InfluxDB: Remove InfluxData source list post-installation [@tremor021](https://github.com/tremor021) ([#9723](https://github.com/community-scripts/ProxmoxVE/pull/9723))
|
||||||
|
- InfluxDB: Update InfluxDB repository key URL [@tremor021](https://github.com/tremor021) ([#9720](https://github.com/community-scripts/ProxmoxVE/pull/9720))
|
||||||
|
|
||||||
|
- #### ✨ New Features
|
||||||
|
|
||||||
|
- pin Portainer Update to CE Version only [@sgaert](https://github.com/sgaert) ([#9710](https://github.com/community-scripts/ProxmoxVE/pull/9710))
|
||||||
|
|
||||||
## 2025-12-05
|
## 2025-12-05
|
||||||
|
|
||||||
### 🆕 New Scripts
|
### 🆕 New Scripts
|
||||||
|
|||||||
@ -51,7 +51,7 @@ function update_script() {
|
|||||||
msg_info "Configuring BookStack"
|
msg_info "Configuring BookStack"
|
||||||
cd /opt/bookstack
|
cd /opt/bookstack
|
||||||
export COMPOSER_ALLOW_SUPERUSER=1
|
export COMPOSER_ALLOW_SUPERUSER=1
|
||||||
$STD composer install --no-dev
|
$STD /usr/local/bin/composer install --no-dev
|
||||||
$STD php artisan migrate --force
|
$STD php artisan migrate --force
|
||||||
chown www-data:www-data -R /opt/bookstack /opt/bookstack/bootstrap/cache /opt/bookstack/public/uploads /opt/bookstack/storage
|
chown www-data:www-data -R /opt/bookstack /opt/bookstack/bootstrap/cache /opt/bookstack/public/uploads /opt/bookstack/storage
|
||||||
chmod -R 755 /opt/bookstack /opt/bookstack/bootstrap/cache /opt/bookstack/public/uploads /opt/bookstack/storage
|
chmod -R 755 /opt/bookstack /opt/bookstack/bootstrap/cache /opt/bookstack/public/uploads /opt/bookstack/storage
|
||||||
|
|||||||
@ -13,6 +13,7 @@ var_disk="${var_disk:-8}"
|
|||||||
var_os="${var_os:-debian}"
|
var_os="${var_os:-debian}"
|
||||||
var_version="${var_version:-12}"
|
var_version="${var_version:-12}"
|
||||||
var_unprivileged="${var_unprivileged:-0}"
|
var_unprivileged="${var_unprivileged:-0}"
|
||||||
|
var_gpu="${var_gpu:-yes}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
@ -38,4 +39,4 @@ description
|
|||||||
msg_ok "Completed Successfully!\n"
|
msg_ok "Completed Successfully!\n"
|
||||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8089${CL}"
|
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8089${CL}"
|
||||||
|
|||||||
@ -24,11 +24,11 @@ function update_script() {
|
|||||||
check_container_storage
|
check_container_storage
|
||||||
check_container_resources
|
check_container_resources
|
||||||
|
|
||||||
if [[ ! -f /opt/${APP} ]]; then
|
if [[ ! -d /opt/ComfyUI ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
msg_error "To update use the ${APP} Manager."
|
msg_error "To update use the ComfyUI Manager."
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
46
ct/coolify.sh
Normal file
46
ct/coolify.sh
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
#!/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: MickLesk (CanbiZ)
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
# Source: https://coolify.io/
|
||||||
|
|
||||||
|
APP="Coolify"
|
||||||
|
var_tags="${var_tags:-docker;paas}"
|
||||||
|
var_cpu="${var_cpu:-2}"
|
||||||
|
var_ram="${var_ram:-4096}"
|
||||||
|
var_disk="${var_disk:-30}"
|
||||||
|
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 /data/coolify ]]; then
|
||||||
|
msg_error "No ${APP} Installation Found!"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
msg_info "Updating Coolify"
|
||||||
|
$STD bash <(curl -fsSL https://cdn.coollabs.io/coolify/install.sh)
|
||||||
|
msg_ok "Updated Coolify"
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
|
start
|
||||||
|
build_container
|
||||||
|
description
|
||||||
|
|
||||||
|
msg_ok "Completed Successfully!\n"
|
||||||
|
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||||
|
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||||
|
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8000${CL}"
|
||||||
80
ct/discopanel.sh
Normal file
80
ct/discopanel.sh
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
#!/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: DragoQC
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
# Source: https://discopanel.app/
|
||||||
|
|
||||||
|
APP="DiscoPanel"
|
||||||
|
var_tags="${var_tags:-gaming}"
|
||||||
|
var_cpu="${var_cpu:-4}"
|
||||||
|
var_ram="${var_ram:-4096}"
|
||||||
|
var_disk="${var_disk:-15}"
|
||||||
|
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/discopanel" ]]; then
|
||||||
|
msg_error "No ${APP} Installation Found!"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
setup_docker
|
||||||
|
|
||||||
|
if check_for_gh_release "discopanel" "nickheyer/discopanel"; then
|
||||||
|
msg_info "Stopping Service"
|
||||||
|
systemctl stop discopanel
|
||||||
|
msg_ok "Stopped Service"
|
||||||
|
|
||||||
|
msg_info "Creating Backup"
|
||||||
|
mkdir -p /opt/discopanel_backup_temp
|
||||||
|
cp -r /opt/discopanel/data/discopanel.db \
|
||||||
|
/opt/discopanel/data/.recovery_key \
|
||||||
|
/opt/discopanel_backup_temp/
|
||||||
|
if [[ -d /opt/discopanel/data/servers ]]; then
|
||||||
|
cp -r /opt/discopanel/data/servers /opt/discopanel_backup_temp/
|
||||||
|
fi
|
||||||
|
msg_ok "Created Backup"
|
||||||
|
|
||||||
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "discopanel" "nickheyer/discopanel" "tarball" "latest" "/opt/discopanel"
|
||||||
|
|
||||||
|
msg_info "Setting up DiscoPanel"
|
||||||
|
cd /opt/discopanel/web/discopanel
|
||||||
|
$STD npm install
|
||||||
|
$STD npm run build
|
||||||
|
cd /opt/discopanel
|
||||||
|
$STD go build -o discopanel cmd/discopanel/main.go
|
||||||
|
msg_ok "Setup DiscoPanel"
|
||||||
|
|
||||||
|
msg_info "Restoring Data"
|
||||||
|
mkdir -p /opt/discopanel/data
|
||||||
|
cp -a /opt/discopanel_backup_temp/. /opt/discopanel/data/
|
||||||
|
rm -rf /opt/discopanel_backup_temp
|
||||||
|
msg_ok "Restored Data"
|
||||||
|
|
||||||
|
msg_info "Starting Service"
|
||||||
|
systemctl start discopanel
|
||||||
|
msg_ok "Started Service"
|
||||||
|
msg_ok "Updated Successfully!"
|
||||||
|
fi
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
|
start
|
||||||
|
build_container
|
||||||
|
description
|
||||||
|
|
||||||
|
msg_ok "Completed Successfully!\n"
|
||||||
|
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||||
|
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||||
|
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080${CL}"
|
||||||
@ -87,6 +87,11 @@ function update_script() {
|
|||||||
mv /tmp/start-daphne.sh.backup /opt/dispatcharr/start-daphne.sh
|
mv /tmp/start-daphne.sh.backup /opt/dispatcharr/start-daphne.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ! grep -q "DJANGO_SECRET_KEY" /opt/dispatcharr/.env; then
|
||||||
|
DJANGO_SECRET=$(openssl rand -base64 48 | tr -dc 'a-zA-Z0-9' | cut -c1-50)
|
||||||
|
echo "DJANGO_SECRET_KEY=$DJANGO_SECRET" >> /opt/dispatcharr/.env
|
||||||
|
fi
|
||||||
|
|
||||||
cd /opt/dispatcharr
|
cd /opt/dispatcharr
|
||||||
rm -rf .venv
|
rm -rf .venv
|
||||||
$STD uv venv
|
$STD uv venv
|
||||||
|
|||||||
@ -47,7 +47,7 @@ function update_script() {
|
|||||||
msg_ok "Docker Compose updated"
|
msg_ok "Docker Compose updated"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if docker ps -a --format '{{.Names}}' | grep -q '^portainer$'; then
|
if docker ps -a --format '{{.Image}}' | grep -q '^portainer/portainer-ce:latest$'; then
|
||||||
msg_info "Updating Portainer"
|
msg_info "Updating Portainer"
|
||||||
$STD docker pull portainer/portainer-ce:latest
|
$STD docker pull portainer/portainer-ce:latest
|
||||||
$STD docker stop portainer && docker rm portainer
|
$STD docker stop portainer && docker rm portainer
|
||||||
|
|||||||
46
ct/dokploy.sh
Normal file
46
ct/dokploy.sh
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
#!/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: MickLesk (CanbiZ)
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
# Source: https://dokploy.com/
|
||||||
|
|
||||||
|
APP="Dokploy"
|
||||||
|
var_tags="${var_tags:-docker;paas}"
|
||||||
|
var_cpu="${var_cpu:-2}"
|
||||||
|
var_ram="${var_ram:-2048}"
|
||||||
|
var_disk="${var_disk:-10}"
|
||||||
|
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 /etc/dokploy ]]; then
|
||||||
|
msg_error "No ${APP} Installation Found!"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
msg_info "Updating Dokploy"
|
||||||
|
$STD bash <(curl -sSL https://dokploy.com/install.sh)
|
||||||
|
msg_ok "Updated Dokploy"
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
|
start
|
||||||
|
build_container
|
||||||
|
description
|
||||||
|
|
||||||
|
msg_ok "Completed Successfully!\n"
|
||||||
|
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||||
|
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||||
|
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
||||||
@ -13,6 +13,7 @@ var_disk="${var_disk:-8}"
|
|||||||
var_os="${var_os:-ubuntu}"
|
var_os="${var_os:-ubuntu}"
|
||||||
var_version="${var_version:-24.04}"
|
var_version="${var_version:-24.04}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
var_gpu="${var_gpu:-yes}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
|
|||||||
@ -13,6 +13,7 @@ var_disk="${var_disk:-5}"
|
|||||||
var_os="${var_os:-debian}"
|
var_os="${var_os:-debian}"
|
||||||
var_version="${var_version:-12}"
|
var_version="${var_version:-12}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
var_gpu="${var_gpu:-yes}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
|
|||||||
@ -13,6 +13,7 @@ var_disk="${var_disk:-8}"
|
|||||||
var_os="${var_os:-debian}"
|
var_os="${var_os:-debian}"
|
||||||
var_version="${var_version:-12}"
|
var_version="${var_version:-12}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
var_gpu="${var_gpu:-yes}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
|
|||||||
@ -13,6 +13,7 @@ var_disk="${var_disk:-20}"
|
|||||||
var_os="${var_os:-debian}"
|
var_os="${var_os:-debian}"
|
||||||
var_version="${var_version:-11}"
|
var_version="${var_version:-11}"
|
||||||
var_unprivileged="${var_unprivileged:-0}"
|
var_unprivileged="${var_unprivileged:-0}"
|
||||||
|
var_gpu="${var_gpu:-yes}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
@ -38,4 +39,4 @@ description
|
|||||||
msg_ok "Completed Successfully!\n"
|
msg_ok "Completed Successfully!\n"
|
||||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:5000${CL}"
|
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:5000${CL}"
|
||||||
|
|||||||
6
ct/headers/coolify
Normal file
6
ct/headers/coolify
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
______ ___ ____
|
||||||
|
/ ____/___ ____ / (_) __/_ __
|
||||||
|
/ / / __ \/ __ \/ / / /_/ / / /
|
||||||
|
/ /___/ /_/ / /_/ / / / __/ /_/ /
|
||||||
|
\____/\____/\____/_/_/_/ \__, /
|
||||||
|
/____/
|
||||||
6
ct/headers/dokploy
Normal file
6
ct/headers/dokploy
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
____ __ __
|
||||||
|
/ __ \____ / /______ / /___ __ __
|
||||||
|
/ / / / __ \/ //_/ __ \/ / __ \/ / / /
|
||||||
|
/ /_/ / /_/ / ,< / /_/ / / /_/ / /_/ /
|
||||||
|
/_____/\____/_/|_/ .___/_/\____/\__, /
|
||||||
|
/_/ /____/
|
||||||
@ -13,6 +13,7 @@ var_ram="${var_ram:-4096}"
|
|||||||
var_os="${var_os:-debian}"
|
var_os="${var_os:-debian}"
|
||||||
var_version="${var_version:-13}"
|
var_version="${var_version:-13}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
var_gpu="${var_gpu:-yes}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
|
|||||||
@ -10,8 +10,8 @@ var_tags="${var_tags:-inventory}"
|
|||||||
var_cpu="${var_cpu:-2}"
|
var_cpu="${var_cpu:-2}"
|
||||||
var_ram="${var_ram:-2048}"
|
var_ram="${var_ram:-2048}"
|
||||||
var_disk="${var_disk:-6}"
|
var_disk="${var_disk:-6}"
|
||||||
var_os="${var_os:-debian}"
|
var_os="${var_os:-ubuntu}"
|
||||||
var_version="${var_version:-13}"
|
var_version="${var_version:-24.04}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
@ -28,10 +28,16 @@ function update_script() {
|
|||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
msg_info "Updating $APP"
|
|
||||||
|
if ! grep -qE "^ID=(ubuntu)$" /etc/os-release; then
|
||||||
|
msg_error "Unsupported OS. InvenTree requires Ubuntu (20.04/22.04/24.04)."
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
msg_info "Updating InvenTree"
|
||||||
$STD apt update
|
$STD apt update
|
||||||
$STD apt install --only-upgrade inventree -y
|
$STD apt install --only-upgrade inventree -y
|
||||||
msg_ok "Updated $APP"
|
msg_ok "Updated InvenTree"
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,6 +13,7 @@ var_disk="${var_disk:-16}"
|
|||||||
var_os="${var_os:-ubuntu}"
|
var_os="${var_os:-ubuntu}"
|
||||||
var_version="${var_version:-24.04}"
|
var_version="${var_version:-24.04}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
var_gpu="${var_gpu:-yes}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
|
|||||||
@ -12,6 +12,7 @@ var_ram="${var_ram:-4096}"
|
|||||||
var_disk="${var_disk:-35}"
|
var_disk="${var_disk:-35}"
|
||||||
var_os="${var_os:-ubuntu}"
|
var_os="${var_os:-ubuntu}"
|
||||||
var_version="${var_version:-24.04}"
|
var_version="${var_version:-24.04}"
|
||||||
|
var_gpu="${var_gpu:-yes}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
|
|||||||
@ -13,6 +13,7 @@ var_disk="${var_disk:-25}"
|
|||||||
var_os="${var_os:-debian}"
|
var_os="${var_os:-debian}"
|
||||||
var_version="${var_version:-13}"
|
var_version="${var_version:-13}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
var_gpu="${var_gpu:-yes}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
|
|||||||
@ -13,6 +13,7 @@ var_disk="${var_disk:-8}"
|
|||||||
var_os="${var_os:-ubuntu}"
|
var_os="${var_os:-ubuntu}"
|
||||||
var_version="${var_version:-24.04}"
|
var_version="${var_version:-24.04}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
var_gpu="${var_gpu:-yes}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
@ -23,8 +24,8 @@ function update_script() {
|
|||||||
header_info
|
header_info
|
||||||
check_container_storage
|
check_container_storage
|
||||||
check_container_resources
|
check_container_resources
|
||||||
if [[ ! -f /etc/apt/sources.list.d/plexmediaserver.list ]] \
|
if [[ ! -f /etc/apt/sources.list.d/plexmediaserver.list ]] &&
|
||||||
&& [[ ! -f /etc/apt/sources.list.d/plexmediaserver.sources ]]; then
|
[[ ! -f /etc/apt/sources.list.d/plexmediaserver.sources ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -55,7 +55,7 @@ function update_script() {
|
|||||||
cd /opt/tandoor/vue3
|
cd /opt/tandoor/vue3
|
||||||
$STD yarn install
|
$STD yarn install
|
||||||
$STD yarn build
|
$STD yarn build
|
||||||
TANDOOR_VERSION="$(curl -fsSL https://api.github.com/repos/TandoorRecipes/recipes/releases/latest | jq -r .tag_name)"
|
TANDOOR_VERSION=$(get_latest_github_release "TandoorRecipes/recipes")
|
||||||
cat <<EOF >/opt/tandoor/cookbook/version_info.py
|
cat <<EOF >/opt/tandoor/cookbook/version_info.py
|
||||||
TANDOOR_VERSION = "$TANDOOR_VERSION"
|
TANDOOR_VERSION = "$TANDOOR_VERSION"
|
||||||
TANDOOR_REF = "bare-metal"
|
TANDOOR_REF = "bare-metal"
|
||||||
@ -65,7 +65,7 @@ EOF
|
|||||||
$STD /opt/tandoor/.venv/bin/python manage.py migrate
|
$STD /opt/tandoor/.venv/bin/python manage.py migrate
|
||||||
$STD /opt/tandoor/.venv/bin/python manage.py collectstatic --no-input
|
$STD /opt/tandoor/.venv/bin/python manage.py collectstatic --no-input
|
||||||
rm -rf /opt/tandoor.bak
|
rm -rf /opt/tandoor.bak
|
||||||
msg_ok "Updated Trandoor"
|
msg_ok "Updated Tandoor"
|
||||||
|
|
||||||
msg_info "Starting Service"
|
msg_info "Starting Service"
|
||||||
systemctl start tandoor
|
systemctl start tandoor
|
||||||
|
|||||||
@ -13,6 +13,7 @@ var_disk="${var_disk:-4}"
|
|||||||
var_os="${var_os:-debian}"
|
var_os="${var_os:-debian}"
|
||||||
var_version="${var_version:-13}"
|
var_version="${var_version:-13}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
var_gpu="${var_gpu:-yes}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
|
|||||||
@ -13,6 +13,7 @@ var_disk="${var_disk:-5}"
|
|||||||
var_os="${var_os:-debian}"
|
var_os="${var_os:-debian}"
|
||||||
var_version="${var_version:-13}"
|
var_version="${var_version:-13}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
var_gpu="${var_gpu:-yes}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
|
|||||||
@ -13,6 +13,7 @@ var_disk="${var_disk:-4}"
|
|||||||
var_os="${var_os:-debian}"
|
var_os="${var_os:-debian}"
|
||||||
var_version="${var_version:-13}"
|
var_version="${var_version:-13}"
|
||||||
var_unprivileged="${var_unprivileged:-0}"
|
var_unprivileged="${var_unprivileged:-0}"
|
||||||
|
var_gpu="${var_gpu:-yes}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
|
|||||||
@ -55,7 +55,8 @@ function update_script() {
|
|||||||
systemctl stop wanderer-web
|
systemctl stop wanderer-web
|
||||||
msg_ok "Stopped service"
|
msg_ok "Stopped service"
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "meilisearch" "meilisearch/meilisearch" "binary" "latest" "/opt/wanderer/source/search"
|
fetch_and_deploy_gh_release "meilisearch" "meilisearch/meilisearch" "binary" "latest" "/opt/wanderer/source/search"
|
||||||
|
grep -q -- '--experimental-dumpless-upgrade' /opt/wanderer/start.sh || sed -i 's|meilisearch --master-key|meilisearch --experimental-dumpless-upgrade --master-key|' /opt/wanderer/start.sh
|
||||||
|
|
||||||
msg_info "Starting service"
|
msg_info "Starting service"
|
||||||
systemctl start wanderer-web
|
systemctl start wanderer-web
|
||||||
|
|||||||
13
ct/zammad.sh
13
ct/zammad.sh
@ -11,7 +11,7 @@ var_disk="${var_disk:-8}"
|
|||||||
var_cpu="${var_cpu:-2}"
|
var_cpu="${var_cpu:-2}"
|
||||||
var_ram="${var_ram:-4096}"
|
var_ram="${var_ram:-4096}"
|
||||||
var_os="${var_os:-debian}"
|
var_os="${var_os:-debian}"
|
||||||
var_version="${var_version:-13}"
|
var_version="${var_version:-12}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
@ -27,21 +27,22 @@ function update_script() {
|
|||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
msg_info "Stopping Service"
|
msg_info "Stopping Service"
|
||||||
systemctl stop zammad
|
systemctl stop zammad
|
||||||
msg_ok "Stopped Service"
|
msg_ok "Stopped Service"
|
||||||
|
|
||||||
msg_info "Updating ${APP}"
|
msg_info "Updating Zammad"
|
||||||
$STD apt update
|
$STD apt update
|
||||||
$STD apt-mark hold zammad
|
$STD apt-mark hold zammad
|
||||||
$STD apt -y upgrade
|
$STD apt upgrade -y
|
||||||
$STD apt-mark unhold zammad
|
$STD apt-mark unhold zammad
|
||||||
$STD apt -y upgrade
|
$STD apt upgrade -y
|
||||||
msg_ok "Updated ${APP}"
|
msg_ok "Updated Zammad"
|
||||||
|
|
||||||
msg_info "Starting Service"
|
msg_info "Starting Service"
|
||||||
systemctl start zammad
|
systemctl start zammad
|
||||||
msg_ok "Updated ${APP} LXC"
|
msg_ok "Started Service"
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,10 +33,10 @@ function update_script() {
|
|||||||
systemctl stop zerotier-one
|
systemctl stop zerotier-one
|
||||||
msg_ok "Stopping Service"
|
msg_ok "Stopping Service"
|
||||||
|
|
||||||
msg_info "Updating ${APP}"
|
msg_info "Updating Zerotier-One"
|
||||||
$STD apt update
|
$STD apt update
|
||||||
$STD apt -y upgrade
|
$STD apt upgrade -y
|
||||||
msg_ok "Updated ${APP}"
|
msg_ok "Updated Zerotier-One"
|
||||||
|
|
||||||
msg_info "Starting Service"
|
msg_info "Starting Service"
|
||||||
systemctl start zerotier-one
|
systemctl start zerotier-one
|
||||||
|
|||||||
@ -43,7 +43,7 @@ function update_script() {
|
|||||||
|
|
||||||
fetch_and_deploy_gh_release "Zigbee2MQTT" "Koenkk/zigbee2mqtt" "tarball" "latest" "/opt/zigbee2mqtt"
|
fetch_and_deploy_gh_release "Zigbee2MQTT" "Koenkk/zigbee2mqtt" "tarball" "latest" "/opt/zigbee2mqtt"
|
||||||
|
|
||||||
msg_info "Updating ${APP}"
|
msg_info "Updating Zigbee2MQTT"
|
||||||
rm -rf /opt/zigbee2mqtt/data
|
rm -rf /opt/zigbee2mqtt/data
|
||||||
mv /opt/z2m_backup/data /opt/zigbee2mqtt
|
mv /opt/z2m_backup/data /opt/zigbee2mqtt
|
||||||
cd /opt/zigbee2mqtt
|
cd /opt/zigbee2mqtt
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
# Technical Reference: Configuration System Architecture
|
# Technical Reference: Configuration System Architecture
|
||||||
|
|
||||||
> **For Developers and Advanced Users**
|
> **For Developers and Advanced Users**
|
||||||
>
|
>
|
||||||
> *Deep dive into how the defaults and configuration system works*
|
> _Deep dive into how the defaults and configuration system works_
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -123,13 +123,13 @@ VAR_VALUE := [^\n]* # Any printable characters except newline
|
|||||||
|
|
||||||
**Constraints**:
|
**Constraints**:
|
||||||
|
|
||||||
| Constraint | Value |
|
| Constraint | Value |
|
||||||
|-----------|-------|
|
| ----------------- | ------------------------ |
|
||||||
| Max file size | 64 KB |
|
| Max file size | 64 KB |
|
||||||
| Max line length | 1024 bytes |
|
| Max line length | 1024 bytes |
|
||||||
| Max variables | 100 |
|
| Max variables | 100 |
|
||||||
| Allowed var names | `var_[a-z_]+` |
|
| Allowed var names | `var_[a-z_]+` |
|
||||||
| Value validation | Whitelist + Sanitization |
|
| Value validation | Whitelist + Sanitization |
|
||||||
|
|
||||||
**Example Valid File**:
|
**Example Valid File**:
|
||||||
|
|
||||||
@ -206,21 +206,24 @@ var_tags=dns,pihole
|
|||||||
**Purpose**: Safely load variables from .vars files without using `source` or `eval`
|
**Purpose**: Safely load variables from .vars files without using `source` or `eval`
|
||||||
|
|
||||||
**Signature**:
|
**Signature**:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
load_vars_file(filepath)
|
load_vars_file(filepath)
|
||||||
```
|
```
|
||||||
|
|
||||||
**Parameters**:
|
**Parameters**:
|
||||||
|
|
||||||
| Param | Type | Required | Example |
|
| Param | Type | Required | Example |
|
||||||
|-------|------|----------|---------|
|
| -------- | ------ | -------- | ------------------------------------------- |
|
||||||
| filepath | String | Yes | `/usr/local/community-scripts/default.vars` |
|
| filepath | String | Yes | `/usr/local/community-scripts/default.vars` |
|
||||||
|
|
||||||
**Returns**:
|
**Returns**:
|
||||||
|
|
||||||
- `0` on success
|
- `0` on success
|
||||||
- `1` on error (file missing, parse error, etc.)
|
- `1` on error (file missing, parse error, etc.)
|
||||||
|
|
||||||
**Environment Side Effects**:
|
**Environment Side Effects**:
|
||||||
|
|
||||||
- Sets all parsed `var_*` variables as shell variables
|
- Sets all parsed `var_*` variables as shell variables
|
||||||
- Does NOT unset variables if file missing (safe)
|
- Does NOT unset variables if file missing (safe)
|
||||||
- Does NOT affect other variables
|
- Does NOT affect other variables
|
||||||
@ -230,25 +233,25 @@ load_vars_file(filepath)
|
|||||||
```bash
|
```bash
|
||||||
load_vars_file() {
|
load_vars_file() {
|
||||||
local file="$1"
|
local file="$1"
|
||||||
|
|
||||||
# File must exist
|
# File must exist
|
||||||
[ -f "$file" ] || return 0
|
[ -f "$file" ] || return 0
|
||||||
|
|
||||||
# Parse line by line (not with source/eval)
|
# Parse line by line (not with source/eval)
|
||||||
local line key val
|
local line key val
|
||||||
while IFS='=' read -r key val || [ -n "$key" ]; do
|
while IFS='=' read -r key val || [ -n "$key" ]; do
|
||||||
# Skip comments and empty lines
|
# Skip comments and empty lines
|
||||||
[[ "$key" =~ ^[[:space:]]*# ]] && continue
|
[[ "$key" =~ ^[[:space:]]*# ]] && continue
|
||||||
[[ -z "$key" ]] && continue
|
[[ -z "$key" ]] && continue
|
||||||
|
|
||||||
# Validate key is in whitelist
|
# Validate key is in whitelist
|
||||||
_is_whitelisted_key "$key" || continue
|
_is_whitelisted_key "$key" || continue
|
||||||
|
|
||||||
# Sanitize and export value
|
# Sanitize and export value
|
||||||
val="$(_sanitize_value "$val")"
|
val="$(_sanitize_value "$val")"
|
||||||
[ $? -eq 0 ] && export "$key=$val"
|
[ $? -eq 0 ] && export "$key=$val"
|
||||||
done < "$file"
|
done < "$file"
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -281,6 +284,7 @@ echo "Allocating ${var_ram} MB RAM"
|
|||||||
**Purpose**: Get the full path for app-specific defaults file
|
**Purpose**: Get the full path for app-specific defaults file
|
||||||
|
|
||||||
**Signature**:
|
**Signature**:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
get_app_defaults_path()
|
get_app_defaults_path()
|
||||||
```
|
```
|
||||||
@ -288,6 +292,7 @@ get_app_defaults_path()
|
|||||||
**Parameters**: None
|
**Parameters**: None
|
||||||
|
|
||||||
**Returns**:
|
**Returns**:
|
||||||
|
|
||||||
- String: Full path to app defaults file
|
- String: Full path to app defaults file
|
||||||
|
|
||||||
**Implementation**:
|
**Implementation**:
|
||||||
@ -322,6 +327,7 @@ load_vars_file "$(get_app_defaults_path)"
|
|||||||
**Purpose**: Load and display user global defaults
|
**Purpose**: Load and display user global defaults
|
||||||
|
|
||||||
**Signature**:
|
**Signature**:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
default_var_settings()
|
default_var_settings()
|
||||||
```
|
```
|
||||||
@ -329,6 +335,7 @@ default_var_settings()
|
|||||||
**Parameters**: None
|
**Parameters**: None
|
||||||
|
|
||||||
**Returns**:
|
**Returns**:
|
||||||
|
|
||||||
- `0` on success
|
- `0` on success
|
||||||
- `1` on error
|
- `1` on error
|
||||||
|
|
||||||
@ -337,15 +344,15 @@ default_var_settings()
|
|||||||
```
|
```
|
||||||
1. Find default.vars location
|
1. Find default.vars location
|
||||||
(usually /usr/local/community-scripts/default.vars)
|
(usually /usr/local/community-scripts/default.vars)
|
||||||
|
|
||||||
2. Create if missing
|
2. Create if missing
|
||||||
|
|
||||||
3. Load variables from file
|
3. Load variables from file
|
||||||
|
|
||||||
4. Map var_verbose → VERBOSE variable
|
4. Map var_verbose → VERBOSE variable
|
||||||
|
|
||||||
5. Call base_settings (apply to container config)
|
5. Call base_settings (apply to container config)
|
||||||
|
|
||||||
6. Call echo_default (display summary)
|
6. Call echo_default (display summary)
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -354,20 +361,20 @@ default_var_settings()
|
|||||||
```bash
|
```bash
|
||||||
default_var_settings() {
|
default_var_settings() {
|
||||||
local VAR_WHITELIST=(
|
local VAR_WHITELIST=(
|
||||||
var_apt_cacher var_apt_cacher_ip var_brg var_cpu var_disk var_fuse
|
var_apt_cacher var_apt_cacher_ip var_brg var_cpu var_disk var_fuse var_gpu
|
||||||
var_gateway var_hostname var_ipv6_method var_mac var_mtu
|
var_gateway var_hostname var_ipv6_method var_mac var_mtu
|
||||||
var_net var_ns var_pw var_ram var_tags var_tun var_unprivileged
|
var_net var_ns var_pw var_ram var_tags var_tun var_unprivileged
|
||||||
var_verbose var_vlan var_ssh var_ssh_authorized_key
|
var_verbose var_vlan var_ssh var_ssh_authorized_key
|
||||||
var_container_storage var_template_storage
|
var_container_storage var_template_storage
|
||||||
)
|
)
|
||||||
|
|
||||||
# Ensure file exists
|
# Ensure file exists
|
||||||
_ensure_default_vars
|
_ensure_default_vars
|
||||||
|
|
||||||
# Find and load
|
# Find and load
|
||||||
local dv="$(_find_default_vars)"
|
local dv="$(_find_default_vars)"
|
||||||
load_vars_file "$dv"
|
load_vars_file "$dv"
|
||||||
|
|
||||||
# Map verbose flag
|
# Map verbose flag
|
||||||
if [[ -n "${var_verbose:-}" ]]; then
|
if [[ -n "${var_verbose:-}" ]]; then
|
||||||
case "${var_verbose,,}" in
|
case "${var_verbose,,}" in
|
||||||
@ -375,7 +382,7 @@ default_var_settings() {
|
|||||||
*) VERBOSE="${var_verbose}" ;;
|
*) VERBOSE="${var_verbose}" ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Apply and display
|
# Apply and display
|
||||||
base_settings "$VERBOSE"
|
base_settings "$VERBOSE"
|
||||||
echo_default
|
echo_default
|
||||||
@ -389,6 +396,7 @@ default_var_settings() {
|
|||||||
**Purpose**: Offer to save current settings as app-specific defaults
|
**Purpose**: Offer to save current settings as app-specific defaults
|
||||||
|
|
||||||
**Signature**:
|
**Signature**:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
maybe_offer_save_app_defaults()
|
maybe_offer_save_app_defaults()
|
||||||
```
|
```
|
||||||
@ -413,10 +421,10 @@ maybe_offer_save_app_defaults()
|
|||||||
```bash
|
```bash
|
||||||
maybe_offer_save_app_defaults() {
|
maybe_offer_save_app_defaults() {
|
||||||
local app_vars_path="$(get_app_defaults_path)"
|
local app_vars_path="$(get_app_defaults_path)"
|
||||||
|
|
||||||
# Build current settings from memory
|
# Build current settings from memory
|
||||||
local new_tmp="$(_build_current_app_vars_tmp)"
|
local new_tmp="$(_build_current_app_vars_tmp)"
|
||||||
|
|
||||||
# Check if already exists
|
# Check if already exists
|
||||||
if [ -f "$app_vars_path" ]; then
|
if [ -f "$app_vars_path" ]; then
|
||||||
# Show diff and ask: Update? Keep? View Diff?
|
# Show diff and ask: Update? Keep? View Diff?
|
||||||
@ -438,29 +446,31 @@ maybe_offer_save_app_defaults() {
|
|||||||
**Purpose**: Remove dangerous characters/patterns from configuration values
|
**Purpose**: Remove dangerous characters/patterns from configuration values
|
||||||
|
|
||||||
**Signature**:
|
**Signature**:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
_sanitize_value(value)
|
_sanitize_value(value)
|
||||||
```
|
```
|
||||||
|
|
||||||
**Parameters**:
|
**Parameters**:
|
||||||
|
|
||||||
| Param | Type | Required |
|
| Param | Type | Required |
|
||||||
|-------|------|----------|
|
| ----- | ------ | -------- |
|
||||||
| value | String | Yes |
|
| value | String | Yes |
|
||||||
|
|
||||||
**Returns**:
|
**Returns**:
|
||||||
|
|
||||||
- `0` (success) + sanitized value on stdout
|
- `0` (success) + sanitized value on stdout
|
||||||
- `1` (failure) + nothing if dangerous
|
- `1` (failure) + nothing if dangerous
|
||||||
|
|
||||||
**Dangerous Patterns**:
|
**Dangerous Patterns**:
|
||||||
|
|
||||||
| Pattern | Threat | Example |
|
| Pattern | Threat | Example |
|
||||||
|---------|--------|---------|
|
| --------- | -------------------- | -------------------- |
|
||||||
| `$(...)` | Command substitution | `$(rm -rf /)` |
|
| `$(...)` | Command substitution | `$(rm -rf /)` |
|
||||||
| `` ` ` `` | Command substitution | `` `whoami` `` |
|
| `` ` ` `` | Command substitution | `` `whoami` `` |
|
||||||
| `;` | Command separator | `value; rm -rf /` |
|
| `;` | Command separator | `value; rm -rf /` |
|
||||||
| `&` | Background execution | `value & malicious` |
|
| `&` | Background execution | `value & malicious` |
|
||||||
| `<(` | Process substitution | `<(cat /etc/passwd)` |
|
| `<(` | Process substitution | `<(cat /etc/passwd)` |
|
||||||
|
|
||||||
**Implementation**:
|
**Implementation**:
|
||||||
|
|
||||||
@ -501,17 +511,19 @@ fi
|
|||||||
**Purpose**: Check if variable name is in allowed whitelist
|
**Purpose**: Check if variable name is in allowed whitelist
|
||||||
|
|
||||||
**Signature**:
|
**Signature**:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
_is_whitelisted_key(key)
|
_is_whitelisted_key(key)
|
||||||
```
|
```
|
||||||
|
|
||||||
**Parameters**:
|
**Parameters**:
|
||||||
|
|
||||||
| Param | Type | Required | Example |
|
| Param | Type | Required | Example |
|
||||||
|-------|------|----------|---------|
|
| ----- | ------ | -------- | --------- |
|
||||||
| key | String | Yes | `var_cpu` |
|
| key | String | Yes | `var_cpu` |
|
||||||
|
|
||||||
**Returns**:
|
**Returns**:
|
||||||
|
|
||||||
- `0` if key is whitelisted
|
- `0` if key is whitelisted
|
||||||
- `1` if key is NOT whitelisted
|
- `1` if key is NOT whitelisted
|
||||||
|
|
||||||
@ -573,6 +585,7 @@ Step 4: Use BUILT-IN DEFAULTS
|
|||||||
### Precedence Examples
|
### Precedence Examples
|
||||||
|
|
||||||
**Example 1: Environment Variable Wins**
|
**Example 1: Environment Variable Wins**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Shell environment has highest priority
|
# Shell environment has highest priority
|
||||||
$ export var_cpu=16
|
$ export var_cpu=16
|
||||||
@ -583,6 +596,7 @@ $ bash pihole-install.sh
|
|||||||
```
|
```
|
||||||
|
|
||||||
**Example 2: App Defaults Override User Defaults**
|
**Example 2: App Defaults Override User Defaults**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# User Defaults: var_cpu=4
|
# User Defaults: var_cpu=4
|
||||||
# App Defaults: var_cpu=2
|
# App Defaults: var_cpu=2
|
||||||
@ -593,6 +607,7 @@ $ bash pihole-install.sh
|
|||||||
```
|
```
|
||||||
|
|
||||||
**Example 3: All Defaults Missing (Built-ins Used)**
|
**Example 3: All Defaults Missing (Built-ins Used)**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# No environment variables set
|
# No environment variables set
|
||||||
# No app defaults file
|
# No app defaults file
|
||||||
@ -611,21 +626,21 @@ $ bash pihole-install.sh
|
|||||||
base_settings() {
|
base_settings() {
|
||||||
# Priority 1: Environment variables (already set if export used)
|
# Priority 1: Environment variables (already set if export used)
|
||||||
CT_TYPE=${var_unprivileged:-"1"} # Use existing or default
|
CT_TYPE=${var_unprivileged:-"1"} # Use existing or default
|
||||||
|
|
||||||
# Priority 2: Load app defaults (may override above)
|
# Priority 2: Load app defaults (may override above)
|
||||||
if [ -f "$(get_app_defaults_path)" ]; then
|
if [ -f "$(get_app_defaults_path)" ]; then
|
||||||
load_vars_file "$(get_app_defaults_path)"
|
load_vars_file "$(get_app_defaults_path)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Priority 3: Load user defaults
|
# Priority 3: Load user defaults
|
||||||
if [ -f "/usr/local/community-scripts/default.vars" ]; then
|
if [ -f "/usr/local/community-scripts/default.vars" ]; then
|
||||||
load_vars_file "/usr/local/community-scripts/default.vars"
|
load_vars_file "/usr/local/community-scripts/default.vars"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Priority 4: Apply built-in defaults (lowest)
|
# Priority 4: Apply built-in defaults (lowest)
|
||||||
CORE_COUNT=${var_cpu:-"${APP_CPU_DEFAULT:-2}"}
|
CORE_COUNT=${var_cpu:-"${APP_CPU_DEFAULT:-2}"}
|
||||||
RAM_SIZE=${var_ram:-"${APP_RAM_DEFAULT:-1024}"}
|
RAM_SIZE=${var_ram:-"${APP_RAM_DEFAULT:-1024}"}
|
||||||
|
|
||||||
# Result: var_cpu has been set through precedence chain
|
# Result: var_cpu has been set through precedence chain
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -734,14 +749,14 @@ CONTAINER CREATION STARTED
|
|||||||
|
|
||||||
### Threat Model
|
### Threat Model
|
||||||
|
|
||||||
| Threat | Mitigation |
|
| Threat | Mitigation |
|
||||||
|--------|-----------|
|
| ---------------------------- | ------------------------------------------------- |
|
||||||
| **Arbitrary Code Execution** | No `source` or `eval`; manual parsing only |
|
| **Arbitrary Code Execution** | No `source` or `eval`; manual parsing only |
|
||||||
| **Variable Injection** | Whitelist of allowed variable names |
|
| **Variable Injection** | Whitelist of allowed variable names |
|
||||||
| **Command Substitution** | `_sanitize_value()` blocks `$()`, backticks, etc. |
|
| **Command Substitution** | `_sanitize_value()` blocks `$()`, backticks, etc. |
|
||||||
| **Path Traversal** | Files locked to `/usr/local/community-scripts/` |
|
| **Path Traversal** | Files locked to `/usr/local/community-scripts/` |
|
||||||
| **Permission Escalation** | Files created with restricted permissions |
|
| **Permission Escalation** | Files created with restricted permissions |
|
||||||
| **Information Disclosure** | Sensitive variables not logged |
|
| **Information Disclosure** | Sensitive variables not logged |
|
||||||
|
|
||||||
### Security Controls
|
### Security Controls
|
||||||
|
|
||||||
@ -798,6 +813,7 @@ fi
|
|||||||
### Module: `build.func`
|
### Module: `build.func`
|
||||||
|
|
||||||
**Load Order** (in actual scripts):
|
**Load Order** (in actual scripts):
|
||||||
|
|
||||||
1. `#!/usr/bin/env bash` - Shebang
|
1. `#!/usr/bin/env bash` - Shebang
|
||||||
2. `source /dev/stdin <<<$(curl ... api.func)` - API functions
|
2. `source /dev/stdin <<<$(curl ... api.func)` - API functions
|
||||||
3. `source /dev/stdin <<<$(curl ... build.func)` - Build functions
|
3. `source /dev/stdin <<<$(curl ... build.func)` - Build functions
|
||||||
@ -832,17 +848,17 @@ fi
|
|||||||
|
|
||||||
# Section 6: Installation Flow
|
# Section 6: Installation Flow
|
||||||
- install_script() # Main entry point
|
- install_script() # Main entry point
|
||||||
- advanced_settings() # 19-step wizard
|
- advanced_settings() # 20-step wizard
|
||||||
```
|
```
|
||||||
|
|
||||||
### Regex Patterns Used
|
### Regex Patterns Used
|
||||||
|
|
||||||
| Pattern | Purpose | Example Match |
|
| Pattern | Purpose | Example Match |
|
||||||
|---------|---------|---|
|
| ---------------------- | --------------------- | ----------------------- |
|
||||||
| `^[0-9]+([.][0-9]+)?$` | Integer validation | `4`, `192.168` |
|
| `^[0-9]+([.][0-9]+)?$` | Integer validation | `4`, `192.168` |
|
||||||
| `^var_[a-z_]+$` | Variable name | `var_cpu`, `var_ssh` |
|
| `^var_[a-z_]+$` | Variable name | `var_cpu`, `var_ssh` |
|
||||||
| `*'$('*` | Command substitution | `$(whoami)` |
|
| `*'$('*` | Command substitution | `$(whoami)` |
|
||||||
| `*\`*` | Backtick substitution | `` `cat /etc/passwd` `` |
|
| `*\`\*` | Backtick substitution | `` `cat /etc/passwd` `` |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -869,12 +885,12 @@ fi
|
|||||||
|
|
||||||
### Function Mapping
|
### Function Mapping
|
||||||
|
|
||||||
| Old | New | Location |
|
| Old | New | Location |
|
||||||
|-----|-----|----------|
|
| ---------------- | --------------------------------- | ---------- |
|
||||||
| `read_config()` | `load_vars_file()` | build.func |
|
| `read_config()` | `load_vars_file()` | build.func |
|
||||||
| `write_config()` | `_build_current_app_vars_tmp()` | build.func |
|
| `write_config()` | `_build_current_app_vars_tmp()` | build.func |
|
||||||
| None | `maybe_offer_save_app_defaults()` | build.func |
|
| None | `maybe_offer_save_app_defaults()` | build.func |
|
||||||
| None | `get_app_defaults_path()` | build.func |
|
| None | `get_app_defaults_path()` | build.func |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
164
docs/misc/build.func/BUILD_FUNC_ADVANCED_SETTINGS.md
Normal file
164
docs/misc/build.func/BUILD_FUNC_ADVANCED_SETTINGS.md
Normal file
@ -0,0 +1,164 @@
|
|||||||
|
# Advanced Settings Wizard Reference
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
The Advanced Settings wizard provides a 28-step interactive configuration for LXC container creation. It allows users to customize every aspect of the container while inheriting sensible defaults from the CT script.
|
||||||
|
|
||||||
|
## Key Features
|
||||||
|
|
||||||
|
- **Inherit App Defaults**: All `var_*` values from CT scripts pre-populate wizard fields
|
||||||
|
- **Back Navigation**: Press Cancel/Back to return to previous step
|
||||||
|
- **App Default Hints**: Each dialog shows `(App default: X)` to indicate script defaults
|
||||||
|
- **Full Customization**: Every configurable option is accessible
|
||||||
|
|
||||||
|
## Wizard Steps
|
||||||
|
|
||||||
|
| Step | Title | Variable(s) | Description |
|
||||||
|
| ---- | ------------------------ | --------------------------------- | ----------------------------------------------------- |
|
||||||
|
| 1 | Container Type | `var_unprivileged` | Privileged (0) or Unprivileged (1) container |
|
||||||
|
| 2 | Root Password | `var_pw` | Set password or use automatic login |
|
||||||
|
| 3 | Container ID | `var_ctid` | Unique container ID (auto-suggested) |
|
||||||
|
| 4 | Hostname | `var_hostname` | Container hostname |
|
||||||
|
| 5 | Disk Size | `var_disk` | Disk size in GB |
|
||||||
|
| 6 | CPU Cores | `var_cpu` | Number of CPU cores |
|
||||||
|
| 7 | RAM Size | `var_ram` | RAM size in MiB |
|
||||||
|
| 8 | Network Bridge | `var_brg` | Network bridge (vmbr0, etc.) |
|
||||||
|
| 9 | IPv4 Configuration | `var_net`, `var_gateway` | DHCP or static IP with gateway |
|
||||||
|
| 10 | IPv6 Configuration | `var_ipv6_method` | Auto, DHCP, Static, or None |
|
||||||
|
| 11 | MTU Size | `var_mtu` | Network MTU (default: 1500) |
|
||||||
|
| 12 | DNS Search Domain | `var_searchdomain` | DNS search domain |
|
||||||
|
| 13 | DNS Server | `var_ns` | Custom DNS server IP |
|
||||||
|
| 14 | MAC Address | `var_mac` | Custom MAC address (auto-generated if empty) |
|
||||||
|
| 15 | VLAN Tag | `var_vlan` | VLAN tag ID |
|
||||||
|
| 16 | Tags | `var_tags` | Container tags (comma/semicolon separated) |
|
||||||
|
| 17 | SSH Settings | `var_ssh` | SSH key selection and root access |
|
||||||
|
| 18 | FUSE Support | `var_fuse` | Enable FUSE for rclone, mergerfs, AppImage |
|
||||||
|
| 19 | TUN/TAP Support | `var_tun` | Enable for VPN apps (WireGuard, OpenVPN, Tailscale) |
|
||||||
|
| 20 | Nesting Support | `var_nesting` | Enable for Docker, LXC in LXC, Podman |
|
||||||
|
| 21 | GPU Passthrough | `var_gpu` | Auto-detect and pass through Intel/AMD/NVIDIA GPUs |
|
||||||
|
| 22 | Keyctl Support | `var_keyctl` | Enable for Docker, systemd-networkd |
|
||||||
|
| 23 | APT Cacher Proxy | `var_apt_cacher`, `var_apt_cacher_ip` | Use apt-cacher-ng for faster downloads |
|
||||||
|
| 24 | Container Timezone | `var_timezone` | Set timezone (e.g., Europe/Berlin) |
|
||||||
|
| 25 | Container Protection | `var_protection` | Prevent accidental deletion |
|
||||||
|
| 26 | Device Node Creation | `var_mknod` | Allow mknod (experimental, kernel 5.3+) |
|
||||||
|
| 27 | Mount Filesystems | `var_mount_fs` | Allow specific mounts: nfs, cifs, fuse, etc. |
|
||||||
|
| 28 | Verbose Mode & Confirm | `var_verbose` | Enable verbose output + final confirmation |
|
||||||
|
|
||||||
|
## Default Value Inheritance
|
||||||
|
|
||||||
|
The wizard inherits defaults from multiple sources:
|
||||||
|
|
||||||
|
```text
|
||||||
|
CT Script (var_*) → default.vars → app.vars → User Input
|
||||||
|
```
|
||||||
|
|
||||||
|
### Example: VPN Container (alpine-wireguard.sh)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# CT script sets:
|
||||||
|
var_tun="${var_tun:-1}" # TUN enabled by default
|
||||||
|
|
||||||
|
# In Advanced Settings Step 19:
|
||||||
|
# Dialog shows: "(App default: 1)" and pre-selects "Yes"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Example: Media Server (jellyfin.sh)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# CT script sets:
|
||||||
|
var_gpu="${var_gpu:-yes}" # GPU enabled by default
|
||||||
|
|
||||||
|
# In Advanced Settings Step 21:
|
||||||
|
# Dialog shows: "(App default: yes)" and pre-selects "Yes"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Feature Matrix
|
||||||
|
|
||||||
|
| Feature | Variable | When to Enable |
|
||||||
|
| ----------------- | ---------------- | --------------------------------------------------- |
|
||||||
|
| FUSE | `var_fuse` | rclone, mergerfs, AppImage, SSHFS |
|
||||||
|
| TUN/TAP | `var_tun` | WireGuard, OpenVPN, Tailscale, VPN containers |
|
||||||
|
| Nesting | `var_nesting` | Docker, Podman, LXC-in-LXC, systemd-nspawn |
|
||||||
|
| GPU Passthrough | `var_gpu` | Plex, Jellyfin, Emby, Frigate, Ollama, ComfyUI |
|
||||||
|
| Keyctl | `var_keyctl` | Docker (unprivileged), systemd-networkd |
|
||||||
|
| Protection | `var_protection` | Production containers, prevent accidental deletion |
|
||||||
|
| Mknod | `var_mknod` | Device node creation (experimental) |
|
||||||
|
| Mount FS | `var_mount_fs` | NFS mounts, CIFS shares, custom filesystems |
|
||||||
|
| APT Cacher | `var_apt_cacher` | Speed up downloads with local apt-cacher-ng |
|
||||||
|
|
||||||
|
## Confirmation Summary
|
||||||
|
|
||||||
|
Step 28 displays a comprehensive summary before creation:
|
||||||
|
|
||||||
|
```text
|
||||||
|
Container Type: Unprivileged
|
||||||
|
Container ID: 100
|
||||||
|
Hostname: jellyfin
|
||||||
|
|
||||||
|
Resources:
|
||||||
|
Disk: 8 GB
|
||||||
|
CPU: 2 cores
|
||||||
|
RAM: 2048 MiB
|
||||||
|
|
||||||
|
Network:
|
||||||
|
Bridge: vmbr0
|
||||||
|
IPv4: dhcp
|
||||||
|
IPv6: auto
|
||||||
|
|
||||||
|
Features:
|
||||||
|
FUSE: no | TUN: no
|
||||||
|
Nesting: Enabled | Keyctl: Disabled
|
||||||
|
GPU: yes | Protection: No
|
||||||
|
|
||||||
|
Advanced:
|
||||||
|
Timezone: Europe/Berlin
|
||||||
|
APT Cacher: no
|
||||||
|
Verbose: no
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage Examples
|
||||||
|
|
||||||
|
### Skip to Advanced Settings
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Run script, select "Advanced" from menu
|
||||||
|
bash -c "$(curl -fsSL https://...jellyfin.sh)"
|
||||||
|
# Then select option 3 "Advanced"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Pre-set Defaults via Environment
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Set defaults before running
|
||||||
|
export var_cpu=4
|
||||||
|
export var_ram=4096
|
||||||
|
export var_gpu=yes
|
||||||
|
bash -c "$(curl -fsSL https://...jellyfin.sh)"
|
||||||
|
# Advanced settings will inherit these values
|
||||||
|
```
|
||||||
|
|
||||||
|
### Non-Interactive with All Options
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Set all variables for fully automated deployment
|
||||||
|
export var_unprivileged=1
|
||||||
|
export var_cpu=2
|
||||||
|
export var_ram=2048
|
||||||
|
export var_disk=8
|
||||||
|
export var_net=dhcp
|
||||||
|
export var_fuse=no
|
||||||
|
export var_tun=no
|
||||||
|
export var_gpu=yes
|
||||||
|
export var_nesting=1
|
||||||
|
export var_protection=no
|
||||||
|
export var_verbose=no
|
||||||
|
bash -c "$(curl -fsSL https://...jellyfin.sh)"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
- **Cancel at Step 1**: Exits the script entirely
|
||||||
|
- **Cancel at Steps 2-28**: Goes back to previous step
|
||||||
|
- **Empty fields**: Use default value
|
||||||
|
- **Keyctl**: Automatically enabled for unprivileged containers
|
||||||
|
- **Nesting**: Enabled by default (required for many apps)
|
||||||
@ -8,103 +8,142 @@ This document provides a comprehensive reference of all environment variables us
|
|||||||
|
|
||||||
### Core Container Variables
|
### Core Container Variables
|
||||||
|
|
||||||
| Variable | Description | Default | Set In | Used In |
|
| Variable | Description | Default | Set In | Used In |
|
||||||
|----------|-------------|---------|---------|---------|
|
| --------- | -------------------------------------------- | --------- | ----------- | ------------------ |
|
||||||
| `APP` | Application name (e.g., "plex", "nextcloud") | - | Environment | Throughout |
|
| `APP` | Application name (e.g., "plex", "nextcloud") | - | Environment | Throughout |
|
||||||
| `NSAPP` | Namespace application name | `$APP` | Environment | Throughout |
|
| `NSAPP` | Namespace application name | `$APP` | Environment | Throughout |
|
||||||
| `CTID` | Container ID | - | Environment | Container creation |
|
| `CTID` | Container ID | - | Environment | Container creation |
|
||||||
| `CT_TYPE` | Container type ("install" or "update") | "install" | Environment | Entry point |
|
| `CT_TYPE` | Container type ("install" or "update") | "install" | Environment | Entry point |
|
||||||
| `CT_NAME` | Container name | `$APP` | Environment | Container creation |
|
| `CT_NAME` | Container name | `$APP` | Environment | Container creation |
|
||||||
|
|
||||||
### Operating System Variables
|
### Operating System Variables
|
||||||
|
|
||||||
| Variable | Description | Default | Set In | Used In |
|
| Variable | Description | Default | Set In | Used In |
|
||||||
|----------|-------------|---------|---------|---------|
|
| -------------- | -------------------------- | -------------- | --------------- | ------------------ |
|
||||||
| `var_os` | Operating system selection | "debian" | base_settings() | OS selection |
|
| `var_os` | Operating system selection | "debian" | base_settings() | OS selection |
|
||||||
| `var_version` | OS version | "12" | base_settings() | Template selection |
|
| `var_version` | OS version | "12" | base_settings() | Template selection |
|
||||||
| `var_template` | Template name | Auto-generated | base_settings() | Template download |
|
| `var_template` | Template name | Auto-generated | base_settings() | Template download |
|
||||||
|
|
||||||
### Resource Configuration Variables
|
### Resource Configuration Variables
|
||||||
|
|
||||||
| Variable | Description | Default | Set In | Used In |
|
| Variable | Description | Default | Set In | Used In |
|
||||||
|----------|-------------|---------|---------|---------|
|
| ------------ | ----------------------- | ----------- | --------------- | ------------------ |
|
||||||
| `var_cpu` | CPU cores | "2" | base_settings() | Container creation |
|
| `var_cpu` | CPU cores | "2" | base_settings() | Container creation |
|
||||||
| `var_ram` | RAM in MB | "2048" | base_settings() | Container creation |
|
| `var_ram` | RAM in MB | "2048" | base_settings() | Container creation |
|
||||||
| `var_disk` | Disk size in GB | "8" | base_settings() | Container creation |
|
| `var_disk` | Disk size in GB | "8" | base_settings() | Container creation |
|
||||||
| `DISK_SIZE` | Disk size (alternative) | `$var_disk` | Environment | Container creation |
|
| `DISK_SIZE` | Disk size (alternative) | `$var_disk` | Environment | Container creation |
|
||||||
| `CORE_COUNT` | CPU cores (alternative) | `$var_cpu` | Environment | Container creation |
|
| `CORE_COUNT` | CPU cores (alternative) | `$var_cpu` | Environment | Container creation |
|
||||||
| `RAM_SIZE` | RAM size (alternative) | `$var_ram` | Environment | Container creation |
|
| `RAM_SIZE` | RAM size (alternative) | `$var_ram` | Environment | Container creation |
|
||||||
|
|
||||||
### Network Configuration Variables
|
### Network Configuration Variables
|
||||||
|
|
||||||
| Variable | Description | Default | Set In | Used In |
|
| Variable | Description | Default | Set In | Used In |
|
||||||
|----------|-------------|---------|---------|---------|
|
| ------------- | ------------------------------- | -------------- | --------------- | -------------- |
|
||||||
| `var_net` | Network interface | "vmbr0" | base_settings() | Network config |
|
| `var_net` | Network interface | "vmbr0" | base_settings() | Network config |
|
||||||
| `var_bridge` | Bridge interface | "vmbr0" | base_settings() | Network config |
|
| `var_bridge` | Bridge interface | "vmbr0" | base_settings() | Network config |
|
||||||
| `var_gateway` | Gateway IP | "192.168.1.1" | base_settings() | Network config |
|
| `var_gateway` | Gateway IP | "192.168.1.1" | base_settings() | Network config |
|
||||||
| `var_ip` | Container IP address | - | User input | Network config |
|
| `var_ip` | Container IP address | - | User input | Network config |
|
||||||
| `var_ipv6` | IPv6 address | - | User input | Network config |
|
| `var_ipv6` | IPv6 address | - | User input | Network config |
|
||||||
| `var_vlan` | VLAN ID | - | User input | Network config |
|
| `var_vlan` | VLAN ID | - | User input | Network config |
|
||||||
| `var_mtu` | MTU size | "1500" | base_settings() | Network config |
|
| `var_mtu` | MTU size | "1500" | base_settings() | Network config |
|
||||||
| `var_mac` | MAC address | Auto-generated | base_settings() | Network config |
|
| `var_mac` | MAC address | Auto-generated | base_settings() | Network config |
|
||||||
| `NET` | Network interface (alternative) | `$var_net` | Environment | Network config |
|
| `NET` | Network interface (alternative) | `$var_net` | Environment | Network config |
|
||||||
| `BRG` | Bridge interface (alternative) | `$var_bridge` | Environment | Network config |
|
| `BRG` | Bridge interface (alternative) | `$var_bridge` | Environment | Network config |
|
||||||
| `GATE` | Gateway IP (alternative) | `$var_gateway` | Environment | Network config |
|
| `GATE` | Gateway IP (alternative) | `$var_gateway` | Environment | Network config |
|
||||||
| `IPV6_METHOD` | IPv6 configuration method | "none" | Environment | Network config |
|
| `IPV6_METHOD` | IPv6 configuration method | "none" | Environment | Network config |
|
||||||
| `VLAN` | VLAN ID (alternative) | `$var_vlan` | Environment | Network config |
|
| `VLAN` | VLAN ID (alternative) | `$var_vlan` | Environment | Network config |
|
||||||
| `MTU` | MTU size (alternative) | `$var_mtu` | Environment | Network config |
|
| `MTU` | MTU size (alternative) | `$var_mtu` | Environment | Network config |
|
||||||
| `MAC` | MAC address (alternative) | `$var_mac` | Environment | Network config |
|
| `MAC` | MAC address (alternative) | `$var_mac` | Environment | Network config |
|
||||||
|
|
||||||
### Storage Configuration Variables
|
### Storage Configuration Variables
|
||||||
|
|
||||||
| Variable | Description | Default | Set In | Used In |
|
| Variable | Description | Default | Set In | Used In |
|
||||||
|----------|-------------|---------|---------|---------|
|
| ----------------------- | ------------------------------- | ------------------------ | ---------------- | ----------------- |
|
||||||
| `var_template_storage` | Storage for templates | - | select_storage() | Template storage |
|
| `var_template_storage` | Storage for templates | - | select_storage() | Template storage |
|
||||||
| `var_container_storage` | Storage for container disks | - | select_storage() | Container storage |
|
| `var_container_storage` | Storage for container disks | - | select_storage() | Container storage |
|
||||||
| `TEMPLATE_STORAGE` | Template storage (alternative) | `$var_template_storage` | Environment | Template storage |
|
| `TEMPLATE_STORAGE` | Template storage (alternative) | `$var_template_storage` | Environment | Template storage |
|
||||||
| `CONTAINER_STORAGE` | Container storage (alternative) | `$var_container_storage` | Environment | Container storage |
|
| `CONTAINER_STORAGE` | Container storage (alternative) | `$var_container_storage` | Environment | Container storage |
|
||||||
|
|
||||||
### Feature Flags
|
### Feature Flags
|
||||||
|
|
||||||
| Variable | Description | Default | Set In | Used In |
|
| Variable | Description | Default | Set In | Used In |
|
||||||
|----------|-------------|---------|---------|---------|
|
| ---------------- | ------------------------------ | ------- | ------------------------------- | ------------------ |
|
||||||
| `ENABLE_FUSE` | Enable FUSE support | "true" | base_settings() | Container features |
|
| `var_fuse` | Enable FUSE support | "no" | CT script / Advanced Settings | Container features |
|
||||||
| `ENABLE_TUN` | Enable TUN/TAP support | "true" | base_settings() | Container features |
|
| `var_tun` | Enable TUN/TAP support | "no" | CT script / Advanced Settings | Container features |
|
||||||
| `ENABLE_KEYCTL` | Enable keyctl support | "true" | base_settings() | Container features |
|
| `var_nesting` | Enable nesting support | "1" | CT script / Advanced Settings | Container features |
|
||||||
| `ENABLE_MOUNT` | Enable mount support | "true" | base_settings() | Container features |
|
| `var_keyctl` | Enable keyctl support | "0" | CT script / Advanced Settings | Container features |
|
||||||
| `ENABLE_NESTING` | Enable nesting support | "false" | base_settings() | Container features |
|
| `var_mknod` | Allow device node creation | "0" | CT script / Advanced Settings | Container features |
|
||||||
| `ENABLE_PRIVILEGED` | Enable privileged mode | "false" | base_settings() | Container features |
|
| `var_mount_fs` | Allowed filesystem mounts | "" | CT script / Advanced Settings | Container features |
|
||||||
| `ENABLE_UNPRIVILEGED` | Enable unprivileged mode | "true" | base_settings() | Container features |
|
| `var_protection` | Enable container protection | "no" | CT script / Advanced Settings | Container creation |
|
||||||
| `VERBOSE` | Enable verbose output | "false" | Environment | Logging |
|
| `var_timezone` | Container timezone | "" | CT script / Advanced Settings | Container creation |
|
||||||
| `SSH` | Enable SSH key provisioning | "true" | base_settings() | SSH setup |
|
| `var_verbose` | Enable verbose output | "no" | Environment / Advanced Settings | Logging |
|
||||||
|
| `var_ssh` | Enable SSH key provisioning | "no" | CT script / Advanced Settings | SSH setup |
|
||||||
|
| `ENABLE_FUSE` | FUSE flag (internal) | "no" | Advanced Settings | Container creation |
|
||||||
|
| `ENABLE_TUN` | TUN/TAP flag (internal) | "no" | Advanced Settings | Container creation |
|
||||||
|
| `ENABLE_NESTING` | Nesting flag (internal) | "1" | Advanced Settings | Container creation |
|
||||||
|
| `ENABLE_KEYCTL` | Keyctl flag (internal) | "0" | Advanced Settings | Container creation |
|
||||||
|
| `ENABLE_MKNOD` | Mknod flag (internal) | "0" | Advanced Settings | Container creation |
|
||||||
|
| `PROTECT_CT` | Protection flag (internal) | "no" | Advanced Settings | Container creation |
|
||||||
|
| `CT_TIMEZONE` | Timezone setting (internal) | "" | Advanced Settings | Container creation |
|
||||||
|
| `VERBOSE` | Verbose mode flag | "no" | Environment | Logging |
|
||||||
|
| `SSH` | SSH access flag | "no" | Advanced Settings | SSH setup |
|
||||||
|
|
||||||
|
### APT Cacher Configuration
|
||||||
|
|
||||||
|
| Variable | Description | Default | Set In | Used In |
|
||||||
|
| ------------------ | ------------------------ | ------- | ----------------------------- | ------------------- |
|
||||||
|
| `var_apt_cacher` | Enable APT cacher proxy | "no" | CT script / Advanced Settings | Package management |
|
||||||
|
| `var_apt_cacher_ip`| APT cacher server IP | "" | CT script / Advanced Settings | Package management |
|
||||||
|
| `APT_CACHER` | APT cacher flag | "no" | Advanced Settings | Container creation |
|
||||||
|
| `APT_CACHER_IP` | APT cacher IP (internal) | "" | Advanced Settings | Container creation |
|
||||||
|
|
||||||
### GPU Passthrough Variables
|
### GPU Passthrough Variables
|
||||||
|
|
||||||
| Variable | Description | Default | Set In | Used In |
|
| Variable | Description | Default | Set In | Used In |
|
||||||
|----------|-------------|---------|---------|---------|
|
| ------------ | ------------------------------- | ------- | ------------------------------------------- | ------------------ |
|
||||||
| `GPU_APPS` | List of apps that support GPU | - | Environment | GPU detection |
|
| `var_gpu` | Enable GPU passthrough | "no" | CT script / Environment / Advanced Settings | GPU passthrough |
|
||||||
| `var_gpu` | GPU selection | - | User input | GPU passthrough |
|
| `ENABLE_GPU` | GPU passthrough flag (internal) | "no" | Advanced Settings | Container creation |
|
||||||
| `var_gpu_type` | GPU type (intel/amd/nvidia) | - | detect_gpu_devices() | GPU passthrough |
|
|
||||||
| `var_gpu_devices` | GPU device list | - | detect_gpu_devices() | GPU passthrough |
|
**Note**: GPU passthrough is controlled via `var_gpu`. Apps that benefit from GPU acceleration (media servers, AI/ML, transcoding) have `var_gpu=yes` as default in their CT scripts.
|
||||||
|
|
||||||
|
**Apps with GPU enabled by default**:
|
||||||
|
|
||||||
|
- Media: jellyfin, plex, emby, channels, ersatztv, tunarr, immich
|
||||||
|
- Transcoding: tdarr, unmanic, fileflows
|
||||||
|
- AI/ML: ollama, openwebui
|
||||||
|
- NVR: frigate
|
||||||
|
|
||||||
|
**Usage Examples**:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Disable GPU for a specific installation
|
||||||
|
var_gpu=no bash -c "$(curl -fsSL https://...jellyfin.sh)"
|
||||||
|
|
||||||
|
# Enable GPU for apps without default GPU support
|
||||||
|
var_gpu=yes bash -c "$(curl -fsSL https://...debian.sh)"
|
||||||
|
|
||||||
|
# Set in default.vars for all apps
|
||||||
|
echo "var_gpu=yes" >> /usr/local/community-scripts/default.vars
|
||||||
|
```
|
||||||
|
|
||||||
### API and Diagnostics Variables
|
### API and Diagnostics Variables
|
||||||
|
|
||||||
| Variable | Description | Default | Set In | Used In |
|
| Variable | Description | Default | Set In | Used In |
|
||||||
|----------|-------------|---------|---------|---------|
|
| ------------- | ------------------------ | --------- | ----------- | ----------------- |
|
||||||
| `DIAGNOSTICS` | Enable diagnostics mode | "false" | Environment | Diagnostics |
|
| `DIAGNOSTICS` | Enable diagnostics mode | "false" | Environment | Diagnostics |
|
||||||
| `METHOD` | Installation method | "install" | Environment | Installation flow |
|
| `METHOD` | Installation method | "install" | Environment | Installation flow |
|
||||||
| `RANDOM_UUID` | Random UUID for tracking | - | Environment | Logging |
|
| `RANDOM_UUID` | Random UUID for tracking | - | Environment | Logging |
|
||||||
| `API_TOKEN` | Proxmox API token | - | Environment | API calls |
|
| `API_TOKEN` | Proxmox API token | - | Environment | API calls |
|
||||||
| `API_USER` | Proxmox API user | - | Environment | API calls |
|
| `API_USER` | Proxmox API user | - | Environment | API calls |
|
||||||
|
|
||||||
### Settings Persistence Variables
|
### Settings Persistence Variables
|
||||||
|
|
||||||
| Variable | Description | Default | Set In | Used In |
|
| Variable | Description | Default | Set In | Used In |
|
||||||
|----------|-------------|---------|---------|---------|
|
| ------------------- | -------------------------- | ------------------------------------------------- | ----------- | -------------------- |
|
||||||
| `SAVE_DEFAULTS` | Save settings as defaults | "false" | User input | Settings persistence |
|
| `SAVE_DEFAULTS` | Save settings as defaults | "false" | User input | Settings persistence |
|
||||||
| `SAVE_APP_DEFAULTS` | Save app-specific defaults | "false" | User input | Settings persistence |
|
| `SAVE_APP_DEFAULTS` | Save app-specific defaults | "false" | User input | Settings persistence |
|
||||||
| `DEFAULT_VARS_FILE` | Path to default.vars | "/usr/local/community-scripts/default.vars" | Environment | Settings persistence |
|
| `DEFAULT_VARS_FILE` | Path to default.vars | "/usr/local/community-scripts/default.vars" | Environment | Settings persistence |
|
||||||
| `APP_DEFAULTS_FILE` | Path to app.vars | "/usr/local/community-scripts/defaults/$APP.vars" | Environment | Settings persistence |
|
| `APP_DEFAULTS_FILE` | Path to app.vars | "/usr/local/community-scripts/defaults/$APP.vars" | Environment | Settings persistence |
|
||||||
|
|
||||||
## Variable Precedence Chain
|
## Variable Precedence Chain
|
||||||
|
|
||||||
@ -152,6 +191,7 @@ export SSH="true"
|
|||||||
## Environment Variable Usage Patterns
|
## Environment Variable Usage Patterns
|
||||||
|
|
||||||
### 1. Container Creation
|
### 1. Container Creation
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Basic container creation
|
# Basic container creation
|
||||||
export APP="nextcloud"
|
export APP="nextcloud"
|
||||||
@ -170,6 +210,7 @@ export var_container_storage="local"
|
|||||||
```
|
```
|
||||||
|
|
||||||
### 2. GPU Passthrough
|
### 2. GPU Passthrough
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Enable GPU passthrough
|
# Enable GPU passthrough
|
||||||
export GPU_APPS="plex,jellyfin,emby"
|
export GPU_APPS="plex,jellyfin,emby"
|
||||||
@ -178,6 +219,7 @@ export ENABLE_PRIVILEGED="true"
|
|||||||
```
|
```
|
||||||
|
|
||||||
### 3. Advanced Network Configuration
|
### 3. Advanced Network Configuration
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# VLAN and IPv6 configuration
|
# VLAN and IPv6 configuration
|
||||||
export var_vlan="100"
|
export var_vlan="100"
|
||||||
@ -187,6 +229,7 @@ export var_mtu="9000"
|
|||||||
```
|
```
|
||||||
|
|
||||||
### 4. Storage Configuration
|
### 4. Storage Configuration
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Custom storage locations
|
# Custom storage locations
|
||||||
export var_template_storage="nfs-storage"
|
export var_template_storage="nfs-storage"
|
||||||
@ -206,6 +249,7 @@ The script validates variables at several points:
|
|||||||
## Common Variable Combinations
|
## Common Variable Combinations
|
||||||
|
|
||||||
### Development Container
|
### Development Container
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
export APP="dev-container"
|
export APP="dev-container"
|
||||||
export CTID="200"
|
export CTID="200"
|
||||||
@ -220,6 +264,7 @@ export ENABLE_PRIVILEGED="true"
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Media Server with GPU
|
### Media Server with GPU
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
export APP="plex"
|
export APP="plex"
|
||||||
export CTID="300"
|
export CTID="300"
|
||||||
@ -235,6 +280,7 @@ export ENABLE_PRIVILEGED="true"
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Lightweight Service
|
### Lightweight Service
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
export APP="nginx"
|
export APP="nginx"
|
||||||
export CTID="400"
|
export CTID="400"
|
||||||
|
|||||||
@ -9,30 +9,35 @@ This document provides a comprehensive reference of all functions in `build.func
|
|||||||
### Initialization Functions
|
### Initialization Functions
|
||||||
|
|
||||||
#### `start()`
|
#### `start()`
|
||||||
|
|
||||||
**Purpose**: Main entry point when build.func is sourced or executed
|
**Purpose**: Main entry point when build.func is sourced or executed
|
||||||
**Parameters**: None
|
**Parameters**: None
|
||||||
**Returns**: None
|
**Returns**: None
|
||||||
**Side Effects**:
|
**Side Effects**:
|
||||||
|
|
||||||
- Detects execution context (Proxmox host vs container)
|
- Detects execution context (Proxmox host vs container)
|
||||||
- Captures hard environment variables
|
- Captures hard environment variables
|
||||||
- Sets CT_TYPE based on context
|
- Sets CT_TYPE based on context
|
||||||
- Routes to appropriate workflow (install_script or update_script)
|
- Routes to appropriate workflow (install_script or update_script)
|
||||||
**Dependencies**: None
|
**Dependencies**: None
|
||||||
**Environment Variables Used**: `CT_TYPE`, `APP`, `CTID`
|
**Environment Variables Used**: `CT_TYPE`, `APP`, `CTID`
|
||||||
|
|
||||||
#### `variables()`
|
#### `variables()`
|
||||||
|
|
||||||
**Purpose**: Load and resolve all configuration variables using precedence chain
|
**Purpose**: Load and resolve all configuration variables using precedence chain
|
||||||
**Parameters**: None
|
**Parameters**: None
|
||||||
**Returns**: None
|
**Returns**: None
|
||||||
**Side Effects**:
|
**Side Effects**:
|
||||||
|
|
||||||
- Loads app-specific .vars file
|
- Loads app-specific .vars file
|
||||||
- Loads global default.vars file
|
- Loads global default.vars file
|
||||||
- Applies variable precedence chain
|
- Applies variable precedence chain
|
||||||
- Sets all configuration variables
|
- Sets all configuration variables
|
||||||
**Dependencies**: `base_settings()`
|
**Dependencies**: `base_settings()`
|
||||||
**Environment Variables Used**: All configuration variables
|
**Environment Variables Used**: All configuration variables
|
||||||
|
|
||||||
#### `base_settings()`
|
#### `base_settings()`
|
||||||
|
|
||||||
**Purpose**: Set built-in default values for all configuration variables
|
**Purpose**: Set built-in default values for all configuration variables
|
||||||
**Parameters**: None
|
**Parameters**: None
|
||||||
**Returns**: None
|
**Returns**: None
|
||||||
@ -43,28 +48,33 @@ This document provides a comprehensive reference of all functions in `build.func
|
|||||||
### UI and Menu Functions
|
### UI and Menu Functions
|
||||||
|
|
||||||
#### `install_script()`
|
#### `install_script()`
|
||||||
|
|
||||||
**Purpose**: Main installation workflow coordinator
|
**Purpose**: Main installation workflow coordinator
|
||||||
**Parameters**: None
|
**Parameters**: None
|
||||||
**Returns**: None
|
**Returns**: None
|
||||||
**Side Effects**:
|
**Side Effects**:
|
||||||
|
|
||||||
- Displays installation mode selection menu
|
- Displays installation mode selection menu
|
||||||
- Coordinates the entire installation process
|
- Coordinates the entire installation process
|
||||||
- Handles user interaction and validation
|
- Handles user interaction and validation
|
||||||
**Dependencies**: `variables()`, `build_container()`, `default_var_settings()`
|
**Dependencies**: `variables()`, `build_container()`, `default_var_settings()`
|
||||||
**Environment Variables Used**: `APP`, `CTID`, `var_hostname`
|
**Environment Variables Used**: `APP`, `CTID`, `var_hostname`
|
||||||
|
|
||||||
#### `advanced_settings()`
|
#### `advanced_settings()`
|
||||||
|
|
||||||
**Purpose**: Provide advanced configuration options via whiptail menus
|
**Purpose**: Provide advanced configuration options via whiptail menus
|
||||||
**Parameters**: None
|
**Parameters**: None
|
||||||
**Returns**: None
|
**Returns**: None
|
||||||
**Side Effects**:
|
**Side Effects**:
|
||||||
|
|
||||||
- Displays whiptail menus for configuration
|
- Displays whiptail menus for configuration
|
||||||
- Updates configuration variables based on user input
|
- Updates configuration variables based on user input
|
||||||
- Validates user selections
|
- Validates user selections
|
||||||
**Dependencies**: `select_storage()`, `detect_gpu_devices()`
|
**Dependencies**: `select_storage()`, `detect_gpu_devices()`
|
||||||
**Environment Variables Used**: All configuration variables
|
**Environment Variables Used**: All configuration variables
|
||||||
|
|
||||||
#### `settings_menu()`
|
#### `settings_menu()`
|
||||||
|
|
||||||
**Purpose**: Display and handle settings configuration menu
|
**Purpose**: Display and handle settings configuration menu
|
||||||
**Parameters**: None
|
**Parameters**: None
|
||||||
**Returns**: None
|
**Returns**: None
|
||||||
@ -75,58 +85,68 @@ This document provides a comprehensive reference of all functions in `build.func
|
|||||||
### Storage Functions
|
### Storage Functions
|
||||||
|
|
||||||
#### `select_storage()`
|
#### `select_storage()`
|
||||||
|
|
||||||
**Purpose**: Handle storage selection for templates and containers
|
**Purpose**: Handle storage selection for templates and containers
|
||||||
**Parameters**: None
|
**Parameters**: None
|
||||||
**Returns**: None
|
**Returns**: None
|
||||||
**Side Effects**:
|
**Side Effects**:
|
||||||
|
|
||||||
- Resolves storage preselection
|
- Resolves storage preselection
|
||||||
- Prompts user for storage selection if needed
|
- Prompts user for storage selection if needed
|
||||||
- Validates storage availability
|
- Validates storage availability
|
||||||
- Sets var_template_storage and var_container_storage
|
- Sets var_template_storage and var_container_storage
|
||||||
**Dependencies**: `resolve_storage_preselect()`, `choose_and_set_storage_for_file()`
|
**Dependencies**: `resolve_storage_preselect()`, `choose_and_set_storage_for_file()`
|
||||||
**Environment Variables Used**: `var_template_storage`, `var_container_storage`, `TEMPLATE_STORAGE`, `CONTAINER_STORAGE`
|
**Environment Variables Used**: `var_template_storage`, `var_container_storage`, `TEMPLATE_STORAGE`, `CONTAINER_STORAGE`
|
||||||
|
|
||||||
#### `resolve_storage_preselect()`
|
#### `resolve_storage_preselect()`
|
||||||
|
|
||||||
**Purpose**: Resolve preselected storage options
|
**Purpose**: Resolve preselected storage options
|
||||||
**Parameters**:
|
**Parameters**:
|
||||||
|
|
||||||
- `storage_type`: Type of storage (template or container)
|
- `storage_type`: Type of storage (template or container)
|
||||||
**Returns**: Storage name if valid, empty if invalid
|
**Returns**: Storage name if valid, empty if invalid
|
||||||
**Side Effects**: Validates storage availability
|
**Side Effects**: Validates storage availability
|
||||||
**Dependencies**: None
|
**Dependencies**: None
|
||||||
**Environment Variables Used**: `var_template_storage`, `var_container_storage`
|
**Environment Variables Used**: `var_template_storage`, `var_container_storage`
|
||||||
|
|
||||||
#### `choose_and_set_storage_for_file()`
|
#### `choose_and_set_storage_for_file()`
|
||||||
|
|
||||||
**Purpose**: Interactive storage selection via whiptail
|
**Purpose**: Interactive storage selection via whiptail
|
||||||
**Parameters**:
|
**Parameters**:
|
||||||
|
|
||||||
- `storage_type`: Type of storage (template or container)
|
- `storage_type`: Type of storage (template or container)
|
||||||
- `content_type`: Content type (vztmpl or rootdir)
|
- `content_type`: Content type (vztmpl or rootdir)
|
||||||
**Returns**: None
|
**Returns**: None
|
||||||
**Side Effects**:
|
**Side Effects**:
|
||||||
- Displays whiptail menu
|
- Displays whiptail menu
|
||||||
- Updates storage variables
|
- Updates storage variables
|
||||||
- Validates selection
|
- Validates selection
|
||||||
**Dependencies**: None
|
**Dependencies**: None
|
||||||
**Environment Variables Used**: `var_template_storage`, `var_container_storage`
|
**Environment Variables Used**: `var_template_storage`, `var_container_storage`
|
||||||
|
|
||||||
### Container Creation Functions
|
### Container Creation Functions
|
||||||
|
|
||||||
#### `build_container()`
|
#### `build_container()`
|
||||||
|
|
||||||
**Purpose**: Validate settings and prepare container creation
|
**Purpose**: Validate settings and prepare container creation
|
||||||
**Parameters**: None
|
**Parameters**: None
|
||||||
**Returns**: None
|
**Returns**: None
|
||||||
**Side Effects**:
|
**Side Effects**:
|
||||||
|
|
||||||
- Validates all configuration
|
- Validates all configuration
|
||||||
- Checks for conflicts
|
- Checks for conflicts
|
||||||
- Prepares container configuration
|
- Prepares container configuration
|
||||||
- Calls create_lxc_container()
|
- Calls create_lxc_container()
|
||||||
**Dependencies**: `create_lxc_container()`
|
**Dependencies**: `create_lxc_container()`
|
||||||
**Environment Variables Used**: All configuration variables
|
**Environment Variables Used**: All configuration variables
|
||||||
|
|
||||||
#### `create_lxc_container()`
|
#### `create_lxc_container()`
|
||||||
|
|
||||||
**Purpose**: Create the actual LXC container
|
**Purpose**: Create the actual LXC container
|
||||||
**Parameters**: None
|
**Parameters**: None
|
||||||
**Returns**: None
|
**Returns**: None
|
||||||
**Side Effects**:
|
**Side Effects**:
|
||||||
|
|
||||||
- Creates LXC container with basic configuration
|
- Creates LXC container with basic configuration
|
||||||
- Configures network settings
|
- Configures network settings
|
||||||
- Sets up storage and mount points
|
- Sets up storage and mount points
|
||||||
@ -134,108 +154,176 @@ This document provides a comprehensive reference of all functions in `build.func
|
|||||||
- Sets resource limits
|
- Sets resource limits
|
||||||
- Configures startup options
|
- Configures startup options
|
||||||
- Starts container
|
- Starts container
|
||||||
**Dependencies**: `configure_gpu_passthrough()`, `fix_gpu_gids()`
|
**Dependencies**: `configure_gpu_passthrough()`, `fix_gpu_gids()`
|
||||||
**Environment Variables Used**: All configuration variables
|
**Environment Variables Used**: All configuration variables
|
||||||
|
|
||||||
### GPU and Hardware Functions
|
### GPU and Hardware Functions
|
||||||
|
|
||||||
#### `detect_gpu_devices()`
|
#### `detect_gpu_devices()`
|
||||||
|
|
||||||
**Purpose**: Detect available GPU hardware on the system
|
**Purpose**: Detect available GPU hardware on the system
|
||||||
**Parameters**: None
|
**Parameters**: None
|
||||||
**Returns**: None
|
**Returns**: None
|
||||||
**Side Effects**:
|
**Side Effects**:
|
||||||
|
|
||||||
- Scans for Intel, AMD, and NVIDIA GPUs
|
- Scans for Intel, AMD, and NVIDIA GPUs
|
||||||
- Updates var_gpu_type and var_gpu_devices
|
- Updates var_gpu_type and var_gpu_devices
|
||||||
- Determines GPU capabilities
|
- Determines GPU capabilities
|
||||||
**Dependencies**: None
|
**Dependencies**: None
|
||||||
**Environment Variables Used**: `var_gpu_type`, `var_gpu_devices`, `GPU_APPS`
|
**Environment Variables Used**: `var_gpu_type`, `var_gpu_devices`, `GPU_APPS`
|
||||||
|
|
||||||
#### `configure_gpu_passthrough()`
|
#### `configure_gpu_passthrough()`
|
||||||
|
|
||||||
**Purpose**: Configure GPU passthrough for the container
|
**Purpose**: Configure GPU passthrough for the container
|
||||||
**Parameters**: None
|
**Parameters**: None
|
||||||
**Returns**: None
|
**Returns**: None
|
||||||
**Side Effects**:
|
**Side Effects**:
|
||||||
|
|
||||||
- Adds GPU device entries to container config
|
- Adds GPU device entries to container config
|
||||||
- Configures proper device permissions
|
- Configures proper device permissions
|
||||||
- Sets up device mapping
|
- Sets up device mapping
|
||||||
- Updates /etc/pve/lxc/<ctid>.conf
|
- Updates /etc/pve/lxc/<ctid>.conf
|
||||||
**Dependencies**: `detect_gpu_devices()`
|
**Dependencies**: `detect_gpu_devices()`
|
||||||
**Environment Variables Used**: `var_gpu`, `var_gpu_type`, `var_gpu_devices`, `CTID`
|
**Environment Variables Used**: `var_gpu`, `var_gpu_type`, `var_gpu_devices`, `CTID`
|
||||||
|
|
||||||
#### `fix_gpu_gids()`
|
#### `fix_gpu_gids()`
|
||||||
|
|
||||||
**Purpose**: Fix GPU group IDs after container creation
|
**Purpose**: Fix GPU group IDs after container creation
|
||||||
**Parameters**: None
|
**Parameters**: None
|
||||||
**Returns**: None
|
**Returns**: None
|
||||||
**Side Effects**:
|
**Side Effects**:
|
||||||
|
|
||||||
- Updates GPU group IDs in container
|
- Updates GPU group IDs in container
|
||||||
- Ensures proper GPU access permissions
|
- Ensures proper GPU access permissions
|
||||||
- Configures video and render groups
|
- Configures video and render groups
|
||||||
**Dependencies**: `configure_gpu_passthrough()`
|
**Dependencies**: `configure_gpu_passthrough()`
|
||||||
**Environment Variables Used**: `CTID`, `var_gpu_type`
|
**Environment Variables Used**: `CTID`, `var_gpu_type`
|
||||||
|
|
||||||
|
### SSH Configuration Functions
|
||||||
|
|
||||||
|
#### `configure_ssh_settings()`
|
||||||
|
|
||||||
|
**Purpose**: Interactive SSH key and access configuration wizard
|
||||||
|
**Parameters**:
|
||||||
|
|
||||||
|
- `step_info` (optional): Step indicator string (e.g., "Step 17/19") for consistent dialog headers
|
||||||
|
**Returns**: None
|
||||||
|
**Side Effects**:
|
||||||
|
- Creates temporary file for SSH keys
|
||||||
|
- Discovers and presents available SSH keys from host
|
||||||
|
- Allows manual key entry or folder/glob scanning
|
||||||
|
- Sets `SSH` variable to "yes" or "no" based on user selection
|
||||||
|
- Sets `SSH_AUTHORIZED_KEY` if manual key provided
|
||||||
|
- Populates `SSH_KEYS_FILE` with selected keys
|
||||||
|
**Dependencies**: `ssh_discover_default_files()`, `ssh_build_choices_from_files()`
|
||||||
|
**Environment Variables Used**: `SSH`, `SSH_AUTHORIZED_KEY`, `SSH_KEYS_FILE`
|
||||||
|
|
||||||
|
**SSH Key Source Options**:
|
||||||
|
|
||||||
|
1. `found` - Select from auto-detected host keys
|
||||||
|
2. `manual` - Paste a single public key
|
||||||
|
3. `folder` - Scan custom folder or glob pattern
|
||||||
|
4. `none` - No SSH keys
|
||||||
|
|
||||||
|
**Note**: The "Enable root SSH access?" dialog is always shown, regardless of whether SSH keys or password are configured. This ensures users can always enable SSH access even with automatic login.
|
||||||
|
|
||||||
|
#### `ssh_discover_default_files()`
|
||||||
|
|
||||||
|
**Purpose**: Discover SSH public key files on the host system
|
||||||
|
**Parameters**: None
|
||||||
|
**Returns**: Array of discovered key file paths
|
||||||
|
**Side Effects**: Scans common SSH key locations
|
||||||
|
**Dependencies**: None
|
||||||
|
**Environment Variables Used**: `var_ssh_import_glob`
|
||||||
|
|
||||||
|
#### `ssh_build_choices_from_files()`
|
||||||
|
|
||||||
|
**Purpose**: Build whiptail checklist choices from SSH key files
|
||||||
|
**Parameters**:
|
||||||
|
|
||||||
|
- Array of file paths to process
|
||||||
|
**Returns**: None
|
||||||
|
**Side Effects**:
|
||||||
|
- Sets `CHOICES` array for whiptail checklist
|
||||||
|
- Sets `COUNT` variable with number of keys found
|
||||||
|
- Creates `MAPFILE` for key tag to content mapping
|
||||||
|
**Dependencies**: None
|
||||||
|
**Environment Variables Used**: `CHOICES`, `COUNT`, `MAPFILE`
|
||||||
|
|
||||||
### Settings Persistence Functions
|
### Settings Persistence Functions
|
||||||
|
|
||||||
#### `default_var_settings()`
|
#### `default_var_settings()`
|
||||||
|
|
||||||
**Purpose**: Offer to save current settings as defaults
|
**Purpose**: Offer to save current settings as defaults
|
||||||
**Parameters**: None
|
**Parameters**: None
|
||||||
**Returns**: None
|
**Returns**: None
|
||||||
**Side Effects**:
|
**Side Effects**:
|
||||||
|
|
||||||
- Prompts user to save settings
|
- Prompts user to save settings
|
||||||
- Saves to default.vars file
|
- Saves to default.vars file
|
||||||
- Saves to app-specific .vars file
|
- Saves to app-specific .vars file
|
||||||
**Dependencies**: `maybe_offer_save_app_defaults()`
|
**Dependencies**: `maybe_offer_save_app_defaults()`
|
||||||
**Environment Variables Used**: All configuration variables
|
**Environment Variables Used**: All configuration variables
|
||||||
|
|
||||||
#### `maybe_offer_save_app_defaults()`
|
#### `maybe_offer_save_app_defaults()`
|
||||||
|
|
||||||
**Purpose**: Offer to save app-specific defaults
|
**Purpose**: Offer to save app-specific defaults
|
||||||
**Parameters**: None
|
**Parameters**: None
|
||||||
**Returns**: None
|
**Returns**: None
|
||||||
**Side Effects**:
|
**Side Effects**:
|
||||||
|
|
||||||
- Prompts user to save app-specific settings
|
- Prompts user to save app-specific settings
|
||||||
- Saves to app.vars file
|
- Saves to app.vars file
|
||||||
- Updates app-specific configuration
|
- Updates app-specific configuration
|
||||||
**Dependencies**: None
|
**Dependencies**: None
|
||||||
**Environment Variables Used**: `APP`, `SAVE_APP_DEFAULTS`
|
**Environment Variables Used**: `APP`, `SAVE_APP_DEFAULTS`
|
||||||
|
|
||||||
### Utility Functions
|
### Utility Functions
|
||||||
|
|
||||||
#### `validate_settings()`
|
#### `validate_settings()`
|
||||||
|
|
||||||
**Purpose**: Validate all configuration settings
|
**Purpose**: Validate all configuration settings
|
||||||
**Parameters**: None
|
**Parameters**: None
|
||||||
**Returns**: 0 if valid, 1 if invalid
|
**Returns**: 0 if valid, 1 if invalid
|
||||||
**Side Effects**:
|
**Side Effects**:
|
||||||
|
|
||||||
- Checks for configuration conflicts
|
- Checks for configuration conflicts
|
||||||
- Validates resource limits
|
- Validates resource limits
|
||||||
- Validates network configuration
|
- Validates network configuration
|
||||||
- Validates storage configuration
|
- Validates storage configuration
|
||||||
**Dependencies**: None
|
**Dependencies**: None
|
||||||
**Environment Variables Used**: All configuration variables
|
**Environment Variables Used**: All configuration variables
|
||||||
|
|
||||||
#### `check_conflicts()`
|
#### `check_conflicts()`
|
||||||
|
|
||||||
**Purpose**: Check for configuration conflicts
|
**Purpose**: Check for configuration conflicts
|
||||||
**Parameters**: None
|
**Parameters**: None
|
||||||
**Returns**: 0 if no conflicts, 1 if conflicts found
|
**Returns**: 0 if no conflicts, 1 if conflicts found
|
||||||
**Side Effects**:
|
**Side Effects**:
|
||||||
|
|
||||||
- Checks for conflicting settings
|
- Checks for conflicting settings
|
||||||
- Validates resource allocation
|
- Validates resource allocation
|
||||||
- Checks network configuration
|
- Checks network configuration
|
||||||
**Dependencies**: None
|
**Dependencies**: None
|
||||||
**Environment Variables Used**: All configuration variables
|
**Environment Variables Used**: All configuration variables
|
||||||
|
|
||||||
#### `cleanup_on_error()`
|
#### `cleanup_on_error()`
|
||||||
|
|
||||||
**Purpose**: Clean up resources on error
|
**Purpose**: Clean up resources on error
|
||||||
**Parameters**: None
|
**Parameters**: None
|
||||||
**Returns**: None
|
**Returns**: None
|
||||||
**Side Effects**:
|
**Side Effects**:
|
||||||
|
|
||||||
- Removes partially created containers
|
- Removes partially created containers
|
||||||
- Cleans up temporary files
|
- Cleans up temporary files
|
||||||
- Resets configuration
|
- Resets configuration
|
||||||
**Dependencies**: None
|
**Dependencies**: None
|
||||||
**Environment Variables Used**: `CTID`
|
**Environment Variables Used**: `CTID`
|
||||||
|
|
||||||
## Function Call Flow
|
## Function Call Flow
|
||||||
|
|
||||||
### Main Installation Flow
|
### Main Installation Flow
|
||||||
|
|
||||||
```
|
```
|
||||||
start()
|
start()
|
||||||
├── variables()
|
├── variables()
|
||||||
@ -259,6 +347,7 @@ start()
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Error Handling Flow
|
### Error Handling Flow
|
||||||
|
|
||||||
```
|
```
|
||||||
Error Detection
|
Error Detection
|
||||||
├── validate_settings()
|
├── validate_settings()
|
||||||
@ -271,24 +360,29 @@ Error Detection
|
|||||||
## Function Dependencies
|
## Function Dependencies
|
||||||
|
|
||||||
### Core Dependencies
|
### Core Dependencies
|
||||||
|
|
||||||
- `start()` → `install_script()` → `build_container()` → `create_lxc_container()`
|
- `start()` → `install_script()` → `build_container()` → `create_lxc_container()`
|
||||||
- `variables()` → `base_settings()`
|
- `variables()` → `base_settings()`
|
||||||
- `advanced_settings()` → `select_storage()` → `detect_gpu_devices()`
|
- `advanced_settings()` → `select_storage()` → `detect_gpu_devices()`
|
||||||
|
|
||||||
### Storage Dependencies
|
### Storage Dependencies
|
||||||
|
|
||||||
- `select_storage()` → `resolve_storage_preselect()`
|
- `select_storage()` → `resolve_storage_preselect()`
|
||||||
- `select_storage()` → `choose_and_set_storage_for_file()`
|
- `select_storage()` → `choose_and_set_storage_for_file()`
|
||||||
|
|
||||||
### GPU Dependencies
|
### GPU Dependencies
|
||||||
|
|
||||||
- `configure_gpu_passthrough()` → `detect_gpu_devices()`
|
- `configure_gpu_passthrough()` → `detect_gpu_devices()`
|
||||||
- `fix_gpu_gids()` → `configure_gpu_passthrough()`
|
- `fix_gpu_gids()` → `configure_gpu_passthrough()`
|
||||||
|
|
||||||
### Settings Dependencies
|
### Settings Dependencies
|
||||||
|
|
||||||
- `default_var_settings()` → `maybe_offer_save_app_defaults()`
|
- `default_var_settings()` → `maybe_offer_save_app_defaults()`
|
||||||
|
|
||||||
## Function Usage Examples
|
## Function Usage Examples
|
||||||
|
|
||||||
### Basic Container Creation
|
### Basic Container Creation
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Set required variables
|
# Set required variables
|
||||||
export APP="plex"
|
export APP="plex"
|
||||||
@ -304,6 +398,7 @@ start() # Entry point
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Advanced Configuration
|
### Advanced Configuration
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Set advanced variables
|
# Set advanced variables
|
||||||
export var_os="debian"
|
export var_os="debian"
|
||||||
@ -319,6 +414,7 @@ advanced_settings() # Interactive configuration
|
|||||||
```
|
```
|
||||||
|
|
||||||
### GPU Passthrough
|
### GPU Passthrough
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Enable GPU passthrough
|
# Enable GPU passthrough
|
||||||
export GPU_APPS="plex"
|
export GPU_APPS="plex"
|
||||||
@ -331,6 +427,7 @@ fix_gpu_gids() # Fix permissions
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Settings Persistence
|
### Settings Persistence
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Save settings as defaults
|
# Save settings as defaults
|
||||||
export SAVE_DEFAULTS="true"
|
export SAVE_DEFAULTS="true"
|
||||||
@ -344,15 +441,18 @@ maybe_offer_save_app_defaults() # Save app defaults
|
|||||||
## Function Error Handling
|
## Function Error Handling
|
||||||
|
|
||||||
### Validation Functions
|
### Validation Functions
|
||||||
|
|
||||||
- `validate_settings()`: Returns 0 for valid, 1 for invalid
|
- `validate_settings()`: Returns 0 for valid, 1 for invalid
|
||||||
- `check_conflicts()`: Returns 0 for no conflicts, 1 for conflicts
|
- `check_conflicts()`: Returns 0 for no conflicts, 1 for conflicts
|
||||||
|
|
||||||
### Error Recovery
|
### Error Recovery
|
||||||
|
|
||||||
- `cleanup_on_error()`: Cleans up on any error
|
- `cleanup_on_error()`: Cleans up on any error
|
||||||
- Error codes are propagated up the call stack
|
- Error codes are propagated up the call stack
|
||||||
- Critical errors cause script termination
|
- Critical errors cause script termination
|
||||||
|
|
||||||
### Error Types
|
### Error Types
|
||||||
|
|
||||||
1. **Configuration Errors**: Invalid settings or conflicts
|
1. **Configuration Errors**: Invalid settings or conflicts
|
||||||
2. **Resource Errors**: Insufficient resources or conflicts
|
2. **Resource Errors**: Insufficient resources or conflicts
|
||||||
3. **Network Errors**: Invalid network configuration
|
3. **Network Errors**: Invalid network configuration
|
||||||
|
|||||||
@ -6,6 +6,16 @@ This directory contains comprehensive documentation for the `build.func` script,
|
|||||||
|
|
||||||
## Documentation Files
|
## Documentation Files
|
||||||
|
|
||||||
|
### 🎛️ [BUILD_FUNC_ADVANCED_SETTINGS.md](./BUILD_FUNC_ADVANCED_SETTINGS.md)
|
||||||
|
Complete reference for the 28-step Advanced Settings wizard, including all configurable options and their inheritance behavior.
|
||||||
|
|
||||||
|
**Contents:**
|
||||||
|
- All 28 wizard steps explained
|
||||||
|
- Default value inheritance
|
||||||
|
- Feature matrix (when to enable each feature)
|
||||||
|
- Confirmation summary format
|
||||||
|
- Usage examples
|
||||||
|
|
||||||
### 📊 [BUILD_FUNC_FLOWCHART.md](./BUILD_FUNC_FLOWCHART.md)
|
### 📊 [BUILD_FUNC_FLOWCHART.md](./BUILD_FUNC_FLOWCHART.md)
|
||||||
Visual ASCII flowchart showing the main execution flow, decision trees, and key decision points in the build.func script.
|
Visual ASCII flowchart showing the main execution flow, decision trees, and key decision points in the build.func script.
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
],
|
],
|
||||||
"date_created": "2024-05-02",
|
"date_created": "2024-05-02",
|
||||||
"type": "ct",
|
"type": "ct",
|
||||||
"updateable": false,
|
"updateable": true,
|
||||||
"privileged": false,
|
"privileged": false,
|
||||||
"interface_port": 6880,
|
"interface_port": 6880,
|
||||||
"documentation": "https://aria2.github.io/manual/en/html/index.html",
|
"documentation": "https://aria2.github.io/manual/en/html/index.html",
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
],
|
],
|
||||||
"date_created": "2024-05-02",
|
"date_created": "2024-05-02",
|
||||||
"type": "ct",
|
"type": "ct",
|
||||||
"updateable": false,
|
"updateable": true,
|
||||||
"privileged": false,
|
"privileged": false,
|
||||||
"interface_port": 80,
|
"interface_port": 80,
|
||||||
"documentation": "https://wiki.casaos.io/en/home",
|
"documentation": "https://wiki.casaos.io/en/home",
|
||||||
|
|||||||
52
frontend/public/json/coolify.json
Normal file
52
frontend/public/json/coolify.json
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
{
|
||||||
|
"name": "Coolify",
|
||||||
|
"slug": "coolify",
|
||||||
|
"categories": [
|
||||||
|
6
|
||||||
|
],
|
||||||
|
"date_created": "2025-12-09",
|
||||||
|
"type": "ct",
|
||||||
|
"updateable": true,
|
||||||
|
"privileged": false,
|
||||||
|
"interface_port": 8000,
|
||||||
|
"documentation": "https://coolify.io/docs",
|
||||||
|
"config_path": "/data/coolify",
|
||||||
|
"website": "https://coolify.io/",
|
||||||
|
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/coolify.webp",
|
||||||
|
"description": "Coolify is an open-source & self-hostable alternative to Heroku, Netlify, and Vercel. It helps you manage your servers, applications, and databases on your own hardware with Docker. Deploy any application from Git repositories, Docker images, or use pre-built templates.",
|
||||||
|
"install_methods": [
|
||||||
|
{
|
||||||
|
"type": "default",
|
||||||
|
"script": "ct/coolify.sh",
|
||||||
|
"resources": {
|
||||||
|
"cpu": 2,
|
||||||
|
"ram": 4096,
|
||||||
|
"hdd": 30,
|
||||||
|
"os": "Debian",
|
||||||
|
"version": "13"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default_credentials": {
|
||||||
|
"username": null,
|
||||||
|
"password": null
|
||||||
|
},
|
||||||
|
"notes": [
|
||||||
|
{
|
||||||
|
"text": "Initial setup will be done via the web interface on first access.",
|
||||||
|
"type": "info"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "Coolify has built-in auto-updates. You can configure update frequency in Settings.",
|
||||||
|
"type": "info"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "Coolify requires SSH access to manage deployments. SSH is enabled automatically.",
|
||||||
|
"type": "info"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "This container uses Docker-in-Docker (nesting) for application deployments.",
|
||||||
|
"type": "warning"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -6,7 +6,7 @@
|
|||||||
],
|
],
|
||||||
"date_created": "2024-05-02",
|
"date_created": "2024-05-02",
|
||||||
"type": "ct",
|
"type": "ct",
|
||||||
"updateable": false,
|
"updateable": true,
|
||||||
"privileged": false,
|
"privileged": false,
|
||||||
"interface_port": 8084,
|
"interface_port": 8084,
|
||||||
"documentation": null,
|
"documentation": null,
|
||||||
|
|||||||
35
frontend/public/json/discopanel.json
Normal file
35
frontend/public/json/discopanel.json
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
"name": "DiscoPanel",
|
||||||
|
"slug": "discopanel",
|
||||||
|
"categories": [
|
||||||
|
24
|
||||||
|
],
|
||||||
|
"date_created": "2025-12-10",
|
||||||
|
"type": "ct",
|
||||||
|
"updateable": true,
|
||||||
|
"privileged": false,
|
||||||
|
"interface_port": 8080,
|
||||||
|
"documentation": "https://discopanel.app/docs/",
|
||||||
|
"config_path": "",
|
||||||
|
"website": "https://discopanel.app/",
|
||||||
|
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/discopanel.webp",
|
||||||
|
"description": "The Minecraft Server Manager That *Actually* Works\nBuilt by someone who was done with bloated panels, endless menus, and tools that break the moment you need them most.\nSpin up servers in minutes, configure your proxy without headaches, and link your own DNS name effortlessly.\nFast setup, clean controls, zero nonsense—just a manager that gets out of your way and lets you play.",
|
||||||
|
"install_methods": [
|
||||||
|
{
|
||||||
|
"type": "default",
|
||||||
|
"script": "ct/discopanel.sh",
|
||||||
|
"resources": {
|
||||||
|
"cpu": 4,
|
||||||
|
"ram": 4096,
|
||||||
|
"hdd": 15,
|
||||||
|
"os": "Debian",
|
||||||
|
"version": "13"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default_credentials": {
|
||||||
|
"username": null,
|
||||||
|
"password": null
|
||||||
|
},
|
||||||
|
"notes": []
|
||||||
|
}
|
||||||
48
frontend/public/json/dokploy.json
Normal file
48
frontend/public/json/dokploy.json
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
{
|
||||||
|
"name": "Dokploy",
|
||||||
|
"slug": "dokploy",
|
||||||
|
"categories": [
|
||||||
|
6
|
||||||
|
],
|
||||||
|
"date_created": "2025-12-09",
|
||||||
|
"type": "ct",
|
||||||
|
"updateable": true,
|
||||||
|
"privileged": false,
|
||||||
|
"interface_port": 3000,
|
||||||
|
"documentation": "https://docs.dokploy.com/",
|
||||||
|
"config_path": "/etc/dokploy",
|
||||||
|
"website": "https://dokploy.com/",
|
||||||
|
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/png/dokploy.png",
|
||||||
|
"description": "Dokploy is a free, self-hostable Platform as a Service (PaaS) that simplifies the deployment and management of applications and databases. Built with Docker and Traefik, it offers features like automatic SSL, Docker Compose support, database backups, and a real-time monitoring dashboard.",
|
||||||
|
"install_methods": [
|
||||||
|
{
|
||||||
|
"type": "default",
|
||||||
|
"script": "ct/dokploy.sh",
|
||||||
|
"resources": {
|
||||||
|
"cpu": 2,
|
||||||
|
"ram": 2048,
|
||||||
|
"hdd": 10,
|
||||||
|
"os": "Debian",
|
||||||
|
"version": "13"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default_credentials": {
|
||||||
|
"username": null,
|
||||||
|
"password": null
|
||||||
|
},
|
||||||
|
"notes": [
|
||||||
|
{
|
||||||
|
"text": "Initial setup will be done via the web interface on first access.",
|
||||||
|
"type": "info"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "Dokploy has built-in auto-updates via the web interface.",
|
||||||
|
"type": "info"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "This container uses Docker-in-Docker (nesting) for application deployments.",
|
||||||
|
"type": "warning"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -22,8 +22,8 @@
|
|||||||
"cpu": 2,
|
"cpu": 2,
|
||||||
"ram": 2048,
|
"ram": 2048,
|
||||||
"hdd": 6,
|
"hdd": 6,
|
||||||
"os": "debian",
|
"os": "ubuntu",
|
||||||
"version": "13"
|
"version": "24.04"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
],
|
],
|
||||||
"date_created": "2024-05-02",
|
"date_created": "2024-05-02",
|
||||||
"type": "ct",
|
"type": "ct",
|
||||||
"updateable": false,
|
"updateable": true,
|
||||||
"privileged": false,
|
"privileged": false,
|
||||||
"interface_port": 8081,
|
"interface_port": 8081,
|
||||||
"documentation": "https://www.iobroker.net/#en/documentation",
|
"documentation": "https://www.iobroker.net/#en/documentation",
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
],
|
],
|
||||||
"date_created": "2025-11-14",
|
"date_created": "2025-11-14",
|
||||||
"type": "ct",
|
"type": "ct",
|
||||||
"updateable": false,
|
"updateable": true,
|
||||||
"privileged": false,
|
"privileged": false,
|
||||||
"interface_port": 80,
|
"interface_port": 80,
|
||||||
"documentation": "https://docs.librenms.org/",
|
"documentation": "https://docs.librenms.org/",
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
],
|
],
|
||||||
"date_created": "2024-05-02",
|
"date_created": "2024-05-02",
|
||||||
"type": "ct",
|
"type": "ct",
|
||||||
"updateable": false,
|
"updateable": true,
|
||||||
"privileged": false,
|
"privileged": false,
|
||||||
"interface_port": 80,
|
"interface_port": 80,
|
||||||
"documentation": "https://ylianst.github.io/MeshCentral/",
|
"documentation": "https://ylianst.github.io/MeshCentral/",
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
],
|
],
|
||||||
"date_created": "2024-05-02",
|
"date_created": "2024-05-02",
|
||||||
"type": "ct",
|
"type": "ct",
|
||||||
"updateable": false,
|
"updateable": true,
|
||||||
"privileged": false,
|
"privileged": false,
|
||||||
"interface_port": 4443,
|
"interface_port": 4443,
|
||||||
"documentation": "https://docs.nextcloudpi.com/",
|
"documentation": "https://docs.nextcloudpi.com/",
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
"updateable": true,
|
"updateable": true,
|
||||||
"privileged": false,
|
"privileged": false,
|
||||||
"interface_port": 3000,
|
"interface_port": 3000,
|
||||||
|
"disable": false,
|
||||||
"documentation": "https://palmr.kyantech.com.br/docs/3.1-beta",
|
"documentation": "https://palmr.kyantech.com.br/docs/3.1-beta",
|
||||||
"config_path": "/opt/palmr/apps/server/.env, /opt/palmr/apps/web/.env",
|
"config_path": "/opt/palmr/apps/server/.env, /opt/palmr/apps/web/.env",
|
||||||
"website": "https://palmr.kyantech.com.br/",
|
"website": "https://palmr.kyantech.com.br/",
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
],
|
],
|
||||||
"date_created": "2024-05-02",
|
"date_created": "2024-05-02",
|
||||||
"type": "ct",
|
"type": "ct",
|
||||||
"updateable": false,
|
"updateable": true,
|
||||||
"privileged": false,
|
"privileged": false,
|
||||||
"interface_port": null,
|
"interface_port": null,
|
||||||
"documentation": "https://podman.io/docs",
|
"documentation": "https://podman.io/docs",
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
],
|
],
|
||||||
"date_created": "2024-05-02",
|
"date_created": "2024-05-02",
|
||||||
"type": "ct",
|
"type": "ct",
|
||||||
"updateable": false,
|
"updateable": true,
|
||||||
"privileged": false,
|
"privileged": false,
|
||||||
"interface_port": 9999,
|
"interface_port": 9999,
|
||||||
"documentation": null,
|
"documentation": null,
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -6,7 +6,7 @@
|
|||||||
],
|
],
|
||||||
"date_created": "2025-03-24",
|
"date_created": "2025-03-24",
|
||||||
"type": "ct",
|
"type": "ct",
|
||||||
"updateable": false,
|
"updateable": true,
|
||||||
"privileged": false,
|
"privileged": false,
|
||||||
"interface_port": 443,
|
"interface_port": 443,
|
||||||
"documentation": "https://documentation.wazuh.com/",
|
"documentation": "https://documentation.wazuh.com/",
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
],
|
],
|
||||||
"date_created": "2024-05-02",
|
"date_created": "2024-05-02",
|
||||||
"type": "ct",
|
"type": "ct",
|
||||||
"updateable": false,
|
"updateable": true,
|
||||||
"privileged": false,
|
"privileged": false,
|
||||||
"interface_port": 6969,
|
"interface_port": 6969,
|
||||||
"documentation": "https://wiki.servarr.com/en/whisparr",
|
"documentation": "https://wiki.servarr.com/en/whisparr",
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
"interface_port": 3000,
|
"interface_port": 3000,
|
||||||
"documentation": "https://docs.requarks.io/",
|
"documentation": "https://docs.requarks.io/",
|
||||||
"website": "https://js.wiki/",
|
"website": "https://js.wiki/",
|
||||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@master/webp/wiki-js.webp",
|
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/wiki-js.webp",
|
||||||
"config_path": "/opt/wikijs/config.yml",
|
"config_path": "/opt/wikijs/config.yml",
|
||||||
"description": "Wiki.js is a free, open-source, and modern wiki application built using Node.js. It is designed to be fast, easy to use, and flexible, with a range of features for collaboration, knowledge management, and content creation. Wiki.js supports Markdown syntax for editing pages, and includes features such as version control, page history, and access control, making it easy to manage content and collaborate with others. The software is fully customizable, with a range of themes and extensions available, and can be deployed on a local server or in the cloud, making it an ideal choice for small teams and organizations looking to create and manage a wiki. Wiki.js provides a modern, user-friendly interface, and supports a range of data sources, including local file systems, databases, and cloud storage services.",
|
"description": "Wiki.js is a free, open-source, and modern wiki application built using Node.js. It is designed to be fast, easy to use, and flexible, with a range of features for collaboration, knowledge management, and content creation. Wiki.js supports Markdown syntax for editing pages, and includes features such as version control, page history, and access control, making it easy to manage content and collaborate with others. The software is fully customizable, with a range of themes and extensions available, and can be deployed on a local server or in the cloud, making it an ideal choice for small teams and organizations looking to create and manage a wiki. Wiki.js provides a modern, user-friendly interface, and supports a range of data sources, including local file systems, databases, and cloud storage services.",
|
||||||
"install_methods": [
|
"install_methods": [
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
"interface_port": 5690,
|
"interface_port": 5690,
|
||||||
"documentation": "https://docs.wizarr.dev/",
|
"documentation": "https://docs.wizarr.dev/",
|
||||||
"website": "https://docs.wizarr.dev/",
|
"website": "https://docs.wizarr.dev/",
|
||||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@master/webp/wizarr.webp",
|
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/wizarr.webp",
|
||||||
"config_path": "/opt/wizarr/.env",
|
"config_path": "/opt/wizarr/.env",
|
||||||
"description": "Wizarr is an automatic user invitation system for Plex, Jellyfin and Emby. Create a unique link and share it to a user and they will automatically be invited to your media Server",
|
"description": "Wizarr is an automatic user invitation system for Plex, Jellyfin and Emby. Create a unique link and share it to a user and they will automatically be invited to your media Server",
|
||||||
"install_methods": [
|
"install_methods": [
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
"interface_port": 80,
|
"interface_port": 80,
|
||||||
"documentation": "https://wordpress.org/documentation/",
|
"documentation": "https://wordpress.org/documentation/",
|
||||||
"website": "https://wordpress.org/",
|
"website": "https://wordpress.org/",
|
||||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@master/webp/wordpress.webp",
|
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/wordpress.webp",
|
||||||
"config_path": "/var/www/html/wordpress/wp-config.php",
|
"config_path": "/var/www/html/wordpress/wp-config.php",
|
||||||
"description": "WordPress is the simplest, most popular way to create your own website or blog. In fact, WordPress powers over 43.6% of all the websites on the Internet. Yes – more than one in four websites that you visit are likely powered by WordPress.\n\nOn a slightly more technical level, WordPress is an open-source content management system licensed under GPLv2, which means that anyone can use or modify the WordPress software for free.",
|
"description": "WordPress is the simplest, most popular way to create your own website or blog. In fact, WordPress powers over 43.6% of all the websites on the Internet. Yes – more than one in four websites that you visit are likely powered by WordPress.\n\nOn a slightly more technical level, WordPress is an open-source content management system licensed under GPLv2, which means that anyone can use or modify the WordPress software for free.",
|
||||||
"install_methods": [
|
"install_methods": [
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
"interface_port": null,
|
"interface_port": null,
|
||||||
"documentation": "https://www.zabbix.com/documentation/current/en/manual",
|
"documentation": "https://www.zabbix.com/documentation/current/en/manual",
|
||||||
"website": "https://www.zabbix.com/",
|
"website": "https://www.zabbix.com/",
|
||||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@master/webp/zabbix.webp",
|
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/zabbix.webp",
|
||||||
"config_path": "/etc/zabbix/zabbix_server.conf",
|
"config_path": "/etc/zabbix/zabbix_server.conf",
|
||||||
"description": "Zabbix is an all-in-one monitoring solution with a variety of enterprise-grade features available right out of the box.",
|
"description": "Zabbix is an all-in-one monitoring solution with a variety of enterprise-grade features available right out of the box.",
|
||||||
"install_methods": [
|
"install_methods": [
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
"interface_port": null,
|
"interface_port": null,
|
||||||
"documentation": "https://docs.zammad.org/en/latest/",
|
"documentation": "https://docs.zammad.org/en/latest/",
|
||||||
"website": "https://zammad.org/",
|
"website": "https://zammad.org/",
|
||||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@master/webp/zammad.webp",
|
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/zammad.webp",
|
||||||
"config_path": "/etc/nginx/sites-available/zammad.conf",
|
"config_path": "/etc/nginx/sites-available/zammad.conf",
|
||||||
"description": "Zammad is a web based open source helpdesk/customer support system with many features to manage customer communication via several channels like telephone, facebook, twitter, chat and emails. It is distributed under version 3 of the GNU AFFERO General Public License (GNU AGPLv3).",
|
"description": "Zammad is a web based open source helpdesk/customer support system with many features to manage customer communication via several channels like telephone, facebook, twitter, chat and emails. It is distributed under version 3 of the GNU AFFERO General Public License (GNU AGPLv3).",
|
||||||
"install_methods": [
|
"install_methods": [
|
||||||
@ -23,7 +23,7 @@
|
|||||||
"ram": 4096,
|
"ram": 4096,
|
||||||
"hdd": 8,
|
"hdd": 8,
|
||||||
"os": "debian",
|
"os": "debian",
|
||||||
"version": "13"
|
"version": "12"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
"interface_port": 3443,
|
"interface_port": 3443,
|
||||||
"documentation": "https://docs.zerotier.com/",
|
"documentation": "https://docs.zerotier.com/",
|
||||||
"website": "https://www.zerotier.com/",
|
"website": "https://www.zerotier.com/",
|
||||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@master/webp/zerotier.webp",
|
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/zerotier.webp",
|
||||||
"config_path": "/opt/key-networks/ztncui/.env",
|
"config_path": "/opt/key-networks/ztncui/.env",
|
||||||
"description": "ZeroTier is a secure network overlay that allows you to manage all of your network resources as if they were on the same LAN. The software-defined solution can be deployed in minutes from anywhere. No matter how many devices you need to connect, or where they are in the world, ZeroTier makes global networking simple.",
|
"description": "ZeroTier is a secure network overlay that allows you to manage all of your network resources as if they were on the same LAN. The software-defined solution can be deployed in minutes from anywhere. No matter how many devices you need to connect, or where they are in the world, ZeroTier makes global networking simple.",
|
||||||
"install_methods": [
|
"install_methods": [
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
"interface_port": 9442,
|
"interface_port": 9442,
|
||||||
"documentation": "https://www.zigbee2mqtt.io/guide/getting-started/",
|
"documentation": "https://www.zigbee2mqtt.io/guide/getting-started/",
|
||||||
"website": "https://www.zigbee2mqtt.io/",
|
"website": "https://www.zigbee2mqtt.io/",
|
||||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@master/webp/zigbee2mqtt.webp",
|
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/zigbee2mqtt.webp",
|
||||||
"config_path": "debian: /opt/zigbee2mqtt/data/configuration.yaml | alpine: /var/lib/zigbee2mqtt/configuration.yaml",
|
"config_path": "debian: /opt/zigbee2mqtt/data/configuration.yaml | alpine: /var/lib/zigbee2mqtt/configuration.yaml",
|
||||||
"description": "Zigbee2MQTT is an open-source software project that allows you to use Zigbee-based smart home devices (such as those sold under the Philips Hue and Ikea Tradfri brands) with MQTT-based home automation systems, like Home Assistant, Node-RED, and others. The software acts as a bridge between your Zigbee devices and MQTT, allowing you to control and monitor these devices from your home automation system.",
|
"description": "Zigbee2MQTT is an open-source software project that allows you to use Zigbee-based smart home devices (such as those sold under the Philips Hue and Ikea Tradfri brands) with MQTT-based home automation systems, like Home Assistant, Node-RED, and others. The software acts as a bridge between your Zigbee devices and MQTT, allowing you to control and monitor these devices from your home automation system.",
|
||||||
"install_methods": [
|
"install_methods": [
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
"interface_port": 3000,
|
"interface_port": 3000,
|
||||||
"documentation": "https://zipline.diced.sh/docs/get-started",
|
"documentation": "https://zipline.diced.sh/docs/get-started",
|
||||||
"website": "https://zipline.diced.sh/",
|
"website": "https://zipline.diced.sh/",
|
||||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@master/webp/zipline.webp",
|
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/zipline.webp",
|
||||||
"config_path": "/opt/zipline/.env",
|
"config_path": "/opt/zipline/.env",
|
||||||
"description": "Zipline is a file-sharing and URL-shortening server designed for easy setup and extensive features. It allows users to upload files, organize them into folders, create shortened URLs, and manage uploads through a user-friendly dashboard. Additional features include image compression, video thumbnails, password protection, 2FA, OAuth2 registration, and API access for custom control. It supports integrations with platforms like Discord.",
|
"description": "Zipline is a file-sharing and URL-shortening server designed for easy setup and extensive features. It allows users to upload files, organize them into folders, create shortened URLs, and manage uploads through a user-friendly dashboard. Additional features include image compression, video thumbnails, password protection, 2FA, OAuth2 registration, and API access for custom control. It supports integrations with platforms like Discord.",
|
||||||
"install_methods": [
|
"install_methods": [
|
||||||
|
|||||||
@ -34,7 +34,7 @@ export default function CodeCopyButton({
|
|||||||
localStorage.setItem("warning", "1");
|
localStorage.setItem("warning", "1");
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
toast.error(
|
toast.error(
|
||||||
"Be careful when copying scripts from the internet. Always remember check the source!",
|
"Be careful when copying scripts from the internet. Always remember to check the source!",
|
||||||
{ duration: 8000 },
|
{ duration: 8000 },
|
||||||
);
|
);
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|||||||
@ -34,9 +34,4 @@ export const FAQ_Items = [
|
|||||||
content:
|
content:
|
||||||
"If an LXC script fails, run it again using Verbose mode. Standard mode hides detailed output for neatness, showing only progress. Verbose mode displays all messages, which helps you (and us) diagnose the error. Include this verbose output if you report the issue.",
|
"If an LXC script fails, run it again using Verbose mode. Standard mode hides detailed output for neatness, showing only progress. Verbose mode displays all messages, which helps you (and us) diagnose the error. Include this verbose output if you report the issue.",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: "What does \"Updatable\" and \"Not updatable\" mean?",
|
|
||||||
content:
|
|
||||||
"Updatable means that script has a function that is used to update the installed application to the latest version available. Not updatable means that script doesn't have a function that can safely update the application to the latest version available, so only the LXC OS is updated.",
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|||||||
39
install/coolify-install.sh
Normal file
39
install/coolify-install.sh
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: MickLesk (CanbiZ)
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
# Source: https://coolify.io/
|
||||||
|
|
||||||
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
|
color
|
||||||
|
verb_ip6
|
||||||
|
catch_errors
|
||||||
|
setting_up_container
|
||||||
|
network_check
|
||||||
|
update_os
|
||||||
|
|
||||||
|
msg_info "Installing Dependencies"
|
||||||
|
$STD apt install -y \
|
||||||
|
git \
|
||||||
|
openssl
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_warn "WARNING: This script will run an external installer from a third-party source (https://coolify.io/)."
|
||||||
|
msg_warn "The following code is NOT maintained or audited by our repository."
|
||||||
|
msg_warn "If you have any doubts or concerns, please review the installer code before proceeding:"
|
||||||
|
msg_custom "${TAB3}${GATEWAY}${BGN}${CL}" "\e[1;34m" "→ https://cdn.coollabs.io/coolify/install.sh"
|
||||||
|
echo
|
||||||
|
read -r -p "${TAB3}Do you want to continue? [y/N]: " CONFIRM
|
||||||
|
if [[ ! "$CONFIRM" =~ ^([yY][eE][sS]|[yY])$ ]]; then
|
||||||
|
msg_error "Aborted by user. No changes have been made."
|
||||||
|
exit 10
|
||||||
|
fi
|
||||||
|
|
||||||
|
msg_info "Installing Coolify (Patience - this installs Docker and pulls containers)"
|
||||||
|
$STD bash <(curl -fsSL https://cdn.coollabs.io/coolify/install.sh)
|
||||||
|
msg_ok "Installed Coolify"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
cleanup_lxc
|
||||||
51
install/discopanel-install.sh
Normal file
51
install/discopanel-install.sh
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: DragoQC
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
# Source: https://discopanel.app/
|
||||||
|
|
||||||
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
|
color
|
||||||
|
verb_ip6
|
||||||
|
catch_errors
|
||||||
|
setting_up_container
|
||||||
|
network_check
|
||||||
|
update_os
|
||||||
|
|
||||||
|
msg_info "Installing Dependencies"
|
||||||
|
$STD apt install -y build-essential
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
NODE_VERSION="22" setup_nodejs
|
||||||
|
setup_go
|
||||||
|
fetch_and_deploy_gh_release "discopanel" "nickheyer/discopanel" "tarball" "latest" "/opt/discopanel"
|
||||||
|
setup_docker
|
||||||
|
|
||||||
|
msg_info "Setting up DiscoPanel"
|
||||||
|
cd /opt/discopanel/web/discopanel
|
||||||
|
$STD npm install
|
||||||
|
$STD npm run build
|
||||||
|
cd /opt/discopanel
|
||||||
|
$STD go build -o discopanel cmd/discopanel/main.go
|
||||||
|
msg_ok "Setup DiscoPanel"
|
||||||
|
|
||||||
|
msg_info "Creating Service"
|
||||||
|
cat <<EOF >/etc/systemd/system/discopanel.service
|
||||||
|
[Unit]
|
||||||
|
Description=DiscoPanel Service
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
WorkingDirectory=/opt/discopanel
|
||||||
|
ExecStart=/opt/discopanel/discopanel
|
||||||
|
Restart=always
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
|
systemctl enable -q --now discopanel
|
||||||
|
msg_ok "Created Service"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
cleanup_lxc
|
||||||
@ -62,11 +62,13 @@ install -d -m 755 \
|
|||||||
/data/uploads/{m3us,epgs} \
|
/data/uploads/{m3us,epgs} \
|
||||||
/data/{m3us,epgs}
|
/data/{m3us,epgs}
|
||||||
chown -R root:root /data
|
chown -R root:root /data
|
||||||
|
DJANGO_SECRET=$(openssl rand -base64 48 | tr -dc 'a-zA-Z0-9' | cut -c1-50)
|
||||||
export DATABASE_URL="postgresql://${DB_USER}:${DB_PASS}@localhost:5432/${DB_NAME}"
|
export DATABASE_URL="postgresql://${DB_USER}:${DB_PASS}@localhost:5432/${DB_NAME}"
|
||||||
export POSTGRES_DB=$DB_NAME
|
export POSTGRES_DB=$DB_NAME
|
||||||
export POSTGRES_USER=$DB_USER
|
export POSTGRES_USER=$DB_USER
|
||||||
export POSTGRES_PASSWORD=$DB_PASS
|
export POSTGRES_PASSWORD=$DB_PASS
|
||||||
export POSTGRES_HOST=localhost
|
export POSTGRES_HOST=localhost
|
||||||
|
export DJANGO_SECRET_KEY=$DJANGO_SECRET
|
||||||
$STD uv run python manage.py migrate --noinput
|
$STD uv run python manage.py migrate --noinput
|
||||||
$STD uv run python manage.py collectstatic --noinput
|
$STD uv run python manage.py collectstatic --noinput
|
||||||
cat <<EOF >/opt/dispatcharr/.env
|
cat <<EOF >/opt/dispatcharr/.env
|
||||||
@ -76,6 +78,7 @@ POSTGRES_USER=$DB_USER
|
|||||||
POSTGRES_PASSWORD=$DB_PASS
|
POSTGRES_PASSWORD=$DB_PASS
|
||||||
POSTGRES_HOST=localhost
|
POSTGRES_HOST=localhost
|
||||||
CELERY_BROKER_URL=redis://localhost:6379/0
|
CELERY_BROKER_URL=redis://localhost:6379/0
|
||||||
|
DJANGO_SECRET_KEY=$DJANGO_SECRET
|
||||||
EOF
|
EOF
|
||||||
cd /opt/dispatcharr/frontend
|
cd /opt/dispatcharr/frontend
|
||||||
$STD npm install --legacy-peer-deps
|
$STD npm install --legacy-peer-deps
|
||||||
|
|||||||
40
install/dokploy-install.sh
Normal file
40
install/dokploy-install.sh
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: MickLesk (CanbiZ)
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
# Source: https://dokploy.com/
|
||||||
|
|
||||||
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
|
color
|
||||||
|
verb_ip6
|
||||||
|
catch_errors
|
||||||
|
setting_up_container
|
||||||
|
network_check
|
||||||
|
update_os
|
||||||
|
|
||||||
|
msg_info "Installing Dependencies"
|
||||||
|
$STD apt install -y \
|
||||||
|
git \
|
||||||
|
openssl \
|
||||||
|
redis
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_warn "WARNING: This script will run an external installer from a third-party source (https://dokploy.com/)."
|
||||||
|
msg_warn "The following code is NOT maintained or audited by our repository."
|
||||||
|
msg_warn "If you have any doubts or concerns, please review the installer code before proceeding:"
|
||||||
|
msg_custom "${TAB3}${GATEWAY}${BGN}${CL}" "\e[1;34m" "→ https://dokploy.com/install.sh"
|
||||||
|
echo
|
||||||
|
read -r -p "${TAB3}Do you want to continue? [y/N]: " CONFIRM
|
||||||
|
if [[ ! "$CONFIRM" =~ ^([yY][eE][sS]|[yY])$ ]]; then
|
||||||
|
msg_error "Aborted by user. No changes have been made."
|
||||||
|
exit 10
|
||||||
|
fi
|
||||||
|
|
||||||
|
msg_info "Installing Dokploy (Patience - this installs Docker and pulls containers)"
|
||||||
|
$STD bash <(curl -sSL https://dokploy.com/install.sh)
|
||||||
|
msg_ok "Installed Dokploy"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
cleanup_lxc
|
||||||
@ -64,7 +64,7 @@ Restart=always
|
|||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
systemctl start --now -q domain-locker
|
systemctl enable -q --now domain-locker
|
||||||
msg_info "Created Service"
|
msg_info "Created Service"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
|
|||||||
@ -16,7 +16,7 @@ update_os
|
|||||||
msg_info "Setting up InfluxDB Repository"
|
msg_info "Setting up InfluxDB Repository"
|
||||||
setup_deb822_repo \
|
setup_deb822_repo \
|
||||||
"influxdata" \
|
"influxdata" \
|
||||||
"https://repos.influxdata.com/influxdata-archive_compat.key" \
|
"https://repos.influxdata.com/influxdata-archive.key" \
|
||||||
"https://repos.influxdata.com/$(get_os_info id)" \
|
"https://repos.influxdata.com/$(get_os_info id)" \
|
||||||
"stable"
|
"stable"
|
||||||
msg_ok "Set up InfluxDB Repository"
|
msg_ok "Set up InfluxDB Repository"
|
||||||
@ -38,6 +38,7 @@ else
|
|||||||
$STD dpkg -i chronograf_1.10.8_amd64.deb
|
$STD dpkg -i chronograf_1.10.8_amd64.deb
|
||||||
rm -rf /chronograf_1.10.8_amd64.deb
|
rm -rf /chronograf_1.10.8_amd64.deb
|
||||||
fi
|
fi
|
||||||
|
rm /etc/apt/sources.list.d/influxdata.list
|
||||||
$STD systemctl enable --now influxdb
|
$STD systemctl enable --now influxdb
|
||||||
msg_ok "Installed InfluxDB"
|
msg_ok "Installed InfluxDB"
|
||||||
|
|
||||||
|
|||||||
@ -13,23 +13,27 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
|
||||||
temp_file=$(mktemp)
|
|
||||||
curl -fsSL "http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb" -o "$temp_file"
|
|
||||||
$STD dpkg -i $temp_file
|
|
||||||
rm -f $temp_file
|
|
||||||
msg_ok "Installed Dependencies"
|
|
||||||
|
|
||||||
msg_info "Setting up InvenTree Repository"
|
msg_info "Setting up InvenTree Repository"
|
||||||
mkdir -p /etc/apt/keyrings
|
setup_deb822_repo \
|
||||||
curl -fsSL https://dl.packager.io/srv/inventree/InvenTree/key | gpg --dearmor -o /etc/apt/keyrings/inventree.gpg
|
"inventree" \
|
||||||
echo "deb [signed-by=/etc/apt/keyrings/inventree.gpg] https://dl.packager.io/srv/deb/inventree/InvenTree/stable/ubuntu 20.04 main" >/etc/apt/sources.list.d/inventree.list
|
"https://dl.packager.io/srv/inventree/InvenTree/key" \
|
||||||
|
"https://dl.packager.io/srv/deb/inventree/InvenTree/stable/$(get_os_info id)" \
|
||||||
|
"$(get_os_info version)" \
|
||||||
|
"main"
|
||||||
msg_ok "Set up InvenTree Repository"
|
msg_ok "Set up InvenTree Repository"
|
||||||
|
|
||||||
msg_info "Setup ${APPLICATION} (Patience)"
|
msg_info "Installing InvenTree (Patience)"
|
||||||
$STD apt-get update
|
export SETUP_NO_CALLS=true
|
||||||
$STD apt-get install -y inventree
|
$STD apt install -y inventree
|
||||||
msg_ok "Setup ${APPLICATION}"
|
msg_ok "Installed InvenTree"
|
||||||
|
|
||||||
|
msg_info "Configuring InvenTree"
|
||||||
|
LOCAL_IP="$(hostname -I | awk '{print $1}')"
|
||||||
|
if [[ -f /etc/inventree/config.yaml ]]; then
|
||||||
|
sed -i "s|site_url:.*|site_url: http://${LOCAL_IP}|" /etc/inventree/config.yaml
|
||||||
|
fi
|
||||||
|
$STD inventree run invoke update
|
||||||
|
msg_ok "Configured InvenTree"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|||||||
@ -32,28 +32,10 @@ msg_ok "Installed Dependencies"
|
|||||||
|
|
||||||
NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs
|
NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs
|
||||||
fetch_and_deploy_gh_release "tandoor" "TandoorRecipes/recipes" "tarball" "latest" "/opt/tandoor"
|
fetch_and_deploy_gh_release "tandoor" "TandoorRecipes/recipes" "tarball" "latest" "/opt/tandoor"
|
||||||
PG_VERSION="17" PG_MODULES="contrib" setup_postgresql
|
PG_VERSION="17" setup_postgresql
|
||||||
PYTHON_VERSION="3.13" setup_uv
|
PYTHON_VERSION="3.13" setup_uv
|
||||||
|
PG_DB_USER="tandoor" PG_DB_NAME="db_recipes" PG_DB_EXTENSIONS="unaccent,pg_trgm" setup_postgresql_db
|
||||||
msg_info "Set up PostgreSQL Database"
|
|
||||||
DB_NAME=db_recipes
|
|
||||||
DB_USER=tandoor
|
|
||||||
SECRET_KEY=$(openssl rand -base64 45 | sed 's/\//\\\//g')
|
SECRET_KEY=$(openssl rand -base64 45 | sed 's/\//\\\//g')
|
||||||
DB_PASS="$(openssl rand -base64 18 | cut -c1-13)"
|
|
||||||
$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 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'"
|
|
||||||
$STD sudo -u postgres psql -d "$DB_NAME" -c "CREATE EXTENSION IF NOT EXISTS unaccent;"
|
|
||||||
$STD sudo -u postgres psql -d "$DB_NAME" -c "CREATE EXTENSION IF NOT EXISTS pg_trgm;"
|
|
||||||
{
|
|
||||||
echo "Tandoor-Credentials"
|
|
||||||
echo "Tandoor Database Name: $DB_NAME"
|
|
||||||
echo "Tandoor Database User: $DB_USER"
|
|
||||||
echo "Tandoor Database Password: $DB_PASS"
|
|
||||||
} >>~/tandoor.creds
|
|
||||||
msg_ok "Set up PostgreSQL Database"
|
|
||||||
|
|
||||||
msg_info "Setup Tandoor"
|
msg_info "Setup Tandoor"
|
||||||
mkdir -p /opt/tandoor/{config,api,mediafiles,staticfiles}
|
mkdir -p /opt/tandoor/{config,api,mediafiles,staticfiles}
|
||||||
@ -69,16 +51,16 @@ TZ=Europe/Berlin
|
|||||||
|
|
||||||
DB_ENGINE=django.db.backends.postgresql
|
DB_ENGINE=django.db.backends.postgresql
|
||||||
POSTGRES_HOST=localhost
|
POSTGRES_HOST=localhost
|
||||||
POSTGRES_DB=$DB_NAME
|
POSTGRES_DB=$PG_DB_NAME
|
||||||
POSTGRES_PORT=5432
|
POSTGRES_PORT=5432
|
||||||
POSTGRES_USER=$DB_USER
|
POSTGRES_USER=$PG_DB_USER
|
||||||
POSTGRES_PASSWORD=$DB_PASS
|
POSTGRES_PASSWORD=$PG_DB_PASS
|
||||||
|
|
||||||
STATIC_URL=/staticfiles/
|
STATIC_URL=/staticfiles/
|
||||||
MEDIA_URL=/media/
|
MEDIA_URL=/media/
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
TANDOOR_VERSION="$(curl -s https://api.github.com/repos/TandoorRecipes/recipes/releases/latest | jq -r .tag_name)"
|
TANDOOR_VERSION=$(get_latest_github_release "TandoorRecipes/recipes")
|
||||||
cat <<EOF >/opt/tandoor/cookbook/version_info.py
|
cat <<EOF >/opt/tandoor/cookbook/version_info.py
|
||||||
TANDOOR_VERSION = "$TANDOOR_VERSION"
|
TANDOOR_VERSION = "$TANDOOR_VERSION"
|
||||||
TANDOOR_REF = "bare-metal"
|
TANDOOR_REF = "bare-metal"
|
||||||
|
|||||||
@ -21,7 +21,6 @@ cd /opt/tracktor
|
|||||||
$STD npm install
|
$STD npm install
|
||||||
$STD npm run build
|
$STD npm run build
|
||||||
mkdir -p /opt/tracktor-data/{uploads,logs}
|
mkdir -p /opt/tracktor-data/{uploads,logs}
|
||||||
HOST_IP=$(hostname -I | awk '{print $1}')
|
|
||||||
cat <<EOF >/opt/tracktor.env
|
cat <<EOF >/opt/tracktor.env
|
||||||
NODE_ENV=production
|
NODE_ENV=production
|
||||||
DB_PATH=/opt/tracktor-data/tracktor.db
|
DB_PATH=/opt/tracktor-data/tracktor.db
|
||||||
|
|||||||
@ -52,7 +52,7 @@ cat <<EOF >/opt/wanderer/start.sh
|
|||||||
|
|
||||||
trap "kill 0" EXIT
|
trap "kill 0" EXIT
|
||||||
|
|
||||||
cd /opt/wanderer/source/search && meilisearch --master-key \$MEILI_MASTER_KEY &
|
cd /opt/wanderer/source/search && meilisearch --experimental-dumpless-upgrade --master-key \$MEILI_MASTER_KEY &
|
||||||
sleep 1
|
sleep 1
|
||||||
cd /opt/wanderer/source/db && ./pocketbase serve --http=\$PB_URL --dir=\$PB_DB_LOCATION &
|
cd /opt/wanderer/source/db && ./pocketbase serve --http=\$PB_URL --dir=\$PB_DB_LOCATION &
|
||||||
cd /opt/wanderer/source/web && node build &
|
cd /opt/wanderer/source/web && node build &
|
||||||
|
|||||||
@ -14,36 +14,18 @@ network_check
|
|||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt install -y \
|
$STD apt install -y git
|
||||||
git
|
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
NODE_VERSION="22" NODE_MODULE="yarn,node-gyp" setup_nodejs
|
NODE_VERSION="22" NODE_MODULE="yarn,node-gyp" setup_nodejs
|
||||||
PG_VERSION="17" setup_postgresql
|
PG_VERSION="17" setup_postgresql
|
||||||
|
PG_DB_NAME="wiki" PG_DB_USER="wikijs_user" PG_DB_EXTENSIONS="pg_trgm" setup_postgresql_db
|
||||||
fetch_and_deploy_gh_release "wikijs" "requarks/wiki" "prebuild" "latest" "/opt/wikijs" "wiki-js.tar.gz"
|
fetch_and_deploy_gh_release "wikijs" "requarks/wiki" "prebuild" "latest" "/opt/wikijs" "wiki-js.tar.gz"
|
||||||
|
|
||||||
msg_info "Set up PostgreSQL"
|
|
||||||
DB_NAME="wiki"
|
|
||||||
DB_USER="wikijs_user"
|
|
||||||
DB_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)"
|
|
||||||
$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 "CREATE EXTENSION IF NOT EXISTS pg_trgm;" $DB_NAME
|
|
||||||
$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 "WikiJS-Credentials"
|
|
||||||
echo "WikiJS Database User: $DB_USER"
|
|
||||||
echo "WikiJS Database Password: $DB_PASS"
|
|
||||||
echo "WikiJS Database Name: $DB_NAME"
|
|
||||||
} >>~/wikijs.creds
|
|
||||||
msg_ok "Set up PostgreSQL"
|
|
||||||
|
|
||||||
msg_info "Configuring Wiki.js"
|
msg_info "Configuring Wiki.js"
|
||||||
mv /opt/wikijs/config.sample.yml /opt/wikijs/config.yml
|
mv /opt/wikijs/config.sample.yml /opt/wikijs/config.yml
|
||||||
sed -i -E 's|^( *user: ).*|\1'"$DB_USER"'|' /opt/wikijs/config.yml
|
sed -i -E 's|^( *user: ).*|\1'"$PG_DB_USER"'|' /opt/wikijs/config.yml
|
||||||
sed -i -E 's|^( *pass: ).*|\1'"$DB_PASS"'|' /opt/wikijs/config.yml
|
sed -i -E 's|^( *pass: ).*|\1'"$PG_DB_PASS"'|' /opt/wikijs/config.yml
|
||||||
msg_ok "Configured Wiki.js"
|
msg_ok "Configured Wiki.js"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
|
|||||||
@ -19,25 +19,23 @@ msg_ok "Installed Dependencies"
|
|||||||
|
|
||||||
setup_uv
|
setup_uv
|
||||||
NODE_VERSION="22" setup_nodejs
|
NODE_VERSION="22" setup_nodejs
|
||||||
fetch_and_deploy_gh_release "wizarr" "wizarrrr/wizarr"
|
fetch_and_deploy_gh_release "wizarr" "wizarrrr/wizarr" "tarball"
|
||||||
|
import_local_ip
|
||||||
|
|
||||||
msg_info "Configure Wizarr"
|
msg_info "Configure Wizarr"
|
||||||
cd /opt/wizarr || exit
|
cd /opt/wizarr
|
||||||
$STD /usr/local/bin/uv sync --frozen
|
$STD /usr/local/bin/uv sync --frozen
|
||||||
$STD /usr/local/bin/uv run --frozen pybabel compile -d app/translations
|
$STD /usr/local/bin/uv run --frozen pybabel compile -d app/translations
|
||||||
$STD npm --prefix app/static install
|
$STD npm --prefix app/static install
|
||||||
$STD npm --prefix app/static run build:css
|
$STD npm --prefix app/static run build:css
|
||||||
mkdir -p ./.cache
|
mkdir -p ./.cache
|
||||||
|
|
||||||
LOCAL_IP="$(hostname -I | awk '{print $1}')"
|
|
||||||
VERSION="$(sed 's/^20/v&/' ~/.wizarr)"
|
|
||||||
cat <<EOF >/opt/wizarr/.env
|
cat <<EOF >/opt/wizarr/.env
|
||||||
FLASK_ENV=production
|
FLASK_ENV=production
|
||||||
GUNICORN_WORKERS=4
|
GUNICORN_WORKERS=4
|
||||||
APP_URL=http://${LOCAL_IP}
|
APP_URL=http://${LOCAL_IP}
|
||||||
DISABLE_BUILTIN_AUTH=false
|
DISABLE_BUILTIN_AUTH=false
|
||||||
LOG_LEVEL=INFO
|
LOG_LEVEL=INFO
|
||||||
APP_VERSION=${VERSION}
|
APP_VERSION=v$(get_latest_github_release "wizarrrr/wizarr")
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat <<EOF >/opt/wizarr/start.sh
|
cat <<EOF >/opt/wizarr/start.sh
|
||||||
|
|||||||
@ -15,34 +15,20 @@ update_os
|
|||||||
|
|
||||||
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="common,snmp,imap,mysql" PHP_APACHE="YES" setup_php
|
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="common,snmp,imap,mysql" PHP_APACHE="YES" setup_php
|
||||||
setup_mariadb
|
setup_mariadb
|
||||||
|
MARIADB_DB_NAME="wordpress_db" MARIADB_DB_USER="wordpress" setup_mariadb_db
|
||||||
msg_info "Setting up Database"
|
|
||||||
DB_NAME=wordpress_db
|
|
||||||
DB_USER=wordpress
|
|
||||||
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 PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
|
||||||
{
|
|
||||||
echo "WordPress Credentials"
|
|
||||||
echo "Database User: $DB_USER"
|
|
||||||
echo "Database Password: $DB_PASS"
|
|
||||||
echo "Database Name: $DB_NAME"
|
|
||||||
} >>~/wordpress.creds
|
|
||||||
msg_ok "Set up Database"
|
|
||||||
|
|
||||||
msg_info "Installing Wordpress (Patience)"
|
msg_info "Installing Wordpress (Patience)"
|
||||||
cd /var/www/html || exit
|
cd /var/www/html
|
||||||
curl -fsSL "https://wordpress.org/latest.zip" -o "latest.zip"
|
curl -fsSL "https://wordpress.org/latest.zip" -o "latest.zip"
|
||||||
$STD unzip latest.zip
|
$STD unzip latest.zip
|
||||||
chown -R www-data:www-data wordpress/
|
chown -R www-data:www-data wordpress/
|
||||||
cd /var/www/html/wordpress || exit
|
cd /var/www/html/wordpress
|
||||||
find . -type d -exec chmod 755 {} \;
|
find . -type d -exec chmod 755 {} \;
|
||||||
find . -type f -exec chmod 644 {} \;
|
find . -type f -exec chmod 644 {} \;
|
||||||
mv wp-config-sample.php wp-config.php
|
mv wp-config-sample.php wp-config.php
|
||||||
sed -i -e "s|^define( 'DB_NAME', '.*' );|define( 'DB_NAME', '$DB_NAME' );|" \
|
sed -i -e "s|^define( 'DB_NAME', '.*' );|define( 'DB_NAME', '$MARIADB_DB_NAME' );|" \
|
||||||
-e "s|^define( 'DB_USER', '.*' );|define( 'DB_USER', '$DB_USER' );|" \
|
-e "s|^define( 'DB_USER', '.*' );|define( 'DB_USER', '$MARIADB_DB_USER' );|" \
|
||||||
-e "s|^define( 'DB_PASSWORD', '.*' );|define( 'DB_PASSWORD', '$DB_PASS' );|" \
|
-e "s|^define( 'DB_PASSWORD', '.*' );|define( 'DB_PASSWORD', '$MARIADB_DB_PASS' );|" \
|
||||||
/var/www/html/wordpress/wp-config.php
|
/var/www/html/wordpress/wp-config.php
|
||||||
rm -rf /var/www/html/latest.zip
|
rm -rf /var/www/html/latest.zip
|
||||||
msg_ok "Installed Wordpress"
|
msg_ok "Installed Wordpress"
|
||||||
|
|||||||
@ -14,6 +14,7 @@ network_check
|
|||||||
update_os
|
update_os
|
||||||
|
|
||||||
PG_VERSION="17" setup_postgresql
|
PG_VERSION="17" setup_postgresql
|
||||||
|
PG_DB_NAME="zabbixdb" PG_DB_USER="zabbix" setup_postgresql_db
|
||||||
|
|
||||||
read -rp "Choose Zabbix version [1] 7.0 LTS [2] 7.4 (Latest Stable) [3] Latest available (default: 2): " ZABBIX_CHOICE
|
read -rp "Choose Zabbix version [1] 7.0 LTS [2] 7.4 (Latest Stable) [3] Latest available (default: 2): " ZABBIX_CHOICE
|
||||||
ZABBIX_CHOICE=${ZABBIX_CHOICE:-2}
|
ZABBIX_CHOICE=${ZABBIX_CHOICE:-2}
|
||||||
@ -35,6 +36,10 @@ curl -fsSL "$ZABBIX_DEB_URL" -o /tmp/zabbix-release_latest+debian13_all.deb
|
|||||||
$STD dpkg -i /tmp/zabbix-release_latest+debian13_all.deb
|
$STD dpkg -i /tmp/zabbix-release_latest+debian13_all.deb
|
||||||
$STD apt update
|
$STD apt update
|
||||||
$STD apt install -y zabbix-server-pgsql zabbix-frontend-php php8.4-pgsql zabbix-apache-conf zabbix-sql-scripts
|
$STD apt install -y zabbix-server-pgsql zabbix-frontend-php php8.4-pgsql zabbix-apache-conf zabbix-sql-scripts
|
||||||
|
zcat /usr/share/zabbix/sql-scripts/postgresql/server.sql.gz | sudo -u "$PG_DB_USER" psql "$PG_DB_NAME" &>/dev/null
|
||||||
|
sed -i "s/^DBName=.*/DBName=$PG_DB_NAME/" /etc/zabbix/zabbix_server.conf
|
||||||
|
sed -i "s/^DBUser=.*/DBUser=$PG_DB_USER/" /etc/zabbix/zabbix_server.conf
|
||||||
|
sed -i "s/^# DBPassword=.*/DBPassword=$PG_DB_PASS/" /etc/zabbix/zabbix_server.conf
|
||||||
msg_ok "Installed Zabbix $ZABBIX_VERSION"
|
msg_ok "Installed Zabbix $ZABBIX_VERSION"
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
@ -78,28 +83,6 @@ else
|
|||||||
$STD apt install -y zabbix-agent
|
$STD apt install -y zabbix-agent
|
||||||
fi
|
fi
|
||||||
|
|
||||||
msg_info "Setting up PostgreSQL"
|
|
||||||
DB_NAME=zabbixdb
|
|
||||||
DB_USER=zabbix
|
|
||||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
|
|
||||||
$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 "Zabbix-Credentials"
|
|
||||||
echo "Zabbix Database User: $DB_USER"
|
|
||||||
echo "Zabbix Database Password: $DB_PASS"
|
|
||||||
echo "Zabbix Database Name: $DB_NAME"
|
|
||||||
} >>~/zabbix.creds
|
|
||||||
|
|
||||||
zcat /usr/share/zabbix/sql-scripts/postgresql/server.sql.gz | sudo -u $DB_USER psql $DB_NAME &>/dev/null
|
|
||||||
sed -i "s/^DBName=.*/DBName=$DB_NAME/" /etc/zabbix/zabbix_server.conf
|
|
||||||
sed -i "s/^DBUser=.*/DBUser=$DB_USER/" /etc/zabbix/zabbix_server.conf
|
|
||||||
sed -i "s/^# DBPassword=.*/DBPassword=$DB_PASS/" /etc/zabbix/zabbix_server.conf
|
|
||||||
msg_ok "Set up PostgreSQL"
|
|
||||||
|
|
||||||
msg_info "Configuring Fping"
|
msg_info "Configuring Fping"
|
||||||
if command -v fping >/dev/null 2>&1; then
|
if command -v fping >/dev/null 2>&1; then
|
||||||
FPING_PATH=$(command -v fping)
|
FPING_PATH=$(command -v fping)
|
||||||
|
|||||||
@ -20,17 +20,16 @@ $STD apt install -y \
|
|||||||
apt-transport-https
|
apt-transport-https
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
import_local_ip
|
||||||
|
|
||||||
msg_info "Setting up Elasticsearch"
|
msg_info "Setting up Elasticsearch"
|
||||||
curl -fsSL https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg
|
setup_deb822_repo \
|
||||||
cat <<EOF | sudo tee /etc/apt/sources.list.d/elasticsearch.sources >/dev/null
|
"elasticsearch" \
|
||||||
Types: deb
|
"https://artifacts.elastic.co/GPG-KEY-elasticsearch" \
|
||||||
URIs: https://artifacts.elastic.co/packages/7.x/apt
|
"https://artifacts.elastic.co/packages/7.x/apt" \
|
||||||
Suites: stable
|
"stable" \
|
||||||
Components: main
|
"main"
|
||||||
Signed-By: /usr/share/keyrings/elasticsearch-keyring.gpg
|
$STD apt install -y elasticsearch
|
||||||
EOF
|
|
||||||
$STD apt update
|
|
||||||
$STD apt -y install elasticsearch
|
|
||||||
echo "-Xms2g" >>/etc/elasticsearch/jvm.options
|
echo "-Xms2g" >>/etc/elasticsearch/jvm.options
|
||||||
echo "-Xmx2g" >>/etc/elasticsearch/jvm.options
|
echo "-Xmx2g" >>/etc/elasticsearch/jvm.options
|
||||||
$STD /usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment -b
|
$STD /usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment -b
|
||||||
@ -39,24 +38,20 @@ systemctl restart -q elasticsearch
|
|||||||
msg_ok "Setup Elasticsearch"
|
msg_ok "Setup Elasticsearch"
|
||||||
|
|
||||||
msg_info "Installing Zammad"
|
msg_info "Installing Zammad"
|
||||||
curl -fsSL https://dl.packager.io/srv/zammad/zammad/key | gpg --dearmor | sudo tee /etc/apt/keyrings/pkgr-zammad.gpg >/dev/null
|
setup_deb822_repo \
|
||||||
cat <<EOF | sudo tee /etc/apt/sources.list.d/zammad.sources >/dev/null
|
"zammad" \
|
||||||
Types: deb
|
"https://dl.packager.io/srv/zammad/zammad/key" \
|
||||||
URIs: https://dl.packager.io/srv/deb/zammad/zammad/stable/debian
|
"https://dl.packager.io/srv/deb/zammad/zammad/stable/debian" \
|
||||||
Suites: 12
|
"$(get_os_info version_id)" \
|
||||||
Components: main
|
"main"
|
||||||
Signed-By: /etc/apt/keyrings/pkgr-zammad.gpg
|
$STD apt install -y zammad
|
||||||
EOF
|
|
||||||
$STD apt update
|
|
||||||
$STD apt -y install zammad
|
|
||||||
$STD zammad run rails r "Setting.set('es_url', 'http://localhost:9200')"
|
$STD zammad run rails r "Setting.set('es_url', 'http://localhost:9200')"
|
||||||
$STD zammad run rake zammad:searchindex:rebuild
|
$STD zammad run rake zammad:searchindex:rebuild
|
||||||
msg_ok "Installed Zammad"
|
msg_ok "Installed Zammad"
|
||||||
|
|
||||||
msg_info "Setup Services"
|
msg_info "Setup Services"
|
||||||
cp /opt/zammad/contrib/nginx/zammad.conf /etc/nginx/sites-available/zammad.conf
|
cp /opt/zammad/contrib/nginx/zammad.conf /etc/nginx/sites-available/zammad.conf
|
||||||
IPADDRESS=$(hostname -I | awk '{print $1}')
|
sed -i "s/server_name localhost;/server_name $LOCAL_IP;/g" /etc/nginx/sites-available/zammad.conf
|
||||||
sed -i "s/server_name localhost;/server_name $IPADDRESS;/g" /etc/nginx/sites-available/zammad.conf
|
|
||||||
$STD systemctl reload nginx
|
$STD systemctl reload nginx
|
||||||
msg_ok "Created Service"
|
msg_ok "Created Service"
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
#Copyright (c) 2021-2025 community-scripts ORG
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
# Author: tremor021
|
# Author: tremor021
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Source: https://www.zerotier.com/
|
# Source: https://www.zerotier.com/
|
||||||
@ -13,6 +13,17 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
|
msg_warn "WARNING: This script will run an external installer from a third-party source (https://install.zerotier.com)."
|
||||||
|
msg_warn "The following code is NOT maintained or audited by our repository."
|
||||||
|
msg_warn "If you have any doubts or concerns, please review the installer code before proceeding:"
|
||||||
|
msg_custom "${TAB3}${GATEWAY}${BGN}${CL}" "\e[1;34m" "→ https://install.zerotier.com"
|
||||||
|
echo
|
||||||
|
read -r -p "${TAB3}Do you want to continue? [y/N]: " CONFIRM
|
||||||
|
if [[ ! $CONFIRM =~ ^([yY][eE][sS]|[yY])$ ]]; then
|
||||||
|
msg_error "Aborted by user. No changes have been made."
|
||||||
|
exit 10
|
||||||
|
fi
|
||||||
|
|
||||||
msg_info "Setting up Zerotier-One"
|
msg_info "Setting up Zerotier-One"
|
||||||
curl -fsSL https://raw.githubusercontent.com/zerotier/ZeroTierOne/main/doc/contact%40zerotier.com.gpg | gpg --import >/dev/null 2>&1
|
curl -fsSL https://raw.githubusercontent.com/zerotier/ZeroTierOne/main/doc/contact%40zerotier.com.gpg | gpg --import >/dev/null 2>&1
|
||||||
curl -fsSL https://install.zerotier.com -o /tmp/zerotier-install.sh
|
curl -fsSL https://install.zerotier.com -o /tmp/zerotier-install.sh
|
||||||
@ -33,7 +44,7 @@ echo NODE_ENV=production >>/opt/key-networks/ztncui/.env
|
|||||||
chmod 400 /opt/key-networks/ztncui/.env
|
chmod 400 /opt/key-networks/ztncui/.env
|
||||||
chown ztncui:ztncui /opt/key-networks/ztncui/.env
|
chown ztncui:ztncui /opt/key-networks/ztncui/.env
|
||||||
systemctl restart ztncui
|
systemctl restart ztncui
|
||||||
msg_ok "Done setting up UI."
|
msg_ok "Setup UI."
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|||||||
@ -16,31 +16,26 @@ update_os
|
|||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt install -y \
|
$STD apt install -y \
|
||||||
git \
|
git \
|
||||||
make \
|
build-essential
|
||||||
g++ \
|
|
||||||
gcc \
|
|
||||||
ca-certificates \
|
|
||||||
jq
|
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
NODE_VERSION="24" NODE_MODULE="pnpm@$(curl -fsSL https://raw.githubusercontent.com/Koenkk/zigbee2mqtt/master/package.json | jq -r '.packageManager | split("@")[1]')" setup_nodejs
|
NODE_VERSION="24" NODE_MODULE="pnpm@$(curl -fsSL https://raw.githubusercontent.com/Koenkk/zigbee2mqtt/master/package.json | jq -r '.packageManager | split("@")[1]')" setup_nodejs
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "Zigbee2MQTT" "Koenkk/zigbee2mqtt" "tarball" "latest" "/opt/zigbee2mqtt"
|
fetch_and_deploy_gh_release "Zigbee2MQTT" "Koenkk/zigbee2mqtt" "tarball" "latest" "/opt/zigbee2mqtt"
|
||||||
|
|
||||||
msg_info "Setting up Zigbee2MQTT"
|
msg_info "Setting up Zigbee2MQTT"
|
||||||
cd /opt/zigbee2mqtt/data || exit
|
mv /opt/zigbee2mqtt/data/configuration.example.yaml /opt/zigbee2mqtt/data/configuration.yaml
|
||||||
mv configuration.example.yaml configuration.yaml
|
cd /opt/zigbee2mqtt
|
||||||
cd /opt/zigbee2mqtt || exit
|
|
||||||
echo "packageImportMethod: hardlink" >>./pnpm-workspace.yaml
|
echo "packageImportMethod: hardlink" >>./pnpm-workspace.yaml
|
||||||
$STD pnpm install --no-frozen-lockfile
|
$STD pnpm install --no-frozen-lockfile
|
||||||
$STD pnpm build
|
$STD pnpm build
|
||||||
msg_ok "Installed Zigbee2MQTT"
|
msg_ok "Setup Zigbee2MQTT"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
cat <<EOF >/etc/systemd/system/zigbee2mqtt.service
|
cat <<EOF >/etc/systemd/system/zigbee2mqtt.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=zigbee2mqtt
|
Description=zigbee2mqtt
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Environment=NODE_ENV=production
|
Environment=NODE_ENV=production
|
||||||
ExecStart=/usr/bin/pnpm start
|
ExecStart=/usr/bin/pnpm start
|
||||||
@ -49,6 +44,7 @@ StandardOutput=inherit
|
|||||||
StandardError=inherit
|
StandardError=inherit
|
||||||
Restart=always
|
Restart=always
|
||||||
User=root
|
User=root
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
@ -16,31 +16,15 @@ update_os
|
|||||||
|
|
||||||
NODE_VERSION="22" NODE_MODULE="pnpm" setup_nodejs
|
NODE_VERSION="22" NODE_MODULE="pnpm" setup_nodejs
|
||||||
PG_VERSION="17" setup_postgresql
|
PG_VERSION="17" setup_postgresql
|
||||||
|
PG_DB_NAME="ziplinedb" PG_DB_USER="zipline" setup_postgresql_db
|
||||||
fetch_and_deploy_gh_release "zipline" "diced/zipline" "tarball"
|
fetch_and_deploy_gh_release "zipline" "diced/zipline" "tarball"
|
||||||
|
|
||||||
msg_info "Setting up PostgreSQL"
|
|
||||||
DB_NAME=ziplinedb
|
|
||||||
DB_USER=zipline
|
|
||||||
DB_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)"
|
|
||||||
SECRET_KEY="$(openssl rand -base64 42 | tr -dc 'a-zA-Z0-9')"
|
SECRET_KEY="$(openssl rand -base64 42 | tr -dc 'a-zA-Z0-9')"
|
||||||
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
|
echo "Zipline Secret Key: ${SECRET_KEY}" >>~/zipline.creds
|
||||||
$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 "Zipline-Credentials"
|
|
||||||
echo "Zipline Database User: $DB_USER"
|
|
||||||
echo "Zipline Database Password: $DB_PASS"
|
|
||||||
echo "Zipline Database Name: $DB_NAME"
|
|
||||||
echo "Zipline Secret Key: $SECRET_KEY"
|
|
||||||
} >>~/zipline.creds
|
|
||||||
msg_ok "Set up PostgreSQL"
|
|
||||||
|
|
||||||
msg_info "Installing Zipline (Patience)"
|
msg_info "Installing Zipline (Patience)"
|
||||||
cd /opt/zipline || exit
|
cd /opt/zipline || exit
|
||||||
cat <<EOF >/opt/zipline/.env
|
cat <<EOF >/opt/zipline/.env
|
||||||
DATABASE_URL=postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME
|
DATABASE_URL=postgres://$PG_DB_USER:$PG_DB_PASS@localhost:5432/$PG_DB_NAME
|
||||||
CORE_SECRET=$SECRET_KEY
|
CORE_SECRET=$SECRET_KEY
|
||||||
CORE_HOSTNAME=0.0.0.0
|
CORE_HOSTNAME=0.0.0.0
|
||||||
CORE_PORT=3000
|
CORE_PORT=3000
|
||||||
|
|||||||
@ -125,22 +125,13 @@ update_os() {
|
|||||||
# This function modifies the message of the day (motd) and SSH settings
|
# This function modifies the message of the day (motd) and SSH settings
|
||||||
motd_ssh() {
|
motd_ssh() {
|
||||||
echo "export TERM='xterm-256color'" >>/root/.bashrc
|
echo "export TERM='xterm-256color'" >>/root/.bashrc
|
||||||
IP=$(ip -4 addr show eth0 | awk '/inet / {print $2}' | cut -d/ -f1 | head -n 1)
|
|
||||||
|
|
||||||
if [ -f "/etc/os-release" ]; then
|
|
||||||
OS_NAME=$(grep ^NAME /etc/os-release | cut -d= -f2 | tr -d '"')
|
|
||||||
OS_VERSION=$(grep ^VERSION_ID /etc/os-release | cut -d= -f2 | tr -d '"')
|
|
||||||
else
|
|
||||||
OS_NAME="Alpine Linux"
|
|
||||||
OS_VERSION="Unknown"
|
|
||||||
fi
|
|
||||||
|
|
||||||
PROFILE_FILE="/etc/profile.d/00_lxc-details.sh"
|
PROFILE_FILE="/etc/profile.d/00_lxc-details.sh"
|
||||||
echo "echo -e \"\"" >"$PROFILE_FILE"
|
echo "echo -e \"\"" >"$PROFILE_FILE"
|
||||||
echo -e "echo -e \"${BOLD}${APPLICATION} LXC Container${CL}"\" >>"$PROFILE_FILE"
|
echo -e "echo -e \"${BOLD}${APPLICATION} LXC Container${CL}"\" >>"$PROFILE_FILE"
|
||||||
echo -e "echo -e \"${TAB}${GATEWAY}${YW} Provided by: ${GN}community-scripts ORG ${YW}| GitHub: ${GN}https://github.com/community-scripts/ProxmoxVE${CL}\"" >>"$PROFILE_FILE"
|
echo -e "echo -e \"${TAB}${GATEWAY}${YW} Provided by: ${GN}community-scripts ORG ${YW}| GitHub: ${GN}https://github.com/community-scripts/ProxmoxVE${CL}\"" >>"$PROFILE_FILE"
|
||||||
echo "echo \"\"" >>"$PROFILE_FILE"
|
echo "echo \"\"" >>"$PROFILE_FILE"
|
||||||
echo -e "echo -e \"${TAB}${OS}${YW} OS: ${GN}${OS_NAME} - Version: ${OS_VERSION}${CL}\"" >>"$PROFILE_FILE"
|
echo -e "echo -e \"${TAB}${OS}${YW} OS: ${GN}\$(grep ^NAME /etc/os-release | cut -d= -f2 | tr -d '\"') - Version: \$(grep ^VERSION_ID /etc/os-release | cut -d= -f2 | tr -d '\"')${CL}\"" >>"$PROFILE_FILE"
|
||||||
echo -e "echo -e \"${TAB}${HOSTNAME}${YW} Hostname: ${GN}\$(hostname)${CL}\"" >>"$PROFILE_FILE"
|
echo -e "echo -e \"${TAB}${HOSTNAME}${YW} Hostname: ${GN}\$(hostname)${CL}\"" >>"$PROFILE_FILE"
|
||||||
echo -e "echo -e \"${TAB}${INFO}${YW} IP Address: ${GN}\$(ip -4 addr show eth0 | awk '/inet / {print \$2}' | cut -d/ -f1 | head -n 1)${CL}\"" >>"$PROFILE_FILE"
|
echo -e "echo -e \"${TAB}${INFO}${YW} IP Address: ${GN}\$(ip -4 addr show eth0 | awk '/inet / {print \$2}' | cut -d/ -f1 | head -n 1)${CL}\"" >>"$PROFILE_FILE"
|
||||||
|
|
||||||
|
|||||||
447
misc/build.func
447
misc/build.func
@ -453,7 +453,7 @@ load_vars_file() {
|
|||||||
|
|
||||||
# Allowed var_* keys
|
# Allowed var_* keys
|
||||||
local VAR_WHITELIST=(
|
local VAR_WHITELIST=(
|
||||||
var_apt_cacher var_apt_cacher_ip var_brg var_cpu var_disk var_fuse var_keyctl
|
var_apt_cacher var_apt_cacher_ip var_brg var_cpu var_disk var_fuse var_gpu var_keyctl
|
||||||
var_gateway var_hostname var_ipv6_method var_mac var_mknod var_mount_fs var_mtu
|
var_gateway var_hostname var_ipv6_method var_mac var_mknod var_mount_fs var_mtu
|
||||||
var_net var_nesting var_ns var_protection var_pw var_ram var_tags var_timezone var_tun var_unprivileged
|
var_net var_nesting var_ns var_protection var_pw var_ram var_tags var_timezone var_tun var_unprivileged
|
||||||
var_verbose var_vlan var_ssh var_ssh_authorized_key var_container_storage var_template_storage
|
var_verbose var_vlan var_ssh var_ssh_authorized_key var_container_storage var_template_storage
|
||||||
@ -505,7 +505,7 @@ default_var_settings() {
|
|||||||
# Allowed var_* keys (alphabetically sorted)
|
# Allowed var_* keys (alphabetically sorted)
|
||||||
# Note: Removed var_ctid (can only exist once), var_ipv6_static (static IPs are unique)
|
# Note: Removed var_ctid (can only exist once), var_ipv6_static (static IPs are unique)
|
||||||
local VAR_WHITELIST=(
|
local VAR_WHITELIST=(
|
||||||
var_apt_cacher var_apt_cacher_ip var_brg var_cpu var_disk var_fuse var_keyctl
|
var_apt_cacher var_apt_cacher_ip var_brg var_cpu var_disk var_fuse var_gpu var_keyctl
|
||||||
var_gateway var_hostname var_ipv6_method var_mac var_mknod var_mount_fs var_mtu
|
var_gateway var_hostname var_ipv6_method var_mac var_mknod var_mount_fs var_mtu
|
||||||
var_net var_nesting var_ns var_protection var_pw var_ram var_tags var_timezone var_tun var_unprivileged
|
var_net var_nesting var_ns var_protection var_pw var_ram var_tags var_timezone var_tun var_unprivileged
|
||||||
var_verbose var_vlan var_ssh var_ssh_authorized_key var_container_storage var_template_storage
|
var_verbose var_vlan var_ssh var_ssh_authorized_key var_container_storage var_template_storage
|
||||||
@ -667,7 +667,7 @@ get_app_defaults_path() {
|
|||||||
if ! declare -p VAR_WHITELIST >/dev/null 2>&1; then
|
if ! declare -p VAR_WHITELIST >/dev/null 2>&1; then
|
||||||
# Note: Removed var_ctid (can only exist once), var_ipv6_static (static IPs are unique)
|
# Note: Removed var_ctid (can only exist once), var_ipv6_static (static IPs are unique)
|
||||||
declare -ag VAR_WHITELIST=(
|
declare -ag VAR_WHITELIST=(
|
||||||
var_apt_cacher var_apt_cacher_ip var_brg var_cpu var_disk var_fuse
|
var_apt_cacher var_apt_cacher_ip var_brg var_cpu var_disk var_fuse var_gpu
|
||||||
var_gateway var_hostname var_ipv6_method var_mac var_mtu
|
var_gateway var_hostname var_ipv6_method var_mac var_mtu
|
||||||
var_net var_ns var_pw var_ram var_tags var_tun var_unprivileged
|
var_net var_ns var_pw var_ram var_tags var_tun var_unprivileged
|
||||||
var_verbose var_vlan var_ssh var_ssh_authorized_key var_container_storage var_template_storage
|
var_verbose var_vlan var_ssh var_ssh_authorized_key var_container_storage var_template_storage
|
||||||
@ -816,6 +816,7 @@ _build_current_app_vars_tmp() {
|
|||||||
_apt_cacher_ip="${APT_CACHER_IP:-}"
|
_apt_cacher_ip="${APT_CACHER_IP:-}"
|
||||||
_fuse="${ENABLE_FUSE:-no}"
|
_fuse="${ENABLE_FUSE:-no}"
|
||||||
_tun="${ENABLE_TUN:-no}"
|
_tun="${ENABLE_TUN:-no}"
|
||||||
|
_gpu="${ENABLE_GPU:-no}"
|
||||||
_nesting="${ENABLE_NESTING:-1}"
|
_nesting="${ENABLE_NESTING:-1}"
|
||||||
_keyctl="${ENABLE_KEYCTL:-0}"
|
_keyctl="${ENABLE_KEYCTL:-0}"
|
||||||
_mknod="${ENABLE_MKNOD:-0}"
|
_mknod="${ENABLE_MKNOD:-0}"
|
||||||
@ -865,6 +866,7 @@ _build_current_app_vars_tmp() {
|
|||||||
|
|
||||||
[ -n "$_fuse" ] && echo "var_fuse=$(_sanitize_value "$_fuse")"
|
[ -n "$_fuse" ] && echo "var_fuse=$(_sanitize_value "$_fuse")"
|
||||||
[ -n "$_tun" ] && echo "var_tun=$(_sanitize_value "$_tun")"
|
[ -n "$_tun" ] && echo "var_tun=$(_sanitize_value "$_tun")"
|
||||||
|
[ -n "$_gpu" ] && echo "var_gpu=$(_sanitize_value "$_gpu")"
|
||||||
[ -n "$_nesting" ] && echo "var_nesting=$(_sanitize_value "$_nesting")"
|
[ -n "$_nesting" ] && echo "var_nesting=$(_sanitize_value "$_nesting")"
|
||||||
[ -n "$_keyctl" ] && echo "var_keyctl=$(_sanitize_value "$_keyctl")"
|
[ -n "$_keyctl" ] && echo "var_keyctl=$(_sanitize_value "$_keyctl")"
|
||||||
[ -n "$_mknod" ] && echo "var_mknod=$(_sanitize_value "$_mknod")"
|
[ -n "$_mknod" ] && echo "var_mknod=$(_sanitize_value "$_mknod")"
|
||||||
@ -1011,37 +1013,49 @@ advanced_settings() {
|
|||||||
# Initialize defaults
|
# Initialize defaults
|
||||||
TAGS="community-script;${var_tags:-}"
|
TAGS="community-script;${var_tags:-}"
|
||||||
local STEP=1
|
local STEP=1
|
||||||
local MAX_STEP=19
|
local MAX_STEP=28
|
||||||
|
|
||||||
# Store values for back navigation
|
# Store values for back navigation - inherit from var_* app defaults
|
||||||
local _ct_type="${CT_TYPE:-1}"
|
local _ct_type="${var_unprivileged:-1}"
|
||||||
local _pw=""
|
local _pw=""
|
||||||
local _pw_display="Automatic Login"
|
local _pw_display="Automatic Login"
|
||||||
local _ct_id="$NEXTID"
|
local _ct_id="$NEXTID"
|
||||||
local _hostname="$NSAPP"
|
local _hostname="$NSAPP"
|
||||||
local _disk_size="$var_disk"
|
local _disk_size="${var_disk:-4}"
|
||||||
local _core_count="$var_cpu"
|
local _core_count="${var_cpu:-1}"
|
||||||
local _ram_size="$var_ram"
|
local _ram_size="${var_ram:-1024}"
|
||||||
local _bridge="vmbr0"
|
local _bridge="${var_brg:-vmbr0}"
|
||||||
local _net="dhcp"
|
local _net="${var_net:-dhcp}"
|
||||||
local _gate=""
|
local _gate="${var_gateway:-}"
|
||||||
local _ipv6_method="auto"
|
local _ipv6_method="${var_ipv6_method:-auto}"
|
||||||
local _ipv6_addr=""
|
local _ipv6_addr=""
|
||||||
local _ipv6_gate=""
|
local _ipv6_gate=""
|
||||||
local _apt_cacher_ip=""
|
local _apt_cacher="${var_apt_cacher:-no}"
|
||||||
local _mtu=""
|
local _apt_cacher_ip="${var_apt_cacher_ip:-}"
|
||||||
local _sd=""
|
local _mtu="${var_mtu:-}"
|
||||||
local _ns=""
|
local _sd="${var_searchdomain:-}"
|
||||||
local _mac=""
|
local _ns="${var_ns:-}"
|
||||||
local _vlan=""
|
local _mac="${var_mac:-}"
|
||||||
|
local _vlan="${var_vlan:-}"
|
||||||
local _tags="$TAGS"
|
local _tags="$TAGS"
|
||||||
local _enable_fuse="no"
|
local _enable_fuse="${var_fuse:-no}"
|
||||||
local _verbose="no"
|
local _enable_tun="${var_tun:-no}"
|
||||||
local _enable_keyctl="0"
|
local _enable_gpu="${var_gpu:-no}"
|
||||||
local _enable_mknod="0"
|
local _enable_nesting="${var_nesting:-1}"
|
||||||
local _mount_fs=""
|
local _verbose="${var_verbose:-no}"
|
||||||
local _protect_ct="no"
|
local _enable_keyctl="${var_keyctl:-0}"
|
||||||
local _ct_timezone=""
|
local _enable_mknod="${var_mknod:-0}"
|
||||||
|
local _mount_fs="${var_mount_fs:-}"
|
||||||
|
local _protect_ct="${var_protection:-no}"
|
||||||
|
|
||||||
|
# Detect host timezone for default (if not set via var_timezone)
|
||||||
|
local _host_timezone=""
|
||||||
|
if command -v timedatectl >/dev/null 2>&1; then
|
||||||
|
_host_timezone=$(timedatectl show --value --property=Timezone 2>/dev/null || echo "")
|
||||||
|
elif [ -f /etc/timezone ]; then
|
||||||
|
_host_timezone=$(cat /etc/timezone 2>/dev/null || echo "")
|
||||||
|
fi
|
||||||
|
local _ct_timezone="${var_timezone:-$_host_timezone}"
|
||||||
|
|
||||||
# Helper to show current progress
|
# Helper to show current progress
|
||||||
show_progress() {
|
show_progress() {
|
||||||
@ -1491,20 +1505,23 @@ advanced_settings() {
|
|||||||
# STEP 17: SSH Settings
|
# STEP 17: SSH Settings
|
||||||
# ═══════════════════════════════════════════════════════════════════════════
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
17)
|
17)
|
||||||
configure_ssh_settings
|
configure_ssh_settings "Step $STEP/$MAX_STEP"
|
||||||
# configure_ssh_settings handles its own flow, always advance
|
# configure_ssh_settings handles its own flow, always advance
|
||||||
((STEP++))
|
((STEP++))
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# ═══════════════════════════════════════════════════════════════════════════
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
# STEP 18: FUSE & Verbose Mode
|
# STEP 18: FUSE Support
|
||||||
# ═══════════════════════════════════════════════════════════════════════════
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
18)
|
18)
|
||||||
|
local fuse_default_flag="--defaultno"
|
||||||
|
[[ "$_enable_fuse" == "yes" || "$_enable_fuse" == "1" ]] && fuse_default_flag=""
|
||||||
|
|
||||||
if whiptail --backtitle "Proxmox VE Helper Scripts [Step $STEP/$MAX_STEP]" \
|
if whiptail --backtitle "Proxmox VE Helper Scripts [Step $STEP/$MAX_STEP]" \
|
||||||
--title "FUSE SUPPORT" \
|
--title "FUSE SUPPORT" \
|
||||||
--ok-button "Next" --cancel-button "Back" \
|
--ok-button "Next" --cancel-button "Back" \
|
||||||
--defaultno \
|
$fuse_default_flag \
|
||||||
--yesno "\nEnable FUSE support?\n\nRequired for: rclone, mergerfs, AppImage, etc." 12 58; then
|
--yesno "\nEnable FUSE support?\n\nRequired for: rclone, mergerfs, AppImage, etc.\n\n(App default: ${var_fuse:-no})" 14 58; then
|
||||||
_enable_fuse="yes"
|
_enable_fuse="yes"
|
||||||
else
|
else
|
||||||
if [ $? -eq 1 ]; then
|
if [ $? -eq 1 ]; then
|
||||||
@ -1514,26 +1531,255 @@ advanced_settings() {
|
|||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
((STEP++))
|
||||||
|
;;
|
||||||
|
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
|
# STEP 19: TUN/TAP Support
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
|
19)
|
||||||
|
local tun_default_flag="--defaultno"
|
||||||
|
[[ "$_enable_tun" == "yes" || "$_enable_tun" == "1" ]] && tun_default_flag=""
|
||||||
|
|
||||||
if whiptail --backtitle "Proxmox VE Helper Scripts [Step $STEP/$MAX_STEP]" \
|
if whiptail --backtitle "Proxmox VE Helper Scripts [Step $STEP/$MAX_STEP]" \
|
||||||
--title "VERBOSE MODE" \
|
--title "TUN/TAP SUPPORT" \
|
||||||
--defaultno \
|
--ok-button "Next" --cancel-button "Back" \
|
||||||
--yesno "\nEnable Verbose Mode?\n\nShows detailed output during installation." 12 58; then
|
$tun_default_flag \
|
||||||
_verbose="yes"
|
--yesno "\nEnable TUN/TAP device support?\n\nRequired for: VPN apps (WireGuard, OpenVPN, Tailscale),\nnetwork tunneling, and containerized networking.\n\n(App default: ${var_tun:-no})" 14 62; then
|
||||||
|
_enable_tun="yes"
|
||||||
else
|
else
|
||||||
_verbose="no"
|
if [ $? -eq 1 ]; then
|
||||||
|
_enable_tun="no"
|
||||||
|
else
|
||||||
|
((STEP--))
|
||||||
|
continue
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
((STEP++))
|
((STEP++))
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# ═══════════════════════════════════════════════════════════════════════════
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
# STEP 19: Confirmation
|
# STEP 20: Nesting Support
|
||||||
# ═══════════════════════════════════════════════════════════════════════════
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
19)
|
20)
|
||||||
|
local nesting_default_flag=""
|
||||||
|
[[ "$_enable_nesting" == "0" || "$_enable_nesting" == "no" ]] && nesting_default_flag="--defaultno"
|
||||||
|
|
||||||
|
if whiptail --backtitle "Proxmox VE Helper Scripts [Step $STEP/$MAX_STEP]" \
|
||||||
|
--title "NESTING SUPPORT" \
|
||||||
|
--ok-button "Next" --cancel-button "Back" \
|
||||||
|
$nesting_default_flag \
|
||||||
|
--yesno "\nEnable Nesting?\n\nRequired for: Docker, LXC inside LXC, Podman,\nand other containerization tools.\n\n(App default: ${var_nesting:-1})" 14 58; then
|
||||||
|
_enable_nesting="1"
|
||||||
|
else
|
||||||
|
if [ $? -eq 1 ]; then
|
||||||
|
_enable_nesting="0"
|
||||||
|
else
|
||||||
|
((STEP--))
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
((STEP++))
|
||||||
|
;;
|
||||||
|
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
|
# STEP 21: GPU Passthrough
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
|
21)
|
||||||
|
local gpu_default_flag="--defaultno"
|
||||||
|
[[ "$_enable_gpu" == "yes" ]] && gpu_default_flag=""
|
||||||
|
|
||||||
|
if whiptail --backtitle "Proxmox VE Helper Scripts [Step $STEP/$MAX_STEP]" \
|
||||||
|
--title "GPU PASSTHROUGH" \
|
||||||
|
--ok-button "Next" --cancel-button "Back" \
|
||||||
|
$gpu_default_flag \
|
||||||
|
--yesno "\nEnable GPU Passthrough?\n\nAutomatically detects and passes through available GPUs\n(Intel/AMD/NVIDIA) for hardware acceleration.\n\nRecommended for: Media servers, AI/ML, Transcoding\n\n(App default: ${var_gpu:-no})" 16 62; then
|
||||||
|
_enable_gpu="yes"
|
||||||
|
else
|
||||||
|
if [ $? -eq 1 ]; then
|
||||||
|
_enable_gpu="no"
|
||||||
|
else
|
||||||
|
((STEP--))
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
((STEP++))
|
||||||
|
;;
|
||||||
|
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
|
# STEP 22: Keyctl Support (Docker/systemd)
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
|
22)
|
||||||
|
local keyctl_default_flag="--defaultno"
|
||||||
|
[[ "$_enable_keyctl" == "1" ]] && keyctl_default_flag=""
|
||||||
|
|
||||||
|
if whiptail --backtitle "Proxmox VE Helper Scripts [Step $STEP/$MAX_STEP]" \
|
||||||
|
--title "KEYCTL SUPPORT" \
|
||||||
|
--ok-button "Next" --cancel-button "Back" \
|
||||||
|
$keyctl_default_flag \
|
||||||
|
--yesno "\nEnable Keyctl support?\n\nRequired for: Docker containers, systemd-networkd,\nand kernel keyring operations.\n\nNote: Automatically enabled for unprivileged containers.\n\n(App default: ${var_keyctl:-0})" 16 62; then
|
||||||
|
_enable_keyctl="1"
|
||||||
|
else
|
||||||
|
if [ $? -eq 1 ]; then
|
||||||
|
_enable_keyctl="0"
|
||||||
|
else
|
||||||
|
((STEP--))
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
((STEP++))
|
||||||
|
;;
|
||||||
|
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
|
# STEP 23: APT Cacher Proxy
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
|
23)
|
||||||
|
local apt_cacher_default_flag="--defaultno"
|
||||||
|
[[ "$_apt_cacher" == "yes" ]] && apt_cacher_default_flag=""
|
||||||
|
|
||||||
|
if whiptail --backtitle "Proxmox VE Helper Scripts [Step $STEP/$MAX_STEP]" \
|
||||||
|
--title "APT CACHER PROXY" \
|
||||||
|
--ok-button "Next" --cancel-button "Back" \
|
||||||
|
$apt_cacher_default_flag \
|
||||||
|
--yesno "\nUse APT Cacher-NG proxy?\n\nSpeeds up package downloads by caching them locally.\nRequires apt-cacher-ng running on your network.\n\n(App default: ${var_apt_cacher:-no})" 14 62; then
|
||||||
|
_apt_cacher="yes"
|
||||||
|
# Ask for IP if enabled
|
||||||
|
if result=$(whiptail --backtitle "Proxmox VE Helper Scripts [Step $STEP/$MAX_STEP]" \
|
||||||
|
--title "APT CACHER IP" \
|
||||||
|
--inputbox "\nEnter APT Cacher-NG server IP address:" 10 58 "$_apt_cacher_ip" \
|
||||||
|
3>&1 1>&2 2>&3); then
|
||||||
|
_apt_cacher_ip="$result"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ $? -eq 1 ]; then
|
||||||
|
_apt_cacher="no"
|
||||||
|
_apt_cacher_ip=""
|
||||||
|
else
|
||||||
|
((STEP--))
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
((STEP++))
|
||||||
|
;;
|
||||||
|
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
|
# STEP 24: Container Timezone
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
|
24)
|
||||||
|
local tz_hint="$_ct_timezone"
|
||||||
|
[[ -z "$tz_hint" ]] && tz_hint="(empty - will use host timezone)"
|
||||||
|
|
||||||
|
if result=$(whiptail --backtitle "Proxmox VE Helper Scripts [Step $STEP/$MAX_STEP]" \
|
||||||
|
--title "CONTAINER TIMEZONE" \
|
||||||
|
--ok-button "Next" --cancel-button "Back" \
|
||||||
|
--inputbox "\nSet container timezone.\n\nExamples: Europe/Berlin, America/New_York, Asia/Tokyo\n\nHost timezone: ${_host_timezone:-unknown}\n\nLeave empty to inherit from host." 16 62 "$_ct_timezone" \
|
||||||
|
3>&1 1>&2 2>&3); then
|
||||||
|
_ct_timezone="$result"
|
||||||
|
((STEP++))
|
||||||
|
else
|
||||||
|
((STEP--))
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
|
# STEP 25: Container Protection
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
|
25)
|
||||||
|
local protect_default_flag="--defaultno"
|
||||||
|
[[ "$_protect_ct" == "yes" || "$_protect_ct" == "1" ]] && protect_default_flag=""
|
||||||
|
|
||||||
|
if whiptail --backtitle "Proxmox VE Helper Scripts [Step $STEP/$MAX_STEP]" \
|
||||||
|
--title "CONTAINER PROTECTION" \
|
||||||
|
--ok-button "Next" --cancel-button "Back" \
|
||||||
|
$protect_default_flag \
|
||||||
|
--yesno "\nEnable Container Protection?\n\nPrevents accidental deletion of this container.\nYou must disable protection before removing.\n\n(App default: ${var_protection:-no})" 14 62; then
|
||||||
|
_protect_ct="yes"
|
||||||
|
else
|
||||||
|
if [ $? -eq 1 ]; then
|
||||||
|
_protect_ct="no"
|
||||||
|
else
|
||||||
|
((STEP--))
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
((STEP++))
|
||||||
|
;;
|
||||||
|
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
|
# STEP 26: Device Node Creation (mknod)
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
|
26)
|
||||||
|
local mknod_default_flag="--defaultno"
|
||||||
|
[[ "$_enable_mknod" == "1" ]] && mknod_default_flag=""
|
||||||
|
|
||||||
|
if whiptail --backtitle "Proxmox VE Helper Scripts [Step $STEP/$MAX_STEP]" \
|
||||||
|
--title "DEVICE NODE CREATION" \
|
||||||
|
--ok-button "Next" --cancel-button "Back" \
|
||||||
|
$mknod_default_flag \
|
||||||
|
--yesno "\nAllow device node creation (mknod)?\n\nRequired for: Creating device files inside container.\nExperimental feature (requires kernel 5.3+).\n\n(App default: ${var_mknod:-0})" 14 62; then
|
||||||
|
_enable_mknod="1"
|
||||||
|
else
|
||||||
|
if [ $? -eq 1 ]; then
|
||||||
|
_enable_mknod="0"
|
||||||
|
else
|
||||||
|
((STEP--))
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
((STEP++))
|
||||||
|
;;
|
||||||
|
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
|
# STEP 27: Mount Filesystems
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
|
27)
|
||||||
|
local mount_hint=""
|
||||||
|
[[ -n "$_mount_fs" ]] && mount_hint="$_mount_fs" || mount_hint="(none)"
|
||||||
|
|
||||||
|
if result=$(whiptail --backtitle "Proxmox VE Helper Scripts [Step $STEP/$MAX_STEP]" \
|
||||||
|
--title "MOUNT FILESYSTEMS" \
|
||||||
|
--ok-button "Next" --cancel-button "Back" \
|
||||||
|
--inputbox "\nAllow specific filesystem mounts.\n\nComma-separated list: nfs, cifs, fuse, ext4, etc.\nLeave empty for defaults (none).\n\nCurrent: $mount_hint" 14 62 "$_mount_fs" \
|
||||||
|
3>&1 1>&2 2>&3); then
|
||||||
|
_mount_fs="$result"
|
||||||
|
((STEP++))
|
||||||
|
else
|
||||||
|
((STEP--))
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
|
# STEP 28: Verbose Mode & Confirmation
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
|
28)
|
||||||
|
local verbose_default_flag="--defaultno"
|
||||||
|
[[ "$_verbose" == "yes" ]] && verbose_default_flag=""
|
||||||
|
|
||||||
|
if whiptail --backtitle "Proxmox VE Helper Scripts [Step $STEP/$MAX_STEP]" \
|
||||||
|
--title "VERBOSE MODE" \
|
||||||
|
$verbose_default_flag \
|
||||||
|
--yesno "\nEnable Verbose Mode?\n\nShows detailed output during installation." 12 58; then
|
||||||
|
_verbose="yes"
|
||||||
|
else
|
||||||
|
_verbose="no"
|
||||||
|
fi
|
||||||
# Build summary
|
# Build summary
|
||||||
local ct_type_desc="Unprivileged"
|
local ct_type_desc="Unprivileged"
|
||||||
[[ "$_ct_type" == "0" ]] && ct_type_desc="Privileged"
|
[[ "$_ct_type" == "0" ]] && ct_type_desc="Privileged"
|
||||||
|
|
||||||
|
local nesting_desc="Disabled"
|
||||||
|
[[ "$_enable_nesting" == "1" ]] && nesting_desc="Enabled"
|
||||||
|
|
||||||
|
local keyctl_desc="Disabled"
|
||||||
|
[[ "$_enable_keyctl" == "1" ]] && keyctl_desc="Enabled"
|
||||||
|
|
||||||
|
local protect_desc="No"
|
||||||
|
[[ "$_protect_ct" == "yes" || "$_protect_ct" == "1" ]] && protect_desc="Yes"
|
||||||
|
|
||||||
|
local tz_display="${_ct_timezone:-Host TZ}"
|
||||||
|
local apt_display="${_apt_cacher:-no}"
|
||||||
|
[[ "$_apt_cacher" == "yes" && -n "$_apt_cacher_ip" ]] && apt_display="$_apt_cacher_ip"
|
||||||
|
|
||||||
local summary="Container Type: $ct_type_desc
|
local summary="Container Type: $ct_type_desc
|
||||||
Container ID: $_ct_id
|
Container ID: $_ct_id
|
||||||
Hostname: $_hostname
|
Hostname: $_hostname
|
||||||
@ -1548,14 +1794,20 @@ Network:
|
|||||||
IPv4: $_net
|
IPv4: $_net
|
||||||
IPv6: $_ipv6_method
|
IPv6: $_ipv6_method
|
||||||
|
|
||||||
Options:
|
Features:
|
||||||
FUSE: $_enable_fuse
|
FUSE: $_enable_fuse | TUN: $_enable_tun
|
||||||
|
Nesting: $nesting_desc | Keyctl: $keyctl_desc
|
||||||
|
GPU: $_enable_gpu | Protection: $protect_desc
|
||||||
|
|
||||||
|
Advanced:
|
||||||
|
Timezone: $tz_display
|
||||||
|
APT Cacher: $apt_display
|
||||||
Verbose: $_verbose"
|
Verbose: $_verbose"
|
||||||
|
|
||||||
if whiptail --backtitle "Proxmox VE Helper Scripts [Step $STEP/$MAX_STEP]" \
|
if whiptail --backtitle "Proxmox VE Helper Scripts [Step $STEP/$MAX_STEP]" \
|
||||||
--title "CONFIRM SETTINGS" \
|
--title "CONFIRM SETTINGS" \
|
||||||
--ok-button "Create LXC" --cancel-button "Back" \
|
--ok-button "Create LXC" --cancel-button "Back" \
|
||||||
--yesno "$summary\n\nCreate ${APP} LXC with these settings?" 26 58; then
|
--yesno "$summary\n\nCreate ${APP} LXC with these settings?" 32 62; then
|
||||||
((STEP++))
|
((STEP++))
|
||||||
else
|
else
|
||||||
((STEP--))
|
((STEP--))
|
||||||
@ -1582,8 +1834,31 @@ Options:
|
|||||||
IPV6_GATE="$_ipv6_gate"
|
IPV6_GATE="$_ipv6_gate"
|
||||||
TAGS="$_tags"
|
TAGS="$_tags"
|
||||||
ENABLE_FUSE="$_enable_fuse"
|
ENABLE_FUSE="$_enable_fuse"
|
||||||
|
ENABLE_TUN="$_enable_tun"
|
||||||
|
ENABLE_GPU="$_enable_gpu"
|
||||||
|
ENABLE_NESTING="$_enable_nesting"
|
||||||
|
ENABLE_KEYCTL="$_enable_keyctl"
|
||||||
|
ENABLE_MKNOD="$_enable_mknod"
|
||||||
|
ALLOW_MOUNT_FS="$_mount_fs"
|
||||||
|
PROTECT_CT="$_protect_ct"
|
||||||
|
CT_TIMEZONE="$_ct_timezone"
|
||||||
|
APT_CACHER="$_apt_cacher"
|
||||||
|
APT_CACHER_IP="$_apt_cacher_ip"
|
||||||
VERBOSE="$_verbose"
|
VERBOSE="$_verbose"
|
||||||
|
|
||||||
|
# Update var_* based on user choice (for functions that check these)
|
||||||
|
var_gpu="$_enable_gpu"
|
||||||
|
var_fuse="$_enable_fuse"
|
||||||
|
var_tun="$_enable_tun"
|
||||||
|
var_nesting="$_enable_nesting"
|
||||||
|
var_keyctl="$_enable_keyctl"
|
||||||
|
var_mknod="$_enable_mknod"
|
||||||
|
var_mount_fs="$_mount_fs"
|
||||||
|
var_protection="$_protect_ct"
|
||||||
|
var_timezone="$_ct_timezone"
|
||||||
|
var_apt_cacher="$_apt_cacher"
|
||||||
|
var_apt_cacher_ip="$_apt_cacher_ip"
|
||||||
|
|
||||||
# Format optional values
|
# Format optional values
|
||||||
[[ -n "$_mtu" ]] && MTU=",mtu=$_mtu" || MTU=""
|
[[ -n "$_mtu" ]] && MTU=",mtu=$_mtu" || MTU=""
|
||||||
[[ -n "$_sd" ]] && SD="-searchdomain=$_sd" || SD=""
|
[[ -n "$_sd" ]] && SD="-searchdomain=$_sd" || SD=""
|
||||||
@ -1600,6 +1875,10 @@ Options:
|
|||||||
export UDHCPC_FIX
|
export UDHCPC_FIX
|
||||||
export SSH_KEYS_FILE
|
export SSH_KEYS_FILE
|
||||||
|
|
||||||
|
# Exit alternate screen buffer before showing summary (so output remains visible)
|
||||||
|
tput rmcup 2>/dev/null || true
|
||||||
|
trap - RETURN
|
||||||
|
|
||||||
# Display final summary
|
# Display final summary
|
||||||
echo -e "\n${INFO}${BOLD}${DGN}PVE Version ${PVEVERSION} (Kernel: ${KERNEL_VERSION})${CL}"
|
echo -e "\n${INFO}${BOLD}${DGN}PVE Version ${PVEVERSION} (Kernel: ${KERNEL_VERSION})${CL}"
|
||||||
echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}"
|
echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}"
|
||||||
@ -1614,6 +1893,13 @@ Options:
|
|||||||
echo -e "${NETWORK}${BOLD}${DGN}IPv4: ${BGN}$NET${CL}"
|
echo -e "${NETWORK}${BOLD}${DGN}IPv4: ${BGN}$NET${CL}"
|
||||||
echo -e "${NETWORK}${BOLD}${DGN}IPv6: ${BGN}$IPV6_METHOD${CL}"
|
echo -e "${NETWORK}${BOLD}${DGN}IPv6: ${BGN}$IPV6_METHOD${CL}"
|
||||||
echo -e "${FUSE}${BOLD}${DGN}FUSE Support: ${BGN}$ENABLE_FUSE${CL}"
|
echo -e "${FUSE}${BOLD}${DGN}FUSE Support: ${BGN}$ENABLE_FUSE${CL}"
|
||||||
|
[[ "$ENABLE_TUN" == "yes" ]] && echo -e "${NETWORK}${BOLD}${DGN}TUN/TAP Support: ${BGN}$ENABLE_TUN${CL}"
|
||||||
|
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Nesting: ${BGN}$([ "$ENABLE_NESTING" == "1" ] && echo "Enabled" || echo "Disabled")${CL}"
|
||||||
|
[[ "$ENABLE_KEYCTL" == "1" ]] && echo -e "${CONTAINERTYPE}${BOLD}${DGN}Keyctl: ${BGN}Enabled${CL}"
|
||||||
|
echo -e "${GPU}${BOLD}${DGN}GPU Passthrough: ${BGN}$ENABLE_GPU${CL}"
|
||||||
|
[[ "$PROTECT_CT" == "yes" || "$PROTECT_CT" == "1" ]] && echo -e "${CONTAINERTYPE}${BOLD}${DGN}Protection: ${BGN}Enabled${CL}"
|
||||||
|
[[ -n "$CT_TIMEZONE" ]] && echo -e "${INFO}${BOLD}${DGN}Timezone: ${BGN}$CT_TIMEZONE${CL}"
|
||||||
|
[[ "$APT_CACHER" == "yes" ]] && echo -e "${INFO}${BOLD}${DGN}APT Cacher: ${BGN}$APT_CACHER_IP${CL}"
|
||||||
echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}$VERBOSE${CL}"
|
echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}$VERBOSE${CL}"
|
||||||
echo -e "${CREATING}${BOLD}${RD}Creating a ${APP} LXC using the above advanced settings${CL}"
|
echo -e "${CREATING}${BOLD}${RD}Creating a ${APP} LXC using the above advanced settings${CL}"
|
||||||
}
|
}
|
||||||
@ -1736,6 +2022,9 @@ echo_default() {
|
|||||||
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}"
|
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}"
|
||||||
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}${CORE_COUNT}${CL}"
|
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}${CORE_COUNT}${CL}"
|
||||||
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}"
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}"
|
||||||
|
if [[ -n "${var_gpu:-}" && "${var_gpu}" == "yes" ]]; then
|
||||||
|
echo -e "${GPU}${BOLD}${DGN}GPU Passthrough: ${BGN}Enabled${CL}"
|
||||||
|
fi
|
||||||
if [ "$VERBOSE" == "yes" ]; then
|
if [ "$VERBOSE" == "yes" ]; then
|
||||||
echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}Enabled${CL}"
|
echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}Enabled${CL}"
|
||||||
fi
|
fi
|
||||||
@ -2076,6 +2365,10 @@ ssh_discover_default_files() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
configure_ssh_settings() {
|
configure_ssh_settings() {
|
||||||
|
local step_info="${1:-}"
|
||||||
|
local backtitle="Proxmox VE Helper Scripts"
|
||||||
|
[[ -n "$step_info" ]] && backtitle="Proxmox VE Helper Scripts [${step_info}]"
|
||||||
|
|
||||||
SSH_KEYS_FILE="$(mktemp)"
|
SSH_KEYS_FILE="$(mktemp)"
|
||||||
: >"$SSH_KEYS_FILE"
|
: >"$SSH_KEYS_FILE"
|
||||||
|
|
||||||
@ -2085,14 +2378,14 @@ configure_ssh_settings() {
|
|||||||
|
|
||||||
local ssh_key_mode
|
local ssh_key_mode
|
||||||
if [[ "$default_key_count" -gt 0 ]]; then
|
if [[ "$default_key_count" -gt 0 ]]; then
|
||||||
ssh_key_mode=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SSH KEY SOURCE" --menu \
|
ssh_key_mode=$(whiptail --backtitle "$backtitle" --title "SSH KEY SOURCE" --menu \
|
||||||
"Provision SSH keys for root:" 14 72 4 \
|
"Provision SSH keys for root:" 14 72 4 \
|
||||||
"found" "Select from detected keys (${default_key_count})" \
|
"found" "Select from detected keys (${default_key_count})" \
|
||||||
"manual" "Paste a single public key" \
|
"manual" "Paste a single public key" \
|
||||||
"folder" "Scan another folder (path or glob)" \
|
"folder" "Scan another folder (path or glob)" \
|
||||||
"none" "No keys" 3>&1 1>&2 2>&3) || exit_script
|
"none" "No keys" 3>&1 1>&2 2>&3) || exit_script
|
||||||
else
|
else
|
||||||
ssh_key_mode=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SSH KEY SOURCE" --menu \
|
ssh_key_mode=$(whiptail --backtitle "$backtitle" --title "SSH KEY SOURCE" --menu \
|
||||||
"No host keys detected; choose manual/none:" 12 72 2 \
|
"No host keys detected; choose manual/none:" 12 72 2 \
|
||||||
"manual" "Paste a single public key" \
|
"manual" "Paste a single public key" \
|
||||||
"none" "No keys" 3>&1 1>&2 2>&3) || exit_script
|
"none" "No keys" 3>&1 1>&2 2>&3) || exit_script
|
||||||
@ -2101,7 +2394,7 @@ configure_ssh_settings() {
|
|||||||
case "$ssh_key_mode" in
|
case "$ssh_key_mode" in
|
||||||
found)
|
found)
|
||||||
local selection
|
local selection
|
||||||
selection=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SELECT HOST KEYS" \
|
selection=$(whiptail --backtitle "$backtitle" --title "SELECT HOST KEYS" \
|
||||||
--checklist "Select one or more keys to import:" 20 140 10 "${CHOICES[@]}" 3>&1 1>&2 2>&3) || exit_script
|
--checklist "Select one or more keys to import:" 20 140 10 "${CHOICES[@]}" 3>&1 1>&2 2>&3) || exit_script
|
||||||
for tag in $selection; do
|
for tag in $selection; do
|
||||||
tag="${tag%\"}"
|
tag="${tag%\"}"
|
||||||
@ -2112,13 +2405,13 @@ configure_ssh_settings() {
|
|||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
manual)
|
manual)
|
||||||
SSH_AUTHORIZED_KEY="$(whiptail --backtitle "Proxmox VE Helper Scripts" \
|
SSH_AUTHORIZED_KEY="$(whiptail --backtitle "$backtitle" \
|
||||||
--inputbox "Paste one SSH public key line (ssh-ed25519/ssh-rsa/...)" 10 72 --title "SSH Public Key" 3>&1 1>&2 2>&3)"
|
--inputbox "Paste one SSH public key line (ssh-ed25519/ssh-rsa/...)" 10 72 --title "SSH Public Key" 3>&1 1>&2 2>&3)"
|
||||||
[[ -n "$SSH_AUTHORIZED_KEY" ]] && printf '%s\n' "$SSH_AUTHORIZED_KEY" >>"$SSH_KEYS_FILE"
|
[[ -n "$SSH_AUTHORIZED_KEY" ]] && printf '%s\n' "$SSH_AUTHORIZED_KEY" >>"$SSH_KEYS_FILE"
|
||||||
;;
|
;;
|
||||||
folder)
|
folder)
|
||||||
local glob_path
|
local glob_path
|
||||||
glob_path=$(whiptail --backtitle "Proxmox VE Helper Scripts" \
|
glob_path=$(whiptail --backtitle "$backtitle" \
|
||||||
--inputbox "Enter a folder or glob to scan (e.g. /root/.ssh/*.pub)" 10 72 --title "Scan Folder/Glob" 3>&1 1>&2 2>&3)
|
--inputbox "Enter a folder or glob to scan (e.g. /root/.ssh/*.pub)" 10 72 --title "Scan Folder/Glob" 3>&1 1>&2 2>&3)
|
||||||
if [[ -n "$glob_path" ]]; then
|
if [[ -n "$glob_path" ]]; then
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
@ -2128,7 +2421,7 @@ configure_ssh_settings() {
|
|||||||
ssh_build_choices_from_files "${_scan_files[@]}"
|
ssh_build_choices_from_files "${_scan_files[@]}"
|
||||||
if [[ "$COUNT" -gt 0 ]]; then
|
if [[ "$COUNT" -gt 0 ]]; then
|
||||||
local folder_selection
|
local folder_selection
|
||||||
folder_selection=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SELECT FOLDER KEYS" \
|
folder_selection=$(whiptail --backtitle "$backtitle" --title "SELECT FOLDER KEYS" \
|
||||||
--checklist "Select key(s) to import:" 20 78 10 "${CHOICES[@]}" 3>&1 1>&2 2>&3) || exit_script
|
--checklist "Select key(s) to import:" 20 78 10 "${CHOICES[@]}" 3>&1 1>&2 2>&3) || exit_script
|
||||||
for tag in $folder_selection; do
|
for tag in $folder_selection; do
|
||||||
tag="${tag%\"}"
|
tag="${tag%\"}"
|
||||||
@ -2138,10 +2431,10 @@ configure_ssh_settings() {
|
|||||||
[[ -n "$line" ]] && printf '%s\n' "$line" >>"$SSH_KEYS_FILE"
|
[[ -n "$line" ]] && printf '%s\n' "$line" >>"$SSH_KEYS_FILE"
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox "No keys found in: $glob_path" 8 60
|
whiptail --backtitle "$backtitle" --msgbox "No keys found in: $glob_path" 8 60
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox "Path/glob returned no files." 8 60
|
whiptail --backtitle "$backtitle" --msgbox "Path/glob returned no files." 8 60
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
@ -2155,12 +2448,9 @@ configure_ssh_settings() {
|
|||||||
printf '\n' >>"$SSH_KEYS_FILE"
|
printf '\n' >>"$SSH_KEYS_FILE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -s "$SSH_KEYS_FILE" || "$PW" == -password* ]]; then
|
# Always show SSH access dialog - user should be able to enable SSH even without keys
|
||||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH ACCESS" --yesno "Enable root SSH access?" 10 58); then
|
if (whiptail --backtitle "$backtitle" --defaultno --title "SSH ACCESS" --yesno "Enable root SSH access?" 10 58); then
|
||||||
SSH="yes"
|
SSH="yes"
|
||||||
else
|
|
||||||
SSH="no"
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
SSH="no"
|
SSH="no"
|
||||||
fi
|
fi
|
||||||
@ -2278,15 +2568,23 @@ build_container() {
|
|||||||
none) ;;
|
none) ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Build FEATURES string
|
# Build FEATURES string based on container type and user choices
|
||||||
if [ "$CT_TYPE" == "1" ]; then
|
FEATURES=""
|
||||||
FEATURES="keyctl=1,nesting=1"
|
|
||||||
else
|
# Nesting support (user configurable, default enabled)
|
||||||
|
if [ "${ENABLE_NESTING:-1}" == "1" ]; then
|
||||||
FEATURES="nesting=1"
|
FEATURES="nesting=1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Keyctl for unprivileged containers (needed for Docker)
|
||||||
|
if [ "$CT_TYPE" == "1" ]; then
|
||||||
|
[ -n "$FEATURES" ] && FEATURES="$FEATURES,"
|
||||||
|
FEATURES="${FEATURES}keyctl=1"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$ENABLE_FUSE" == "yes" ]; then
|
if [ "$ENABLE_FUSE" == "yes" ]; then
|
||||||
FEATURES="$FEATURES,fuse=1"
|
[ -n "$FEATURES" ] && FEATURES="$FEATURES,"
|
||||||
|
FEATURES="${FEATURES}fuse=1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Build PCT_OPTIONS as string for export
|
# Build PCT_OPTIONS as string for export
|
||||||
@ -2387,21 +2685,15 @@ build_container() {
|
|||||||
# GPU/USB PASSTHROUGH CONFIGURATION
|
# GPU/USB PASSTHROUGH CONFIGURATION
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
|
|
||||||
# List of applications that benefit from GPU acceleration
|
# Check if GPU passthrough is enabled
|
||||||
GPU_APPS=(
|
# Returns true only if var_gpu is explicitly set to "yes"
|
||||||
"immich" "channels" "emby" "ersatztv" "frigate"
|
# Can be set via:
|
||||||
"jellyfin" "plex" "scrypted" "tdarr" "unmanic"
|
# - Environment variable: var_gpu=yes bash -c "..."
|
||||||
"ollama" "fileflows" "open-webui" "tunarr" "debian"
|
# - CT script default: var_gpu="${var_gpu:-no}"
|
||||||
"handbrake" "sunshine" "moonlight" "kodi" "stremio"
|
# - Advanced settings wizard
|
||||||
"viseron"
|
# - App defaults file: /usr/local/community-scripts/defaults/<app>.vars
|
||||||
)
|
|
||||||
|
|
||||||
# Check if app needs GPU
|
|
||||||
is_gpu_app() {
|
is_gpu_app() {
|
||||||
local app="${1,,}"
|
[[ "${var_gpu:-no}" == "yes" ]] && return 0
|
||||||
for gpu_app in "${GPU_APPS[@]}"; do
|
|
||||||
[[ "$app" == "${gpu_app,,}" ]] && return 0
|
|
||||||
done
|
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2491,8 +2783,13 @@ EOF
|
|||||||
|
|
||||||
# Configure GPU passthrough
|
# Configure GPU passthrough
|
||||||
configure_gpu_passthrough() {
|
configure_gpu_passthrough() {
|
||||||
# Skip if not a GPU app and not privileged
|
# Skip if:
|
||||||
if [[ "$CT_TYPE" != "0" ]] && ! is_gpu_app "$APP"; then
|
# GPU passthrough is enabled when var_gpu="yes":
|
||||||
|
# - Set via environment variable: var_gpu=yes bash -c "..."
|
||||||
|
# - Set in CT script: var_gpu="${var_gpu:-no}"
|
||||||
|
# - Enabled in advanced_settings wizard
|
||||||
|
# - Configured in app defaults file
|
||||||
|
if ! is_gpu_app "$APP"; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@ -123,6 +123,7 @@ icons() {
|
|||||||
CREATING="${TAB}🚀${TAB}${CL}"
|
CREATING="${TAB}🚀${TAB}${CL}"
|
||||||
ADVANCED="${TAB}🧩${TAB}${CL}"
|
ADVANCED="${TAB}🧩${TAB}${CL}"
|
||||||
FUSE="${TAB}🗂️${TAB}${CL}"
|
FUSE="${TAB}🗂️${TAB}${CL}"
|
||||||
|
GPU="${TAB}🎮${TAB}${CL}"
|
||||||
HOURGLASS="${TAB}⏳${TAB}"
|
HOURGLASS="${TAB}⏳${TAB}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -222,21 +222,12 @@ motd_ssh() {
|
|||||||
# Set terminal to 256-color mode
|
# Set terminal to 256-color mode
|
||||||
grep -qxF "export TERM='xterm-256color'" /root/.bashrc || echo "export TERM='xterm-256color'" >>/root/.bashrc
|
grep -qxF "export TERM='xterm-256color'" /root/.bashrc || echo "export TERM='xterm-256color'" >>/root/.bashrc
|
||||||
|
|
||||||
# Get OS information (Debian / Ubuntu)
|
|
||||||
if [ -f "/etc/os-release" ]; then
|
|
||||||
OS_NAME=$(grep ^NAME /etc/os-release | cut -d= -f2 | tr -d '"')
|
|
||||||
OS_VERSION=$(grep ^VERSION_ID /etc/os-release | cut -d= -f2 | tr -d '"')
|
|
||||||
elif [ -f "/etc/debian_version" ]; then
|
|
||||||
OS_NAME="Debian"
|
|
||||||
OS_VERSION=$(cat /etc/debian_version)
|
|
||||||
fi
|
|
||||||
|
|
||||||
PROFILE_FILE="/etc/profile.d/00_lxc-details.sh"
|
PROFILE_FILE="/etc/profile.d/00_lxc-details.sh"
|
||||||
echo "echo -e \"\"" >"$PROFILE_FILE"
|
echo "echo -e \"\"" >"$PROFILE_FILE"
|
||||||
echo -e "echo -e \"${BOLD}${APPLICATION} LXC Container${CL}"\" >>"$PROFILE_FILE"
|
echo -e "echo -e \"${BOLD}${APPLICATION} LXC Container${CL}"\" >>"$PROFILE_FILE"
|
||||||
echo -e "echo -e \"${TAB}${GATEWAY}${YW} Provided by: ${GN}community-scripts ORG ${YW}| GitHub: ${GN}https://github.com/community-scripts/ProxmoxVE${CL}\"" >>"$PROFILE_FILE"
|
echo -e "echo -e \"${TAB}${GATEWAY}${YW} Provided by: ${GN}community-scripts ORG ${YW}| GitHub: ${GN}https://github.com/community-scripts/ProxmoxVE${CL}\"" >>"$PROFILE_FILE"
|
||||||
echo "echo \"\"" >>"$PROFILE_FILE"
|
echo "echo \"\"" >>"$PROFILE_FILE"
|
||||||
echo -e "echo -e \"${TAB}${OS}${YW} OS: ${GN}${OS_NAME} - Version: ${OS_VERSION}${CL}\"" >>"$PROFILE_FILE"
|
echo -e "echo -e \"${TAB}${OS}${YW} OS: ${GN}\$(grep ^NAME /etc/os-release | cut -d= -f2 | tr -d '\"') - Version: \$(grep ^VERSION_ID /etc/os-release | cut -d= -f2 | tr -d '\"')${CL}\"" >>"$PROFILE_FILE"
|
||||||
echo -e "echo -e \"${TAB}${HOSTNAME}${YW} Hostname: ${GN}\$(hostname)${CL}\"" >>"$PROFILE_FILE"
|
echo -e "echo -e \"${TAB}${HOSTNAME}${YW} Hostname: ${GN}\$(hostname)${CL}\"" >>"$PROFILE_FILE"
|
||||||
echo -e "echo -e \"${TAB}${INFO}${YW} IP Address: ${GN}\$(hostname -I | awk '{print \$1}')${CL}\"" >>"$PROFILE_FILE"
|
echo -e "echo -e \"${TAB}${INFO}${YW} IP Address: ${GN}\$(hostname -I | awk '{print \$1}')${CL}\"" >>"$PROFILE_FILE"
|
||||||
|
|
||||||
|
|||||||
@ -72,17 +72,17 @@ stop_all_services() {
|
|||||||
local service_patterns=("$@")
|
local service_patterns=("$@")
|
||||||
|
|
||||||
for pattern in "${service_patterns[@]}"; do
|
for pattern in "${service_patterns[@]}"; do
|
||||||
# Find all matching services
|
# Find all matching services (grep || true to handle no matches)
|
||||||
|
local services
|
||||||
|
services=$(systemctl list-units --type=service --all 2>/dev/null |
|
||||||
|
grep -oE "${pattern}[^ ]*\.service" 2>/dev/null | sort -u) || true
|
||||||
|
|
||||||
systemctl list-units --type=service --all 2>/dev/null |
|
if [[ -n "$services" ]]; then
|
||||||
grep -oE "${pattern}[^ ]*\.service" |
|
|
||||||
sort -u |
|
|
||||||
while read -r service; do
|
while read -r service; do
|
||||||
|
|
||||||
$STD systemctl stop "$service" 2>/dev/null || true
|
$STD systemctl stop "$service" 2>/dev/null || true
|
||||||
$STD systemctl disable "$service" 2>/dev/null || true
|
$STD systemctl disable "$service" 2>/dev/null || true
|
||||||
done
|
done <<<"$services"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1453,15 +1453,32 @@ check_for_gh_release() {
|
|||||||
|
|
||||||
ensure_dependencies jq
|
ensure_dependencies jq
|
||||||
|
|
||||||
# Fetch releases and exclude drafts/prereleases
|
# Try /latest endpoint for non-pinned versions (most efficient)
|
||||||
local releases_json
|
local releases_json=""
|
||||||
releases_json=$(curl -fsSL --max-time 20 \
|
|
||||||
-H 'Accept: application/vnd.github+json' \
|
if [[ -z "$pinned_version_in" ]]; then
|
||||||
-H 'X-GitHub-Api-Version: 2022-11-28' \
|
releases_json=$(curl -fsSL --max-time 20 \
|
||||||
"https://api.github.com/repos/${source}/releases") || {
|
-H 'Accept: application/vnd.github+json' \
|
||||||
msg_error "Unable to fetch releases for ${app}"
|
-H 'X-GitHub-Api-Version: 2022-11-28' \
|
||||||
return 1
|
"https://api.github.com/repos/${source}/releases/latest" 2>/dev/null)
|
||||||
}
|
|
||||||
|
if [[ $? -eq 0 ]] && [[ -n "$releases_json" ]]; then
|
||||||
|
# Wrap single release in array for consistent processing
|
||||||
|
releases_json="[$releases_json]"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If no releases yet (pinned version OR /latest failed), fetch up to 100
|
||||||
|
if [[ -z "$releases_json" ]]; then
|
||||||
|
# Fetch releases and exclude drafts/prereleases
|
||||||
|
releases_json=$(curl -fsSL --max-time 20 \
|
||||||
|
-H 'Accept: application/vnd.github+json' \
|
||||||
|
-H 'X-GitHub-Api-Version: 2022-11-28' \
|
||||||
|
"https://api.github.com/repos/${source}/releases?per_page=100") || {
|
||||||
|
msg_error "Unable to fetch releases for ${app}"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
mapfile -t raw_tags < <(jq -r '.[] | select(.draft==false and .prerelease==false) | .tag_name' <<<"$releases_json")
|
mapfile -t raw_tags < <(jq -r '.[] | select(.draft==false and .prerelease==false) | .tag_name' <<<"$releases_json")
|
||||||
if ((${#raw_tags[@]} == 0)); then
|
if ((${#raw_tags[@]} == 0)); then
|
||||||
|
|||||||
@ -24,7 +24,7 @@ RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)"
|
|||||||
METHOD=""
|
METHOD=""
|
||||||
NSAPP="opnsense-vm"
|
NSAPP="opnsense-vm"
|
||||||
var_os="opnsense"
|
var_os="opnsense"
|
||||||
var_version="25.1"
|
var_version="25.7"
|
||||||
#
|
#
|
||||||
GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//')
|
GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//')
|
||||||
GEN_MAC_LAN=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//')
|
GEN_MAC_LAN=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//')
|
||||||
@ -670,7 +670,7 @@ if [ -n "$WAN_BRG" ]; then
|
|||||||
msg_ok "WAN interface added"
|
msg_ok "WAN interface added"
|
||||||
sleep 5 # Brief pause after adding network interface
|
sleep 5 # Brief pause after adding network interface
|
||||||
fi
|
fi
|
||||||
send_line_to_vm "sh ./opnsense-bootstrap.sh.in -y -f -r 25.1"
|
send_line_to_vm "sh ./opnsense-bootstrap.sh.in -y -f -r 25.7"
|
||||||
msg_ok "OPNsense VM is being installed, do not close the terminal, or the installation will fail."
|
msg_ok "OPNsense VM is being installed, do not close the terminal, or the installation will fail."
|
||||||
#We need to wait for the OPNsense build proccess to finish, this takes a few minutes
|
#We need to wait for the OPNsense build proccess to finish, this takes a few minutes
|
||||||
sleep 1000
|
sleep 1000
|
||||||
|
|||||||
Reference in New Issue
Block a user