mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-06-25 16:54:57 +02:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3abbefe3b0 | |||
| c356c3827a | |||
| 6f2d3da61f | |||
| f7acb76e80 | |||
| b2ecd86698 | |||
| df10a5ea53 | |||
| 3a65047ff9 | |||
| 5b01ff81e8 | |||
| 4e6cb56f06 | |||
| 470c0672fb | |||
| 62b7080477 | |||
| e193adad5a | |||
| aeb8dba809 | |||
| 3fc7008bbe |
+18
-1
@@ -488,14 +488,31 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
|||||||
|
|
||||||
## 2026-06-24
|
## 2026-06-24
|
||||||
|
|
||||||
|
### 🆕 New Scripts
|
||||||
|
|
||||||
|
- SnapOtter ([#15368](https://github.com/community-scripts/ProxmoxVE/pull/15368))
|
||||||
|
|
||||||
### 🚀 Updated Scripts
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
- enabling rewirte module in apache [@d3v3lop3rDE](https://github.com/d3v3lop3rDE) ([#15360](https://github.com/community-scripts/ProxmoxVE/pull/15360))
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- enabling rewirte module in apache [@d3v3lop3rDE](https://github.com/d3v3lop3rDE) ([#15360](https://github.com/community-scripts/ProxmoxVE/pull/15360))
|
||||||
|
- watcharr: Increase default RAM allocation from 1024 to 2048 [@MickLesk](https://github.com/MickLesk) ([#15370](https://github.com/community-scripts/ProxmoxVE/pull/15370))
|
||||||
|
|
||||||
|
- #### 🔧 Refactor
|
||||||
|
|
||||||
|
- Refactor LibreNMS: replace old install and update variant with tarball approach [@MickLesk](https://github.com/MickLesk) ([#15369](https://github.com/community-scripts/ProxmoxVE/pull/15369))
|
||||||
|
|
||||||
|
### 🗑️ Deleted Scripts
|
||||||
|
|
||||||
|
- delete wger [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#15380](https://github.com/community-scripts/ProxmoxVE/pull/15380))
|
||||||
|
- Delete ghost [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#15377](https://github.com/community-scripts/ProxmoxVE/pull/15377))
|
||||||
|
|
||||||
### 💾 Core
|
### 💾 Core
|
||||||
|
|
||||||
- #### ✨ New Features
|
- #### ✨ New Features
|
||||||
|
|
||||||
|
- core: add SDN vnet selection in advanced install [@MickLesk](https://github.com/MickLesk) ([#15366](https://github.com/community-scripts/ProxmoxVE/pull/15366))
|
||||||
- core: add var_http_proxy and var_http_no_proxy support [@MickLesk](https://github.com/MickLesk) ([#15225](https://github.com/community-scripts/ProxmoxVE/pull/15225))
|
- core: add var_http_proxy and var_http_no_proxy support [@MickLesk](https://github.com/MickLesk) ([#15225](https://github.com/community-scripts/ProxmoxVE/pull/15225))
|
||||||
|
|
||||||
## 2026-06-23
|
## 2026-06-23
|
||||||
|
|||||||
-57
@@ -1,57 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: fabrice1236
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://ghost.org/ | Github: https://github.com/TryGhost/Ghost
|
|
||||||
|
|
||||||
APP="Ghost"
|
|
||||||
var_tags="${var_tags:-cms;blog}"
|
|
||||||
var_cpu="${var_cpu:-2}"
|
|
||||||
var_ram="${var_ram:-1024}"
|
|
||||||
var_disk="${var_disk:-5}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
|
|
||||||
setup_mariadb
|
|
||||||
NODE_VERSION="22" NODE_MODULE="pnpm" setup_nodejs
|
|
||||||
ensure_dependencies git
|
|
||||||
|
|
||||||
msg_info "Updating Ghost"
|
|
||||||
if command -v ghost &>/dev/null; then
|
|
||||||
current_version=$(ghost version | grep 'Ghost-CLI version' | awk '{print $3}')
|
|
||||||
latest_version=$(npm show ghost-cli version)
|
|
||||||
if [ "$current_version" != "$latest_version" ]; then
|
|
||||||
msg_info "Updating ${APP} from version v${current_version} to v${latest_version}"
|
|
||||||
$STD npm install -g ghost-cli@latest
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
else
|
|
||||||
msg_ok "${APP} is already at v${current_version}"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
msg_error "No ${APP} Installation Found!"
|
|
||||||
exit
|
|
||||||
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 "${GATEWAY}${BGN}http://${IP}:2368${CL}"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
________ __
|
|
||||||
/ ____/ /_ ____ _____/ /_
|
|
||||||
/ / __/ __ \/ __ \/ ___/ __/
|
|
||||||
/ /_/ / / / / /_/ (__ ) /_
|
|
||||||
\____/_/ /_/\____/____/\__/
|
|
||||||
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
_____ ____ __ __
|
||||||
|
/ ___/____ ____ _____ / __ \/ /_/ /____ _____
|
||||||
|
\__ \/ __ \/ __ `/ __ \/ / / / __/ __/ _ \/ ___/
|
||||||
|
___/ / / / / /_/ / /_/ / /_/ / /_/ /_/ __/ /
|
||||||
|
/____/_/ /_/\__,_/ .___/\____/\__/\__/\___/_/
|
||||||
|
/_/
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
|
|
||||||
_ ______ ____ _____
|
|
||||||
| | /| / / __ `/ _ \/ ___/
|
|
||||||
| |/ |/ / /_/ / __/ /
|
|
||||||
|__/|__/\__, /\___/_/
|
|
||||||
/____/
|
|
||||||
+25
-17
@@ -24,27 +24,35 @@ function update_script() {
|
|||||||
header_info
|
header_info
|
||||||
check_container_storage
|
check_container_storage
|
||||||
check_container_resources
|
check_container_resources
|
||||||
if [ ! -d /opt/librenms ]; then
|
if [[ ! -d /opt/librenms ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
setup_mariadb
|
if check_for_gh_release "librenms" "librenms/librenms"; then
|
||||||
ensure_dependencies git
|
msg_info "Stopping Services"
|
||||||
if [[ ! -d /opt/librenms/.git ]]; then
|
systemctl stop php8.4-fpm librenms-scheduler.timer
|
||||||
msg_info "Initializing LibreNMS git metadata"
|
msg_ok "Stopped Services"
|
||||||
LIBRENMS_VERSION=$(cat ~/.librenms 2>/dev/null)
|
|
||||||
cd /opt/librenms
|
create_backup /opt/librenms/.env /opt/librenms/config.php /opt/librenms/rrd
|
||||||
git init -q
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "librenms" "librenms/librenms" "tarball"
|
||||||
git remote add origin https://github.com/librenms/librenms.git
|
restore_backup
|
||||||
git fetch --depth 1 origin "refs/tags/v${LIBRENMS_VERSION}" 2>/dev/null ||
|
|
||||||
git fetch --depth 1 origin "refs/tags/${LIBRENMS_VERSION}" 2>/dev/null || true
|
msg_info "Updating LibreNMS"
|
||||||
git checkout -qf FETCH_HEAD 2>/dev/null || true
|
mkdir -p /opt/librenms/{rrd,logs,bootstrap/cache,storage}
|
||||||
chown -R librenms:librenms .git
|
chown -R librenms:librenms /opt/librenms
|
||||||
msg_ok "Initialized LibreNMS git metadata"
|
chmod 771 /opt/librenms
|
||||||
|
chmod -R ug=rwX /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/logs /opt/librenms/rrd
|
||||||
|
$STD su - librenms -s /bin/bash -c "cd /opt/librenms && uv venv --clear .venv && source .venv/bin/activate && uv pip install -r requirements.txt"
|
||||||
|
$STD su - librenms -s /bin/bash -c "cd /opt/librenms && COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev"
|
||||||
|
$STD su - librenms -s /bin/bash -c "cd /opt/librenms && php8.4 artisan optimize:clear"
|
||||||
|
$STD su - librenms -s /bin/bash -c "cd /opt/librenms && php8.4 artisan migrate --force --isolated"
|
||||||
|
msg_ok "Updated LibreNMS"
|
||||||
|
|
||||||
|
msg_info "Starting Services"
|
||||||
|
systemctl start php8.4-fpm librenms-scheduler.timer
|
||||||
|
msg_ok "Started Services"
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
fi
|
fi
|
||||||
msg_info "Updating LibreNMS"
|
|
||||||
$STD su - librenms -s /bin/bash -c 'cd /opt/librenms && ./daily.sh'
|
|
||||||
msg_ok "Updated LibreNMS"
|
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,63 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||||
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
|
# Author: MickLesk (CanbiZ)
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
# Source: https://snapotter.com
|
||||||
|
|
||||||
|
APP="SnapOtter"
|
||||||
|
var_tags="${var_tags:-media;image}"
|
||||||
|
var_cpu="${var_cpu:-2}"
|
||||||
|
var_ram="${var_ram:-2048}"
|
||||||
|
var_disk="${var_disk:-20}"
|
||||||
|
var_os="${var_os:-debian}"
|
||||||
|
var_version="${var_version:-13}"
|
||||||
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
var_arm64="${var_arm64:-no}"
|
||||||
|
|
||||||
|
header_info "$APP"
|
||||||
|
variables
|
||||||
|
color
|
||||||
|
catch_errors
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
|
||||||
|
if [[ ! -d /opt/snapotter ]]; then
|
||||||
|
msg_error "No ${APP} Installation Found!"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
if check_for_gh_release "snapotter" "snapotter-hq/SnapOtter"; then
|
||||||
|
msg_info "Stopping Service"
|
||||||
|
systemctl stop snapotter
|
||||||
|
msg_ok "Stopped Service"
|
||||||
|
|
||||||
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "snapotter" "snapotter-hq/SnapOtter" "tarball"
|
||||||
|
|
||||||
|
msg_info "Updating SnapOtter"
|
||||||
|
cd /opt/snapotter
|
||||||
|
$STD npm pkg delete scripts.prepare
|
||||||
|
$STD pnpm install --frozen-lockfile
|
||||||
|
$STD pnpm --filter @snapotter/web build
|
||||||
|
sed -i 's/mediapipe==0.10.21/mediapipe>=0.10.21/' /opt/snapotter/docker/feature-manifest.json
|
||||||
|
msg_ok "Updated SnapOtter"
|
||||||
|
|
||||||
|
msg_info "Starting Service"
|
||||||
|
systemctl start snapotter
|
||||||
|
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}:1349${CL}"
|
||||||
+1
-1
@@ -8,7 +8,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
|||||||
APP="Watcharr"
|
APP="Watcharr"
|
||||||
var_tags="${var_tags:-media}"
|
var_tags="${var_tags:-media}"
|
||||||
var_cpu="${var_cpu:-1}"
|
var_cpu="${var_cpu:-1}"
|
||||||
var_ram="${var_ram:-1024}"
|
var_ram="${var_ram:-2048}"
|
||||||
var_disk="${var_disk:-4}"
|
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}"
|
||||||
|
|||||||
-78
@@ -1,78 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: Slaviša Arežina (tremor021)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/wger-project/wger
|
|
||||||
|
|
||||||
APP="wger"
|
|
||||||
var_tags="${var_tags:-management;fitness}"
|
|
||||||
var_cpu="${var_cpu:-2}"
|
|
||||||
var_ram="${var_ram:-2048}"
|
|
||||||
var_disk="${var_disk:-8}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
|
||||||
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/wger ]]; then
|
|
||||||
msg_error "No ${APP} Installation Found!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
if check_for_gh_release "wger" "wger-project/wger"; then
|
|
||||||
msg_info "Stopping Service"
|
|
||||||
systemctl stop redis-server nginx celery celery-beat wger
|
|
||||||
msg_ok "Stopped Service"
|
|
||||||
|
|
||||||
msg_info "Backing up Data"
|
|
||||||
cp -r /opt/wger/media /opt/wger_media_backup
|
|
||||||
cp /opt/wger/.env /opt/wger_env_backup
|
|
||||||
msg_ok "Backed up Data"
|
|
||||||
|
|
||||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "wger" "wger-project/wger" "tarball"
|
|
||||||
|
|
||||||
msg_info "Restoring Data"
|
|
||||||
cp -r /opt/wger_media_backup/. /opt/wger/media
|
|
||||||
cp /opt/wger_env_backup /opt/wger/.env
|
|
||||||
rm -rf /opt/wger_media_backup /opt/wger_env_backup
|
|
||||||
|
|
||||||
msg_ok "Restored Data"
|
|
||||||
|
|
||||||
msg_info "Updating wger"
|
|
||||||
cd /opt/wger
|
|
||||||
set -a && source /opt/wger/.env && set +a
|
|
||||||
export DJANGO_SETTINGS_MODULE=settings.main
|
|
||||||
$STD uv pip install .
|
|
||||||
$STD npm install
|
|
||||||
$STD npm run build:css:sass
|
|
||||||
$STD uv run python manage.py migrate
|
|
||||||
$STD uv run python manage.py collectstatic --no-input
|
|
||||||
msg_ok "Updated wger"
|
|
||||||
|
|
||||||
msg_info "Starting Services"
|
|
||||||
systemctl start redis-server nginx celery celery-beat wger
|
|
||||||
msg_ok "Started Services"
|
|
||||||
msg_ok "Updated Successfully"
|
|
||||||
fi
|
|
||||||
exit
|
|
||||||
}
|
|
||||||
|
|
||||||
start
|
|
||||||
build_container
|
|
||||||
description
|
|
||||||
|
|
||||||
msg_ok "Completed Successfully!\n"
|
|
||||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
|
||||||
echo -e "${INFO}${YW}Access it using the following URL:${CL}"
|
|
||||||
echo -e "${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: fabrice1236
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://ghost.org/ | Github: https://github.com/TryGhost/Ghost
|
|
||||||
|
|
||||||
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 \
|
|
||||||
nginx \
|
|
||||||
ca-certificates \
|
|
||||||
libjemalloc2 \
|
|
||||||
git
|
|
||||||
msg_ok "Installed Dependencies"
|
|
||||||
|
|
||||||
setup_mariadb
|
|
||||||
MARIADB_DB_NAME="ghost" MARIADB_DB_USER="ghostuser" setup_mariadb_db
|
|
||||||
NODE_VERSION="22" NODE_MODULE="pnpm" setup_nodejs
|
|
||||||
|
|
||||||
msg_info "Installing Ghost CLI"
|
|
||||||
$STD npm install ghost-cli@latest -g
|
|
||||||
msg_ok "Installed Ghost CLI"
|
|
||||||
|
|
||||||
msg_info "Creating Service"
|
|
||||||
$STD adduser --disabled-password --gecos "Ghost user" ghost-user
|
|
||||||
$STD usermod -aG sudo ghost-user
|
|
||||||
echo "ghost-user ALL=(ALL) NOPASSWD:ALL" | tee /etc/sudoers.d/ghost-user
|
|
||||||
mkdir -p /var/www/ghost
|
|
||||||
chown -R ghost-user:ghost-user /var/www/ghost
|
|
||||||
chmod 775 /var/www/ghost
|
|
||||||
$STD sudo -u ghost-user -H sh -c "cd /var/www/ghost && ghost install --db=mysql --dbhost=localhost --dbuser=$MARIADB_DB_USER --dbpass=$MARIADB_DB_PASS --dbname=$MARIADB_DB_NAME --url=http://localhost:2368 --no-prompt --no-setup-nginx --no-setup-ssl --no-setup-mysql --enable --start --ip 0.0.0.0"
|
|
||||||
rm /etc/sudoers.d/ghost-user
|
|
||||||
msg_ok "Creating Service"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
cleanup_lxc
|
|
||||||
@@ -17,7 +17,6 @@ msg_info "Installing Dependencies"
|
|||||||
$STD apt install -y \
|
$STD apt install -y \
|
||||||
acl \
|
acl \
|
||||||
fping \
|
fping \
|
||||||
git \
|
|
||||||
graphviz \
|
graphviz \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
mtr-tiny \
|
mtr-tiny \
|
||||||
@@ -65,16 +64,6 @@ EOF
|
|||||||
chown -R librenms:librenms /opt/librenms
|
chown -R librenms:librenms /opt/librenms
|
||||||
chmod 771 /opt/librenms
|
chmod 771 /opt/librenms
|
||||||
chmod -R ug=rwX /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/logs /opt/librenms/rrd
|
chmod -R ug=rwX /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/logs /opt/librenms/rrd
|
||||||
if [[ ! -d /opt/librenms/.git ]]; then
|
|
||||||
LIBRENMS_VERSION=$(cat ~/.librenms 2>/dev/null)
|
|
||||||
cd /opt/librenms
|
|
||||||
git init -q
|
|
||||||
git remote add origin https://github.com/librenms/librenms.git
|
|
||||||
git fetch --depth 1 origin "refs/tags/v${LIBRENMS_VERSION}" 2>/dev/null ||
|
|
||||||
git fetch --depth 1 origin "refs/tags/${LIBRENMS_VERSION}" 2>/dev/null || true
|
|
||||||
git checkout -qf FETCH_HEAD 2>/dev/null || true
|
|
||||||
chown -R librenms:librenms .git
|
|
||||||
fi
|
|
||||||
msg_ok "Configured LibreNMS"
|
msg_ok "Configured LibreNMS"
|
||||||
|
|
||||||
msg_info "Configure MariaDB"
|
msg_info "Configure MariaDB"
|
||||||
|
|||||||
@@ -0,0 +1,102 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
|
# Author: MickLesk (CanbiZ)
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
# Source: https://snapotter.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 \
|
||||||
|
imagemagick \
|
||||||
|
ghostscript \
|
||||||
|
potrace \
|
||||||
|
libopenjp2-tools \
|
||||||
|
libegl1 \
|
||||||
|
libwayland-client0 \
|
||||||
|
libwayland-cursor0 \
|
||||||
|
libwayland-egl1 \
|
||||||
|
libxkbcommon0 \
|
||||||
|
libxkbcommon-x11-0 \
|
||||||
|
libxcursor1 \
|
||||||
|
python3 \
|
||||||
|
python3-dev \
|
||||||
|
gcc \
|
||||||
|
g++
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
PYTHON_VERSION="3.11" setup_uv
|
||||||
|
NODE_VERSION="22" NODE_MODULE="pnpm" setup_nodejs
|
||||||
|
fetch_and_deploy_gh_release "caire" "esimov/caire" "prebuild" "latest" "/usr/local/bin" "caire-*-linux-amd64.tar.gz"
|
||||||
|
fetch_and_deploy_gh_release "snapotter" "snapotter-hq/SnapOtter" "prebuild" "latest" "/opt/snapotter" "snapotter-*-linux-amd64.tar.gz"
|
||||||
|
|
||||||
|
msg_info "Setting up Python Environment"
|
||||||
|
mkdir -p /opt/snapotter_data/ai/models/rembg
|
||||||
|
$STD uv python install 3.11
|
||||||
|
$STD uv venv --seed --python 3.11 /opt/snapotter_data/ai/venv
|
||||||
|
#if [[ -f /opt/snapotter/packages/ai/python/requirements.txt ]]; then
|
||||||
|
# $STD uv pip install \
|
||||||
|
# --python /opt/snapotter_data/ai/venv/bin/python \
|
||||||
|
# -r /opt/snapotter/packages/ai/python/requirements.txt
|
||||||
|
#fi
|
||||||
|
ln -sfn /opt/snapotter /app
|
||||||
|
msg_ok "Set up Python Environment"
|
||||||
|
|
||||||
|
msg_info "Configuring SnapOtter"
|
||||||
|
mkdir -p /opt/snapotter_data/files
|
||||||
|
mkdir -p /tmp/snapotter-workspace
|
||||||
|
|
||||||
|
cat <<EOF >/opt/snapotter_data/.env
|
||||||
|
PORT=1349
|
||||||
|
NODE_ENV=production
|
||||||
|
DB_PATH=/opt/snapotter_data/snapotter.db
|
||||||
|
WORKSPACE_PATH=/tmp/snapotter-workspace
|
||||||
|
FILES_STORAGE_PATH=/opt/snapotter_data/files
|
||||||
|
PYTHON_VENV_PATH=/opt/snapotter_data/ai/venv
|
||||||
|
MODELS_PATH=/opt/snapotter_data/ai/models
|
||||||
|
DATA_DIR=/opt/snapotter_data
|
||||||
|
FEATURE_MANIFEST_PATH=/opt/snapotter/docker/feature-manifest.json
|
||||||
|
U2NET_HOME=/opt/snapotter_data/ai/models/rembg
|
||||||
|
AUTH_ENABLED=true
|
||||||
|
DEFAULT_USERNAME=admin
|
||||||
|
DEFAULT_PASSWORD=admin
|
||||||
|
LOG_LEVEL=info
|
||||||
|
TRUST_PROXY=true
|
||||||
|
FILE_MAX_AGE_HOURS=72
|
||||||
|
CLEANUP_INTERVAL_MINUTES=60
|
||||||
|
ANALYTICS_ENABLED=false
|
||||||
|
EOF
|
||||||
|
msg_ok "Configured SnapOtter"
|
||||||
|
|
||||||
|
msg_info "Creating Service"
|
||||||
|
PNPM_BIN="$(command -v pnpm)"
|
||||||
|
cat <<EOF >/etc/systemd/system/snapotter.service
|
||||||
|
[Unit]
|
||||||
|
Description=SnapOtter Service
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=root
|
||||||
|
WorkingDirectory=/opt/snapotter
|
||||||
|
EnvironmentFile=/opt/snapotter_data/.env
|
||||||
|
ExecStart=${PNPM_BIN} --filter @snapotter/api run start
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=5
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
|
systemctl enable -q --now snapotter
|
||||||
|
msg_ok "Created Service"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
cleanup_lxc
|
||||||
@@ -1,182 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: Slaviša Arežina (tremor021)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/wger-project/wger
|
|
||||||
|
|
||||||
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 \
|
|
||||||
nginx \
|
|
||||||
redis-server \
|
|
||||||
libpq-dev
|
|
||||||
msg_ok "Installed Dependencies"
|
|
||||||
|
|
||||||
NODE_VERSION="22" NODE_MODULE="sass" setup_nodejs
|
|
||||||
setup_uv
|
|
||||||
PG_VERSION="16" setup_postgresql
|
|
||||||
PG_DB_NAME="wger" PG_DB_USER="wger" setup_postgresql_db
|
|
||||||
fetch_and_deploy_gh_release "wger" "wger-project/wger" "tarball"
|
|
||||||
|
|
||||||
msg_info "Setting up wger"
|
|
||||||
mkdir -p /opt/wger/{static,media}
|
|
||||||
chmod o+w /opt/wger/media
|
|
||||||
cd /opt/wger
|
|
||||||
|
|
||||||
$STD npm install
|
|
||||||
$STD npm run build:css:sass
|
|
||||||
$STD uv venv
|
|
||||||
$STD uv pip install . --group docker
|
|
||||||
SECRET_KEY=$(openssl rand -base64 40)
|
|
||||||
cat <<EOF >/opt/wger/.env
|
|
||||||
DJANGO_SETTINGS_MODULE=settings.main
|
|
||||||
PYTHONPATH=/opt/wger
|
|
||||||
|
|
||||||
DJANGO_DB_ENGINE=django.db.backends.postgresql
|
|
||||||
DJANGO_DB_DATABASE=${PG_DB_NAME}
|
|
||||||
DJANGO_DB_USER=${PG_DB_USER}
|
|
||||||
DJANGO_DB_PASSWORD=${PG_DB_PASS}
|
|
||||||
DJANGO_DB_HOST=localhost
|
|
||||||
DJANGO_DB_PORT=5432
|
|
||||||
DATABASE_URL=postgresql://${PG_DB_USER}:${PG_DB_PASS}@localhost:5432/${PG_DB_NAME}
|
|
||||||
|
|
||||||
DJANGO_MEDIA_ROOT=/opt/wger/media
|
|
||||||
DJANGO_STATIC_ROOT=/opt/wger/static
|
|
||||||
DJANGO_STATIC_URL=/static/
|
|
||||||
|
|
||||||
ALLOWED_HOSTS=${LOCAL_IP},localhost,127.0.0.1
|
|
||||||
CSRF_TRUSTED_ORIGINS=http://${LOCAL_IP}:3000
|
|
||||||
|
|
||||||
USE_X_FORWARDED_HOST=True
|
|
||||||
SECURE_PROXY_SSL_HEADER=HTTP_X_FORWARDED_PROTO,http
|
|
||||||
|
|
||||||
DJANGO_CACHE_BACKEND=django_redis.cache.RedisCache
|
|
||||||
DJANGO_CACHE_LOCATION=redis://127.0.0.1:6379/1
|
|
||||||
DJANGO_CACHE_TIMEOUT=300
|
|
||||||
DJANGO_CACHE_CLIENT_CLASS=django_redis.client.DefaultClient
|
|
||||||
AXES_CACHE_ALIAS=default
|
|
||||||
|
|
||||||
USE_CELERY=True
|
|
||||||
CELERY_BROKER=redis://127.0.0.1:6379/2
|
|
||||||
CELERY_BACKEND=redis://127.0.0.1:6379/2
|
|
||||||
|
|
||||||
SITE_URL=http://${LOCAL_IP}:3000
|
|
||||||
SECRET_KEY=${SECRET_KEY}
|
|
||||||
EOF
|
|
||||||
set -a && source /opt/wger/.env && set +a
|
|
||||||
$STD uv run wger bootstrap
|
|
||||||
$STD uv run python manage.py collectstatic --no-input
|
|
||||||
cat <<EOF | uv run python manage.py shell
|
|
||||||
from django.contrib.auth import get_user_model
|
|
||||||
User = get_user_model()
|
|
||||||
|
|
||||||
user, created = User.objects.get_or_create(
|
|
||||||
username="admin",
|
|
||||||
defaults={"email": "admin@localhost"},
|
|
||||||
)
|
|
||||||
|
|
||||||
if created:
|
|
||||||
user.set_password("${PG_DB_PASS}")
|
|
||||||
user.is_superuser = True
|
|
||||||
user.is_staff = True
|
|
||||||
user.save()
|
|
||||||
EOF
|
|
||||||
msg_ok "Set up wger"
|
|
||||||
msg_info "Creating Config and Services"
|
|
||||||
cat <<EOF >/etc/systemd/system/wger.service
|
|
||||||
[Unit]
|
|
||||||
Description=wger Gunicorn
|
|
||||||
After=network.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
User=root
|
|
||||||
WorkingDirectory=/opt/wger
|
|
||||||
EnvironmentFile=/opt/wger/.env
|
|
||||||
ExecStart=/opt/wger/.venv/bin/gunicorn \
|
|
||||||
--bind 127.0.0.1:8000 \
|
|
||||||
--workers 3 \
|
|
||||||
--threads 2 \
|
|
||||||
--timeout 120 \
|
|
||||||
wger.wsgi:application
|
|
||||||
Restart=always
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
EOF
|
|
||||||
cat <<EOF >/etc/systemd/system/celery.service
|
|
||||||
[Unit]
|
|
||||||
Description=wger Celery Worker
|
|
||||||
After=network.target redis-server.service
|
|
||||||
Requires=redis-server.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
WorkingDirectory=/opt/wger
|
|
||||||
EnvironmentFile=/opt/wger/.env
|
|
||||||
ExecStart=/opt/wger/.venv/bin/celery -A wger worker -l info
|
|
||||||
Restart=always
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
EOF
|
|
||||||
|
|
||||||
mkdir -p /var/lib/wger/celery
|
|
||||||
chmod 700 /var/lib/wger/celery
|
|
||||||
cat <<EOF >/etc/systemd/system/celery-beat.service
|
|
||||||
[Unit]
|
|
||||||
Description=wger Celery Beat
|
|
||||||
After=network.target redis-server.service
|
|
||||||
Requires=redis-server.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
WorkingDirectory=/opt/wger
|
|
||||||
EnvironmentFile=/opt/wger/.env
|
|
||||||
ExecStart=/opt/wger/.venv/bin/celery -A wger beat -l info \
|
|
||||||
--schedule /var/lib/wger/celery/celerybeat-schedule
|
|
||||||
Restart=always
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
EOF
|
|
||||||
cat <<'EOF' >/etc/nginx/sites-available/wger
|
|
||||||
server {
|
|
||||||
listen 3000;
|
|
||||||
server_name _;
|
|
||||||
|
|
||||||
client_max_body_size 20M;
|
|
||||||
|
|
||||||
location /static/ {
|
|
||||||
alias /opt/wger/static/;
|
|
||||||
expires 30d;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /media/ {
|
|
||||||
alias /opt/wger/media/;
|
|
||||||
}
|
|
||||||
|
|
||||||
location / {
|
|
||||||
proxy_pass http://127.0.0.1:8000;
|
|
||||||
proxy_set_header Host $http_host;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_redirect off;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
$STD rm -f /etc/nginx/sites-enabled/default
|
|
||||||
$STD ln -sf /etc/nginx/sites-available/wger /etc/nginx/sites-enabled/wger
|
|
||||||
systemctl enable -q --now redis-server nginx wger celery celery-beat
|
|
||||||
systemctl restart nginx
|
|
||||||
msg_ok "Created Config and Services"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
cleanup_lxc
|
|
||||||
+57
-17
@@ -519,6 +519,19 @@ validate_bridge() {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# validate_sdn_vnet()
|
||||||
|
#
|
||||||
|
# - Validates that an SDN vnet exists in the cluster config
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
validate_sdn_vnet() {
|
||||||
|
local vnet="$1"
|
||||||
|
[[ -z "$vnet" ]] && return 1
|
||||||
|
[[ -f /etc/pve/sdn/vnets.cfg ]] && grep -qE "^vnet:[[:space:]]*${vnet}([[:space:]]|$)" /etc/pve/sdn/vnets.cfg && return 0
|
||||||
|
command -v pvesh &>/dev/null && pvesh get "/cluster/sdn/vnets/${vnet}" &>/dev/null && return 0
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# validate_gateway_in_subnet()
|
# validate_gateway_in_subnet()
|
||||||
#
|
#
|
||||||
@@ -964,6 +977,7 @@ base_settings() {
|
|||||||
HN="$requested_hostname"
|
HN="$requested_hostname"
|
||||||
|
|
||||||
BRG=${var_brg:-"vmbr0"}
|
BRG=${var_brg:-"vmbr0"}
|
||||||
|
SDN_VNET=${var_sdn_vnet:-""}
|
||||||
NET=${var_net:-"dhcp"}
|
NET=${var_net:-"dhcp"}
|
||||||
|
|
||||||
# Resolve IP range if NET contains a range (e.g., 192.168.1.100/24-192.168.1.200/24)
|
# Resolve IP range if NET contains a range (e.g., 192.168.1.100/24-192.168.1.200/24)
|
||||||
@@ -1078,7 +1092,7 @@ load_vars_file() {
|
|||||||
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_os var_protection var_pw var_ram var_tags var_timezone var_tun var_unprivileged
|
var_net var_nesting var_ns var_os var_protection var_pw var_ram var_tags var_timezone var_tun var_unprivileged
|
||||||
var_verbose var_version var_vlan var_ssh var_ssh_authorized_key var_container_storage var_template_storage var_searchdomain
|
var_verbose var_version var_vlan var_ssh var_ssh_authorized_key var_container_storage var_template_storage var_searchdomain
|
||||||
var_post_install
|
var_post_install var_sdn_vnet
|
||||||
)
|
)
|
||||||
|
|
||||||
# Whitelist check helper
|
# Whitelist check helper
|
||||||
@@ -1253,6 +1267,12 @@ load_vars_file() {
|
|||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
var_sdn_vnet)
|
||||||
|
if [[ -n "$var_val" ]] && ! validate_sdn_vnet "$var_val"; then
|
||||||
|
msg_warn "SDN vnet '$var_val' from $file not found, ignoring"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
;;
|
||||||
var_http_proxy)
|
var_http_proxy)
|
||||||
if [[ -n "$var_val" ]] && ! [[ "$var_val" =~ ^https?://[^[:space:]]+(:[0-9]+)?/?$ ]]; then
|
if [[ -n "$var_val" ]] && ! [[ "$var_val" =~ ^https?://[^[:space:]]+(:[0-9]+)?/?$ ]]; then
|
||||||
msg_warn "Invalid HTTP proxy URL '$var_val' in $file, ignoring"
|
msg_warn "Invalid HTTP proxy URL '$var_val' in $file, ignoring"
|
||||||
@@ -1308,7 +1328,7 @@ default_var_settings() {
|
|||||||
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_os var_protection var_pw var_ram var_tags var_timezone var_tun var_unprivileged
|
var_net var_nesting var_ns var_os var_protection var_pw var_ram var_tags var_timezone var_tun var_unprivileged
|
||||||
var_verbose var_version var_vlan var_ssh var_ssh_authorized_key var_container_storage var_template_storage
|
var_verbose var_version var_vlan var_ssh var_ssh_authorized_key var_container_storage var_template_storage
|
||||||
var_post_install
|
var_post_install var_sdn_vnet
|
||||||
)
|
)
|
||||||
|
|
||||||
# Snapshot: environment variables (highest precedence)
|
# Snapshot: environment variables (highest precedence)
|
||||||
@@ -1491,7 +1511,7 @@ if ! declare -p VAR_WHITELIST >/dev/null 2>&1; then
|
|||||||
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_os var_protection var_pw var_ram var_tags var_timezone var_tun var_unprivileged
|
var_net var_nesting var_ns var_os var_protection var_pw var_ram var_tags var_timezone var_tun var_unprivileged
|
||||||
var_verbose var_version var_vlan var_ssh var_ssh_authorized_key var_container_storage var_template_storage var_searchdomain
|
var_verbose var_version var_vlan var_ssh var_ssh_authorized_key var_container_storage var_template_storage var_searchdomain
|
||||||
var_post_install
|
var_post_install var_sdn_vnet
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -1705,6 +1725,7 @@ _build_current_app_vars_tmp() {
|
|||||||
|
|
||||||
[ -n "$_hostname" ] && echo "var_hostname=$(_sanitize_value "$_hostname")"
|
[ -n "$_hostname" ] && echo "var_hostname=$(_sanitize_value "$_hostname")"
|
||||||
[ -n "$_searchdomain" ] && echo "var_searchdomain=$(_sanitize_value "$_searchdomain")"
|
[ -n "$_searchdomain" ] && echo "var_searchdomain=$(_sanitize_value "$_searchdomain")"
|
||||||
|
[ -n "${var_sdn_vnet:-}" ] && echo "var_sdn_vnet=$(_sanitize_value "${var_sdn_vnet}")"
|
||||||
|
|
||||||
[ -n "$_tpl_storage" ] && echo "var_template_storage=$(_sanitize_value "$_tpl_storage")"
|
[ -n "$_tpl_storage" ] && echo "var_template_storage=$(_sanitize_value "$_tpl_storage")"
|
||||||
[ -n "$_ct_storage" ] && echo "var_container_storage=$(_sanitize_value "$_ct_storage")"
|
[ -n "$_ct_storage" ] && echo "var_container_storage=$(_sanitize_value "$_ct_storage")"
|
||||||
@@ -1865,6 +1886,7 @@ advanced_settings() {
|
|||||||
local _core_count="${var_cpu:-1}"
|
local _core_count="${var_cpu:-1}"
|
||||||
local _ram_size="${var_ram:-1024}"
|
local _ram_size="${var_ram:-1024}"
|
||||||
local _bridge="${var_brg:-vmbr0}"
|
local _bridge="${var_brg:-vmbr0}"
|
||||||
|
local _sdn_vnet="${var_sdn_vnet:-}"
|
||||||
local _net="${var_net:-dhcp}"
|
local _net="${var_net:-dhcp}"
|
||||||
local _gate="${var_gateway:-}"
|
local _gate="${var_gateway:-}"
|
||||||
local _ipv6_method="${var_ipv6_method:-auto}"
|
local _ipv6_method="${var_ipv6_method:-auto}"
|
||||||
@@ -1946,6 +1968,11 @@ advanced_settings() {
|
|||||||
fi
|
fi
|
||||||
done <<<"$BRIDGES"
|
done <<<"$BRIDGES"
|
||||||
fi
|
fi
|
||||||
|
if [[ -f /etc/pve/sdn/vnets.cfg ]]; then
|
||||||
|
while IFS= read -r vnet; do
|
||||||
|
[[ -n "$vnet" ]] && BRIDGE_MENU_OPTIONS+=("sdn:${vnet}" "[SDN] ${vnet}")
|
||||||
|
done < <(awk '/^vnet:/{print $2}' /etc/pve/sdn/vnets.cfg 2>/dev/null)
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
_detect_bridges
|
_detect_bridges
|
||||||
|
|
||||||
@@ -2178,8 +2205,18 @@ advanced_settings() {
|
|||||||
if [[ "$bridge_test" == "__other__" || "$bridge_test" == -* ]]; then
|
if [[ "$bridge_test" == "__other__" || "$bridge_test" == -* ]]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
if validate_bridge "$bridge_test"; then
|
if [[ "$bridge_test" == sdn:* ]]; then
|
||||||
|
local vnet_test="${bridge_test#sdn:}"
|
||||||
|
if validate_sdn_vnet "$vnet_test"; then
|
||||||
|
_sdn_vnet="$vnet_test"
|
||||||
|
_bridge="${var_brg:-vmbr0}"
|
||||||
|
((STEP++))
|
||||||
|
else
|
||||||
|
whiptail --msgbox "SDN vnet '$vnet_test' is not configured on this cluster." 8 58
|
||||||
|
fi
|
||||||
|
elif validate_bridge "$bridge_test"; then
|
||||||
_bridge="$bridge_test"
|
_bridge="$bridge_test"
|
||||||
|
_sdn_vnet=""
|
||||||
((STEP++))
|
((STEP++))
|
||||||
else
|
else
|
||||||
whiptail --msgbox "Bridge '$bridge_test' is not available or not active." 8 58
|
whiptail --msgbox "Bridge '$bridge_test' is not available or not active." 8 58
|
||||||
@@ -2957,6 +2994,7 @@ Advanced:
|
|||||||
var_timezone="$_ct_timezone"
|
var_timezone="$_ct_timezone"
|
||||||
var_apt_cacher="$_apt_cacher"
|
var_apt_cacher="$_apt_cacher"
|
||||||
var_apt_cacher_ip="$_apt_cacher_ip"
|
var_apt_cacher_ip="$_apt_cacher_ip"
|
||||||
|
var_sdn_vnet="$_sdn_vnet"
|
||||||
var_http_proxy="$_http_proxy"
|
var_http_proxy="$_http_proxy"
|
||||||
var_http_no_proxy="$_http_no_proxy"
|
var_http_no_proxy="$_http_no_proxy"
|
||||||
|
|
||||||
@@ -3714,7 +3752,6 @@ run_addon_updates() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
runtime_script_status_guard() {
|
runtime_script_status_guard() {
|
||||||
local script_slug="${SCRIPT_SLUG:-${NSAPP:-}}"
|
local script_slug="${SCRIPT_SLUG:-${NSAPP:-}}"
|
||||||
script_slug="$(echo "$script_slug" | tr '[:upper:]' '[:lower:]' | tr ' ' '-')"
|
script_slug="$(echo "$script_slug" | tr '[:upper:]' '[:lower:]' | tr ' ' '-')"
|
||||||
@@ -3892,6 +3929,9 @@ build_container() {
|
|||||||
# if [ "$VERBOSE" == "yes" ]; then set -x; fi
|
# if [ "$VERBOSE" == "yes" ]; then set -x; fi
|
||||||
|
|
||||||
NET_STRING="-net0 name=eth0,bridge=${BRG:-vmbr0}"
|
NET_STRING="-net0 name=eth0,bridge=${BRG:-vmbr0}"
|
||||||
|
if [[ -n "${var_sdn_vnet:-${SDN_VNET:-}}" ]]; then
|
||||||
|
NET_STRING="-net0 name=eth0,vnet=${var_sdn_vnet:-$SDN_VNET}"
|
||||||
|
fi
|
||||||
|
|
||||||
# MAC
|
# MAC
|
||||||
if [[ -n "$MAC" ]]; then
|
if [[ -n "$MAC" ]]; then
|
||||||
@@ -5596,10 +5636,10 @@ check_storage_health() {
|
|||||||
|
|
||||||
[[ -z "$total_kb" || "$total_kb" == "0" || -z "$avail_kb" ]] && return 0
|
[[ -z "$total_kb" || "$total_kb" == "0" || -z "$avail_kb" ]] && return 0
|
||||||
|
|
||||||
used_pct=$(( (total_kb - avail_kb) * 100 / total_kb ))
|
used_pct=$(((total_kb - avail_kb) * 100 / total_kb))
|
||||||
free_gb_fmt=$(numfmt --to=iec --from-unit=1024 --suffix=B --format %.1f "$avail_kb" 2>/dev/null || echo "${avail_kb}KB")
|
free_gb_fmt=$(numfmt --to=iec --from-unit=1024 --suffix=B --format %.1f "$avail_kb" 2>/dev/null || echo "${avail_kb}KB")
|
||||||
|
|
||||||
if (( used_pct >= 95 )); then
|
if ((used_pct >= 95)); then
|
||||||
msg_warn "Storage '${storage}' (${storage_type}) is ${used_pct}% full (${free_gb_fmt} free)"
|
msg_warn "Storage '${storage}' (${storage_type}) is ${used_pct}% full (${free_gb_fmt} free)"
|
||||||
if ! is_unattended && command -v whiptail >/dev/null 2>&1 && [[ -t 0 ]]; then
|
if ! is_unattended && command -v whiptail >/dev/null 2>&1 && [[ -t 0 ]]; then
|
||||||
if ! whiptail --backtitle "Proxmox VE Helper Scripts" \
|
if ! whiptail --backtitle "Proxmox VE Helper Scripts" \
|
||||||
@@ -5608,11 +5648,11 @@ check_storage_health() {
|
|||||||
msg_error "Installation cancelled – storage nearly full"
|
msg_error "Installation cancelled – storage nearly full"
|
||||||
exit 214
|
exit 214
|
||||||
fi
|
fi
|
||||||
elif (( used_pct >= 98 )); then
|
elif ((used_pct >= 98)); then
|
||||||
msg_error "Storage '${storage}' is ${used_pct}% full – refusing install in unattended mode"
|
msg_error "Storage '${storage}' is ${used_pct}% full – refusing install in unattended mode"
|
||||||
exit 214
|
exit 214
|
||||||
fi
|
fi
|
||||||
elif (( used_pct >= 85 )); then
|
elif ((used_pct >= 85)); then
|
||||||
msg_warn "Storage '${storage}' (${storage_type}) is ${used_pct}% full (${free_gb_fmt} free)"
|
msg_warn "Storage '${storage}' (${storage_type}) is ${used_pct}% full (${free_gb_fmt} free)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -5951,17 +5991,17 @@ create_lxc_container() {
|
|||||||
# Maps OS type + version to the release variant name used by ARM64 template sources.
|
# Maps OS type + version to the release variant name used by ARM64 template sources.
|
||||||
arm64_template_variant() {
|
arm64_template_variant() {
|
||||||
case "$1:$2" in
|
case "$1:$2" in
|
||||||
debian:12) echo "bookworm" ;;
|
debian:12) echo "bookworm" ;;
|
||||||
debian:13) echo "trixie" ;;
|
debian:13) echo "trixie" ;;
|
||||||
debian:) echo "$DEBIAN_DEFAULT_CODENAME" ;;
|
debian:) echo "$DEBIAN_DEFAULT_CODENAME" ;;
|
||||||
|
|
||||||
ubuntu:24.04) echo "noble" ;;
|
ubuntu:24.04) echo "noble" ;;
|
||||||
ubuntu:26.04) echo "questing" ;;
|
ubuntu:26.04) echo "questing" ;;
|
||||||
ubuntu:) echo "$UBUNTU_DEFAULT_CODENAME" ;;
|
ubuntu:) echo "$UBUNTU_DEFAULT_CODENAME" ;;
|
||||||
|
|
||||||
alpine:*) echo "${2:-$ALPINE_DEFAULT_VERSION}" ;;
|
alpine:*) echo "${2:-$ALPINE_DEFAULT_VERSION}" ;;
|
||||||
|
|
||||||
*) return 1 ;;
|
*) return 1 ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user