Compare commits

..

1 Commits

Author SHA1 Message Date
Sam Heinz b1eec90772 add helper function for get_arch_value 2026-06-12 20:02:52 +10:00
56 changed files with 566 additions and 1151 deletions
-127
View File
@@ -1,130 +1,3 @@
## 2026-06-13
### 🆕 New Scripts
- BookOrbit ([#15080](https://github.com/community-scripts/ProxmoxVE/pull/15080))
### 🚀 Updated Scripts
- Update authentik version to 2026.5.3 [@thieneret](https://github.com/thieneret) ([#15093](https://github.com/community-scripts/ProxmoxVE/pull/15093))
- #### 🐞 Bug Fixes
- Immich: Update image-processing libraries [@vhsdream](https://github.com/vhsdream) ([#15082](https://github.com/community-scripts/ProxmoxVE/pull/15082))
- HomeBox: Support v0.26.0 [@tomfrenzel](https://github.com/tomfrenzel) ([#15086](https://github.com/community-scripts/ProxmoxVE/pull/15086))
- #### 🔧 Refactor
- Refactor: Implement backup functions for scripts A-B [@tremor021](https://github.com/tremor021) ([#15075](https://github.com/community-scripts/ProxmoxVE/pull/15075))
## 2026-06-12
### 🆕 New Scripts
- Twenty ([#15047](https://github.com/community-scripts/ProxmoxVE/pull/15047))
- Alpine-Cinny ([#15044](https://github.com/community-scripts/ProxmoxVE/pull/15044))
### 💾 Core
- #### ✨ New Features
- [core] Implement backup and restore functions [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#15067](https://github.com/community-scripts/ProxmoxVE/pull/15067))
## 2026-06-11
### 🆕 New Scripts
- Clickhouse ([#15045](https://github.com/community-scripts/ProxmoxVE/pull/15045))
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Manyfold: add new dependency [@MickLesk](https://github.com/MickLesk) ([#15040](https://github.com/community-scripts/ProxmoxVE/pull/15040))
- OpenArchiver: switch Rebuild Function [@MickLesk](https://github.com/MickLesk) ([#15042](https://github.com/community-scripts/ProxmoxVE/pull/15042))
- CLIProxyAPI: Save management password to creds file [@tremor021](https://github.com/tremor021) ([#15051](https://github.com/community-scripts/ProxmoxVE/pull/15051))
- Jotty: Fix wrong path test in config restore [@vhsdream](https://github.com/vhsdream) ([#15038](https://github.com/community-scripts/ProxmoxVE/pull/15038))
- Fix for cross-seed after node upgrade [@TorinFrancis](https://github.com/TorinFrancis) ([#15025](https://github.com/community-scripts/ProxmoxVE/pull/15025))
- #### 🔧 Refactor
- Alpine-Nextcloud: Upgrade PHP and dependencies in installation script [@MickLesk](https://github.com/MickLesk) ([#15039](https://github.com/community-scripts/ProxmoxVE/pull/15039))
- [arm64] porting stage 1: set script arm64 statuses to yes [@asylumexp](https://github.com/asylumexp) ([#15052](https://github.com/community-scripts/ProxmoxVE/pull/15052))
### 💾 Core
- #### ✨ New Features
- misc scripts: add support for arm64 [@asylumexp](https://github.com/asylumexp) ([#12639](https://github.com/community-scripts/ProxmoxVE/pull/12639))
- #### 🔧 Refactor
- [arm64] remove logic for custom debian arm64 template [@asylumexp](https://github.com/asylumexp) ([#15050](https://github.com/community-scripts/ProxmoxVE/pull/15050))
### 📚 Documentation
- (github): Revise script request template [@MickLesk](https://github.com/MickLesk) ([#15058](https://github.com/community-scripts/ProxmoxVE/pull/15058))
## 2026-06-10
### 🆕 New Scripts
- Baserow ([#14968](https://github.com/community-scripts/ProxmoxVE/pull/14968))
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Koillection: Fix update procedure [@tremor021](https://github.com/tremor021) ([#15033](https://github.com/community-scripts/ProxmoxVE/pull/15033))
## 2026-06-09
### 🆕 New Scripts
- paperclip ([#14990](https://github.com/community-scripts/ProxmoxVE/pull/14990))
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- endurain: Install pytz package during backend setup [@MickLesk](https://github.com/MickLesk) ([#15014](https://github.com/community-scripts/ProxmoxVE/pull/15014))
- #### 🔧 Refactor
- Refactor: Proxmox Backup Server - use deb822 [@MickLesk](https://github.com/MickLesk) ([#15013](https://github.com/community-scripts/ProxmoxVE/pull/15013))
## 2026-06-08
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- security: Fix HTTP to HTTPS for all package and repository downloads [@MickLesk](https://github.com/MickLesk) ([#15009](https://github.com/community-scripts/ProxmoxVE/pull/15009))
- homelable: preserve MCP server config across updates [@ferr079](https://github.com/ferr079) ([#14996](https://github.com/community-scripts/ProxmoxVE/pull/14996))
- changedetection: migrate Python install to uv venv [@ferr079](https://github.com/ferr079) ([#14995](https://github.com/community-scripts/ProxmoxVE/pull/14995))
- #### 🔧 Refactor
- Update Flowwiseai to node 24 [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#14999](https://github.com/community-scripts/ProxmoxVE/pull/14999))
### 🧰 Tools
- #### 🐞 Bug Fixes
- security: Fix MITM RCE vulnerability in microcode scripts (CVE) [@MickLesk](https://github.com/MickLesk) ([#15007](https://github.com/community-scripts/ProxmoxVE/pull/15007))
## 2026-06-07
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Immich: use actual installed PostgreSQL version for vchord package [@MickLesk](https://github.com/MickLesk) ([#14989](https://github.com/community-scripts/ProxmoxVE/pull/14989))
- #### 🔧 Refactor
- Navidrome: remove genereic filebrowser addon setup [@MickLesk](https://github.com/MickLesk) ([#14991](https://github.com/community-scripts/ProxmoxVE/pull/14991))
## 2026-06-06
### 🆕 New Scripts
+122 -56
View File
@@ -62,9 +62,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
@@ -78,7 +75,7 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
<details>
<summary><h4>June (13 entries)</h4></summary>
<summary><h4>June (6 entries)</h4></summary>
[View June 2026 Changelog](.github/changelogs/2026/06.md)
@@ -483,57 +480,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
</details>
## 2026-06-15
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Vaultwarden: extend version check for VaultWarden update [@MickLesk](https://github.com/MickLesk) ([#15105](https://github.com/community-scripts/ProxmoxVE/pull/15105))
### 💾 Core
- #### ✨ New Features
- tools.func: extend mesa-vulkan-drivers and vulkan-tools to installation for ARC GPU's [@MickLesk](https://github.com/MickLesk) ([#15106](https://github.com/community-scripts/ProxmoxVE/pull/15106))
- #### 🔧 Refactor
- core: improve mirror selection and error handling [@MickLesk](https://github.com/MickLesk) ([#15108](https://github.com/community-scripts/ProxmoxVE/pull/15108))
- core: implement gateway validation for DHCP and static networks [@MickLesk](https://github.com/MickLesk) ([#15107](https://github.com/community-scripts/ProxmoxVE/pull/15107))
## 2026-06-14
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Iinvoiceninja: fix nginx setup assets port [@MickLesk](https://github.com/MickLesk) ([#15090](https://github.com/community-scripts/ProxmoxVE/pull/15090))
- CheckMK: remove stale backup site before creating new backup during update [@MickLesk](https://github.com/MickLesk) ([#15088](https://github.com/community-scripts/ProxmoxVE/pull/15088))
- #### 🔧 Refactor
- Refactor: Implement backup functions for scripts C-D [@tremor021](https://github.com/tremor021) ([#15096](https://github.com/community-scripts/ProxmoxVE/pull/15096))
## 2026-06-13
### 🆕 New Scripts
- BookOrbit ([#15080](https://github.com/community-scripts/ProxmoxVE/pull/15080))
### 🚀 Updated Scripts
- Update authentik version to 2026.5.3 [@thieneret](https://github.com/thieneret) ([#15093](https://github.com/community-scripts/ProxmoxVE/pull/15093))
- #### 🐞 Bug Fixes
- Immich: Update image-processing libraries [@vhsdream](https://github.com/vhsdream) ([#15082](https://github.com/community-scripts/ProxmoxVE/pull/15082))
- HomeBox: Support v0.26.0 [@tomfrenzel](https://github.com/tomfrenzel) ([#15086](https://github.com/community-scripts/ProxmoxVE/pull/15086))
- #### 🔧 Refactor
- Refactor: Implement backup functions for scripts A-B [@tremor021](https://github.com/tremor021) ([#15075](https://github.com/community-scripts/ProxmoxVE/pull/15075))
## 2026-06-12
### 🆕 New Scripts
@@ -1084,4 +1030,124 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
- #### 🐞 Bug Fixes
- core: fall back to silent mode when no TTY or whiptail unavailable [@MickLesk](https://github.com/MickLesk) ([#14497](https://github.com/community-scripts/ProxmoxVE/pull/14497))
- core: fall back to silent mode when no TTY or whiptail unavailable [@MickLesk](https://github.com/MickLesk) ([#14497](https://github.com/community-scripts/ProxmoxVE/pull/14497))
## 2026-05-14
### 🆕 New Scripts
- CLIProxyAPI ([#14443](https://github.com/community-scripts/ProxmoxVE/pull/14443))
## 2026-05-13
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Fix: Broken Manifold update [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#14468](https://github.com/community-scripts/ProxmoxVE/pull/14468))
- SoulSync: Fix update function [@tremor021](https://github.com/tremor021) ([#14465](https://github.com/community-scripts/ProxmoxVE/pull/14465))
- Reactive-Resume: fix PDF generation timeout in LXC containers [@MickLesk](https://github.com/MickLesk) ([#14416](https://github.com/community-scripts/ProxmoxVE/pull/14416))
- (calibre-web) Add --no-sandbox for PDF conversion [@jamesmyatt](https://github.com/jamesmyatt) ([#14461](https://github.com/community-scripts/ProxmoxVE/pull/14461))
### 💾 Core
- #### 🔧 Refactor
- tools.func: encode GitHub tag, refine pin logic, add Codeberg [@MickLesk](https://github.com/MickLesk) ([#14473](https://github.com/community-scripts/ProxmoxVE/pull/14473))
## 2026-05-12
### 🆕 New Scripts
- DocuSeal ([#14445](https://github.com/community-scripts/ProxmoxVE/pull/14445))
- Authentik ([#14440](https://github.com/community-scripts/ProxmoxVE/pull/14440))
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Save Omada version [@lucacome](https://github.com/lucacome) ([#14433](https://github.com/community-scripts/ProxmoxVE/pull/14433))
- #### ✨ New Features
- OpenCloud: bump version to 6.2.0 [@vhsdream](https://github.com/vhsdream) ([#14451](https://github.com/community-scripts/ProxmoxVE/pull/14451))
- #### 🔧 Refactor
- misc: bump node versions [@CrazyWolf13](https://github.com/CrazyWolf13) ([#14447](https://github.com/community-scripts/ProxmoxVE/pull/14447))
## 2026-05-11
### 🆕 New Scripts
- Lychee ([#14424](https://github.com/community-scripts/ProxmoxVE/pull/14424))
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Termix: fix nginx pid path and log paths on update (#) [@MickLesk](https://github.com/MickLesk) ([#14419](https://github.com/community-scripts/ProxmoxVE/pull/14419))
- Nginxproxymanager: restore NPM nginx.conf after OpenResty rebuid [@MickLesk](https://github.com/MickLesk) ([#14421](https://github.com/community-scripts/ProxmoxVE/pull/14421))
- #### 🔧 Refactor
- InvestBrain: add commented reverse proxy config hints to .env [@MickLesk](https://github.com/MickLesk) ([#14422](https://github.com/community-scripts/ProxmoxVE/pull/14422))
### 🧰 Tools
- #### 🐞 Bug Fixes
- Cronmaster: fix unexpected EOF in update_cronmaster script [@MickLesk](https://github.com/MickLesk) ([#14420](https://github.com/community-scripts/ProxmoxVE/pull/14420))
## 2026-05-10
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Save Beszel version [@lucacome](https://github.com/lucacome) ([#14389](https://github.com/community-scripts/ProxmoxVE/pull/14389))
- karakeep: Fix SERVER_VERSION update [@MickLesk](https://github.com/MickLesk) ([#14378](https://github.com/community-scripts/ProxmoxVE/pull/14378))
- inspIRCd: Fix service not autostarting [@tremor021](https://github.com/tremor021) ([#14368](https://github.com/community-scripts/ProxmoxVE/pull/14368))
- #### 🔧 Refactor
- refactor: webcheck [@CrazyWolf13](https://github.com/CrazyWolf13) ([#14391](https://github.com/community-scripts/ProxmoxVE/pull/14391))
### 💾 Core
- #### 🐞 Bug Fixes
- [tools.func]: Pin `pnpm` version [@tremor021](https://github.com/tremor021) ([#14386](https://github.com/community-scripts/ProxmoxVE/pull/14386))
## 2026-05-09
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- FlowiseAI: Migrate to pnpm [@MickLesk](https://github.com/MickLesk) ([#14344](https://github.com/community-scripts/ProxmoxVE/pull/14344))
- Purge openresty [@lucacome](https://github.com/lucacome) ([#14353](https://github.com/community-scripts/ProxmoxVE/pull/14353))
- Check for release for Sonarr [@lucacome](https://github.com/lucacome) ([#14354](https://github.com/community-scripts/ProxmoxVE/pull/14354))
- fix(termix-install.sh): add tmpfiles.d persistence and systemd PIDFile path [@runnylogan](https://github.com/runnylogan) ([#14350](https://github.com/community-scripts/ProxmoxVE/pull/14350))
- ERPNext: start bench Redis services before bench new-site [@MickLesk](https://github.com/MickLesk) ([#14343](https://github.com/community-scripts/ProxmoxVE/pull/14343))
- [Hotfix]Jotty: use absolute path when creating data dir [@vhsdream](https://github.com/vhsdream) ([#14355](https://github.com/community-scripts/ProxmoxVE/pull/14355))
## 2026-05-08
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- wishlist: pin pnpm to v10 to match engine requirements [@MickLesk](https://github.com/MickLesk) ([#14342](https://github.com/community-scripts/ProxmoxVE/pull/14342))
- [pelican] fix env copy regression [@LetterN](https://github.com/LetterN) ([#14328](https://github.com/community-scripts/ProxmoxVE/pull/14328))
- fix(homepage): fix ERR_PNPM_IGNORED_BUILDS error [@Sergih28](https://github.com/Sergih28) ([#14315](https://github.com/community-scripts/ProxmoxVE/pull/14315))
- #### ✨ New Features
- tools.func: add setup_nltk as new function [@MickLesk](https://github.com/MickLesk) ([#14314](https://github.com/community-scripts/ProxmoxVE/pull/14314))
### 💾 Core
- #### 🐞 Bug Fixes
- tools.func: fix meilisearch import-dump background process handling [@MickLesk](https://github.com/MickLesk) ([#14341](https://github.com/community-scripts/ProxmoxVE/pull/14341))
+6 -10
View File
@@ -35,10 +35,8 @@ function update_script() {
$STD apt -y upgrade
msg_info "Creating Backup"
create_backup \
/opt/2fauth/.env \
/opt/2fauth/storage
rm -rf /opt/2fauth-backup
mv /opt/2fauth /opt/2fauth-backup
if ! dpkg -l | grep -q 'php8.4'; then
cp /etc/nginx/conf.d/2fauth.conf /etc/nginx/conf.d/2fauth.conf.bak
fi
@@ -48,13 +46,11 @@ function update_script() {
PHP_VERSION="8.4" PHP_FPM="YES" setup_php
sed -i 's/php8\.[0-9]/php8.4/g' /etc/nginx/conf.d/2fauth.conf
fi
fetch_and_deploy_gh_release "2fauth" "Bubka/2FAuth" "tarball"
setup_composer
restore_backup
msg_info "Configuring 2FAuth"
cd /opt/2fauth
cp /opt/2fauth-backup/.env /opt/2fauth/.env
cp -r /opt/2fauth-backup/storage /opt/2fauth/storage
cd /opt/2fauth || return
export COMPOSER_ALLOW_SUPERUSER=1
$STD composer install --no-dev --prefer-dist
php artisan 2fauth:install
@@ -62,7 +58,7 @@ function update_script() {
chmod -R 755 /opt/2fauth
$STD systemctl restart php8.4-fpm
$STD systemctl restart nginx
msg_ok "Configured 2FAuth"
rm -rf /opt/2fauth-backup
msg_ok "Updated successfully!"
fi
exit
+10 -6
View File
@@ -35,8 +35,10 @@ function update_script() {
systemctl stop adventurelog-frontend
msg_ok "Services Stopped"
create_backup /opt/adventurelog/backend/server/.env \
/opt/adventurelog/backend/server/media
msg_info "Backup Old Installation"
cp -r /opt/adventurelog /opt/adventurelog-backup
rm -rf /opt/adventurelog
msg_ok "Backup done"
fetch_and_deploy_gh_release "adventurelog" "seanmorley15/adventurelog" "tarball"
PYTHON_VERSION="3.13" setup_uv
@@ -45,9 +47,9 @@ function update_script() {
$STD sudo -u postgres psql -d adventurelog_db -c "CREATE EXTENSION IF NOT EXISTS postgis;"
msg_ok "PostgreSQL Extensions Ready"
restore_backup
msg_info "Updating AdventureLog"
msg_info "Updating ${APP}"
cp /opt/adventurelog-backup/backend/server/.env /opt/adventurelog/backend/server/.env
cp -r /opt/adventurelog-backup/backend/server/media /opt/adventurelog/backend/server/media
cd /opt/adventurelog/backend/server
if [[ ! -x .venv/bin/python ]]; then
$STD uv venv --clear .venv
@@ -59,10 +61,12 @@ function update_script() {
$STD .venv/bin/python -m manage collectstatic --noinput
$STD .venv/bin/python -m manage migrate
cp /opt/adventurelog-backup/frontend/.env /opt/adventurelog/frontend/.env
cd /opt/adventurelog/frontend
$STD pnpm i
$STD pnpm build
msg_ok "Updated AdventureLog"
rm -rf /opt/adventurelog-backup
msg_ok "Updated ${APP}"
msg_info "Starting Services"
systemctl daemon-reexec
+13 -5
View File
@@ -34,16 +34,24 @@ function update_script() {
systemctl stop apache2
msg_ok "Stopped Service"
create_backup /opt/ampache/config/ampache.cfg.php \
/opt/ampache/public/rest/.htaccess \
/opt/ampache/public/play/.htaccess \
/opt/ampache/advanced-config
msg_info "Creating Backup"
cp /opt/ampache/config/ampache.cfg.php /tmp/ampache.cfg.php.backup
cp /opt/ampache/public/rest/.htaccess /tmp/ampache_rest.htaccess.backup
cp /opt/ampache/public/play/.htaccess /tmp/ampache_play.htaccess.backup
rm -rf /opt/ampache_backup
mv /opt/ampache /opt/ampache_backup
msg_ok "Created Backup"
fetch_and_deploy_gh_release "Ampache" "ampache/ampache" "prebuild" "latest" "/opt/ampache" "ampache-*_all_php8.4.zip"
restore_backup
msg_info "Restoring Backup"
cp /tmp/ampache.cfg.php.backup /opt/ampache/config/ampache.cfg.php
cp /tmp/ampache_rest.htaccess.backup /opt/ampache/public/rest/.htaccess
cp /tmp/ampache_play.htaccess.backup /opt/ampache/public/play/.htaccess
chmod 664 /opt/ampache/public/rest/.htaccess /opt/ampache/public/play/.htaccess
chown -R www-data:www-data /opt/ampache
rm -f /tmp/ampache*.backup
msg_ok "Restored Configuration"
msg_info "Starting Service"
systemctl start apache2
+5 -2
View File
@@ -35,7 +35,9 @@ function update_script() {
systemctl stop anchor-web anchor-server
msg_ok "Stopped Services"
create_backup /opt/anchor/.env
msg_info "Backing up Configuration"
cp /opt/anchor/.env /opt/anchor.env.bak
msg_ok "Backed up Configuration"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "anchor" "ZhFahim/anchor" "tarball"
@@ -55,7 +57,8 @@ function update_script() {
cp -r public .next/standalone/public
msg_ok "Built Web Interface"
restore_backup
cp /opt/anchor.env.bak /opt/anchor/.env
rm -f /opt/anchor.env.bak
msg_info "Running Database Migrations"
cd /opt/anchor/server
+7 -2
View File
@@ -36,12 +36,17 @@ function update_script() {
systemctl stop anytype
msg_ok "Stopped Service"
create_backup /opt/anytype/data
msg_info "Backing up Data"
cp -r /opt/anytype/data /opt/anytype_data_backup
msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "anytype" "grishy/any-sync-bundle" "prebuild" "latest" "/opt/anytype" "any-sync-bundle_*_linux_amd64.tar.gz"
chmod +x /opt/anytype/any-sync-bundle
restore_backup
msg_info "Restoring Data"
cp -r /opt/anytype_data_backup/. /opt/anytype/data
rm -rf /opt/anytype_data_backup
msg_ok "Restored Data"
msg_info "Starting Service"
systemctl start anytype
+12 -8
View File
@@ -26,26 +26,26 @@ function update_script() {
check_container_resources
TOMCAT_DIR=$(ls -d /opt/tomcat-* 2>/dev/null | head -n1)
if [[ -z $TOMCAT_DIR || ! -d $TOMCAT_DIR ]]; then
if [[ -z "$TOMCAT_DIR" || ! -d "$TOMCAT_DIR" ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
# Detect major version and current version from install path (e.g., /opt/tomcat-11 -> 11)
TOMCAT_MAJOR=$(basename "$TOMCAT_DIR" | grep -oP 'tomcat-\K[0-9]+')
if [[ -z $TOMCAT_MAJOR ]]; then
if [[ -z "$TOMCAT_MAJOR" ]]; then
msg_error "Cannot determine Tomcat major version from path: $TOMCAT_DIR"
exit
fi
CURRENT_VERSION=$(grep -oP 'Apache Tomcat Version \K[0-9.]+' "$TOMCAT_DIR/RELEASE-NOTES" 2>/dev/null || echo "unknown")
LATEST_VERSION=$(curl -fsSL "https://dlcdn.apache.org/tomcat/tomcat-${TOMCAT_MAJOR}/" | grep -oP 'v[0-9]+\.[0-9]+\.[0-9]+(-M[0-9]+)?/' | sort -V | tail -n1 | sed 's/\/$//; s/v//')
if [[ -z $LATEST_VERSION ]]; then
if [[ -z "$LATEST_VERSION" ]]; then
msg_error "Failed to fetch latest version for Tomcat ${TOMCAT_MAJOR}"
exit
fi
if [[ $CURRENT_VERSION == "$LATEST_VERSION" ]]; then
if [[ "$CURRENT_VERSION" == "$LATEST_VERSION" ]]; then
msg_ok "${APP} ${CURRENT_VERSION} is already up to date"
exit
fi
@@ -54,9 +54,13 @@ function update_script() {
systemctl stop tomcat
msg_ok "Stopped Tomcat service"
create_backup $TOMCAT_DIR/conf
[[ -d $TOMCAT_DIR/webapps ]] && create_backup $TOMCAT_DIR/webapps
[[ -d $TOMCAT_DIR/lib ]] && create_backup $TOMCAT_DIR/lib
msg_info "Backing up configuration and applications"
BACKUP_DIR="/tmp/tomcat-backup-$$"
mkdir -p "$BACKUP_DIR"
cp -a "$TOMCAT_DIR/conf" "$BACKUP_DIR/conf"
cp -a "$TOMCAT_DIR/webapps" "$BACKUP_DIR/webapps"
[[ -d "$TOMCAT_DIR/lib" ]] && cp -a "$TOMCAT_DIR/lib" "$BACKUP_DIR/lib"
msg_ok "Backed up configuration and applications"
msg_info "Downloading Tomcat ${LATEST_VERSION}"
TOMCAT_URL="https://dlcdn.apache.org/tomcat/tomcat-${TOMCAT_MAJOR}/v${LATEST_VERSION}/bin/apache-tomcat-${LATEST_VERSION}.tar.gz"
@@ -74,7 +78,7 @@ function update_script() {
cp -a "$BACKUP_DIR/webapps"/* "$TOMCAT_DIR/webapps/" 2>/dev/null || true
if [[ -d "$BACKUP_DIR/lib" ]]; then
for jar in "$BACKUP_DIR/lib"/*.jar; do
[[ -f $jar ]] || continue
[[ -f "$jar" ]] || continue
jar_name=$(basename "$jar")
if [[ ! -f "$TOMCAT_DIR/lib/$jar_name" ]]; then
cp "$jar" "$TOMCAT_DIR/lib/"
+1 -1
View File
@@ -42,7 +42,7 @@ function update_script() {
RUST_PROFILE="minimal" RUST_TOOLCHAIN="stable" setup_rust
setup_yq
AUTHENTIK_VERSION="version/2026.5.3"
AUTHENTIK_VERSION="version/2026.5.2"
# Source: https://github.com/goauthentik/fips/blob/main/Makefile#L26
XMLSEC_VERSION="1.3.11"
+2 -3
View File
@@ -37,17 +37,16 @@ function update_script() {
systemctl stop uwsgi
msg_ok "Services Stopped"
create_backup /opt/babybuddy/babybuddy/settings/production.py
msg_info "Cleaning old files"
cp /opt/babybuddy/babybuddy/settings/production.py /tmp/production.py.bak
find . -mindepth 1 -maxdepth 1 ! -name '.venv' -exec rm -rf {} +
msg_ok "Cleaned old files"
fetch_and_deploy_gh_release "babybuddy" "babybuddy/babybuddy" "tarball"
restore_backup
msg_info "Updating ${APP}"
cd /opt/babybuddy
mv /tmp/production.py.bak /opt/babybuddy/babybuddy/settings/production.py
source .venv/bin/activate
$STD uv pip install -r requirements.txt
export DJANGO_SETTINGS_MODULE=babybuddy.settings.production
+8 -5
View File
@@ -34,19 +34,22 @@ function update_script() {
systemctl stop apache2
msg_ok "Stopped Service"
create_backup /opt/baikal/config/baikal.yaml \
/opt/baikal/Specific/
msg_info "Backing up data"
mv /opt/baikal /opt/baikal-backup
msg_ok "Backed up data"
PHP_APACHE="YES" PHP_VERSION="8.3" setup_php
setup_composer
fetch_and_deploy_gh_release "baikal" "sabre-io/Baikal" "tarball"
restore_backup
chown -R www-data:www-data /opt/baikal/
chmod -R 755 /opt/baikal/
msg_info "Configuring Baikal"
cp -r /opt/baikal-backup/config/baikal.yaml /opt/baikal/config/
cp -r /opt/baikal-backup/Specific/ /opt/baikal/
chown -R www-data:www-data /opt/baikal/
chmod -R 755 /opt/baikal/
cd /opt/baikal
$STD composer install
rm -rf /opt/baikal-backup
msg_ok "Configured Baikal"
msg_info "Starting Service"
+18 -6
View File
@@ -38,11 +38,11 @@ function update_script() {
msg_ok "Stopped Service"
msg_info "Backing up Configuration and Data"
create_backup /opt/bambuddy/.env \
/opt/bambuddy/data \
/opt/bambuddy/bambuddy.db \
/opt/bambuddy/bambutrack.db \
/opt/bambuddy/archive
cp /opt/bambuddy/.env /opt/bambuddy.env.bak
cp -r /opt/bambuddy/data /opt/bambuddy_data_bak
[[ -f /opt/bambuddy/bambuddy.db ]] && cp /opt/bambuddy/bambuddy.db /opt/bambuddy.db.bak
[[ -f /opt/bambuddy/bambutrack.db ]] && cp /opt/bambuddy/bambutrack.db /opt/bambutrack.db.bak
[[ -d /opt/bambuddy/archive ]] && cp -r /opt/bambuddy/archive /opt/bambuddy_archive_bak
msg_ok "Backed up Configuration and Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "bambuddy" "maziggy/bambuddy" "tarball" "latest" "/opt/bambuddy"
@@ -59,7 +59,19 @@ function update_script() {
$STD npm run build
msg_ok "Rebuilt Frontend"
restore_backup
msg_info "Restoring Configuration and Data"
mkdir -p /opt/bambuddy/data
cp /opt/bambuddy.env.bak /opt/bambuddy/.env
cp -r /opt/bambuddy_data_bak/. /opt/bambuddy/data/
[[ -f /opt/bambuddy.db.bak ]] && cp /opt/bambuddy.db.bak /opt/bambuddy/bambuddy.db
[[ -f /opt/bambutrack.db.bak ]] && cp /opt/bambutrack.db.bak /opt/bambuddy/bambutrack.db
if [[ -d /opt/bambuddy_archive_bak ]]; then
mkdir -p /opt/bambuddy/archive
cp -r /opt/bambuddy_archive_bak/. /opt/bambuddy/archive/
fi
rm -f /opt/bambuddy.env.bak /opt/bambuddy.db.bak /opt/bambutrack.db.bak
rm -rf /opt/bambuddy_data_bak /opt/bambuddy_archive_bak
msg_ok "Restored Configuration and Data"
msg_info "Starting Service"
systemctl start bambuddy
+15 -11
View File
@@ -37,15 +37,16 @@ function update_script() {
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="pdo-sqlite" setup_php
create_backup /opt/bar-assistant/.env \
/opt/bar-assistant/storage/bar-assistant
msg_info "Backing up Bar Assistant"
mv /opt/bar-assistant /opt/bar-assistant-backup
msg_ok "Backed up Bar Assistant"
fetch_and_deploy_gh_release "bar-assistant" "karlomikus/bar-assistant" "tarball" "latest" "/opt/bar-assistant"
setup_composer
restore_backup
msg_info "Configuring Bar-Assistant"
msg_info "Updating Bar-Assistant"
cp -r /opt/bar-assistant-backup/.env /opt/bar-assistant/.env
cp -r /opt/bar-assistant-backup/storage/bar-assistant /opt/bar-assistant/storage/bar-assistant
cd /opt/bar-assistant
$STD composer install --no-interaction
$STD php artisan migrate --force
@@ -56,7 +57,8 @@ function update_script() {
$STD php artisan route:cache
$STD php artisan event:cache
chown -R www-data:www-data /opt/bar-assistant
msg_ok "Configured Bar-Assistant"
rm -rf /opt/bar-assistant-backup
msg_ok "Updated Bar-Assistant"
msg_info "Starting nginx"
systemctl start nginx
@@ -64,21 +66,23 @@ function update_script() {
fi
if check_for_gh_release "vue-salt-rim" "karlomikus/vue-salt-rim"; then
create_backup /opt/vue-salt-rim/public/config.js
msg_info "Backing up Vue Salt Rim"
mv /opt/vue-salt-rim /opt/vue-salt-rim-backup
msg_ok "Backed up Vue Salt Rim"
msg_info "Stopping nginx"
systemctl stop nginx
msg_ok "Stopped nginx"
fetch_and_deploy_gh_release "vue-salt-rim" "karlomikus/vue-salt-rim" "tarball" "latest" "/opt/vue-salt-rim"
restore_backup
msg_info "Configuring Vue Salt Rim"
msg_info "Updating Vue Salt Rim"
cp /opt/vue-salt-rim-backup/public/config.js /opt/vue-salt-rim/public/config.js
cd /opt/vue-salt-rim
$STD npm install
$STD npm run build
msg_ok "Configured Vue Salt Rim"
rm -rf /opt/vue-salt-rim-backup
msg_ok "Updated Vue Salt Rim"
msg_info "Starting nginx"
systemctl start nginx
+14 -7
View File
@@ -35,20 +35,27 @@ function update_script() {
systemctl stop baserow-backend baserow-celery baserow-celery-beat baserow-celery-export baserow-frontend
msg_ok "Stopped Services"
create_backup /opt/baserow/.env
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "baserow" "baserow/baserow" "tarball"
restore_backup
msg_info "Backing up Data"
cp /opt/baserow/.env /opt/baserow.env.bak
msg_ok "Backed up Data"
msg_info "Configuring Baserow"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "baserow" "baserow/baserow" "tarball"
msg_info "Restoring Configuration"
cp /opt/baserow.env.bak /opt/baserow/.env
rm -f /opt/baserow.env.bak
msg_ok "Restored Configuration"
msg_info "Updating Backend Dependencies"
cd /opt/baserow/backend
$STD uv sync --frozen --no-dev
msg_ok "Configured Baserow"
msg_ok "Updated Backend Dependencies"
msg_info "Rebuilding Frontend"
msg_info "Updating Frontend"
cd /opt/baserow/web-frontend
$STD npm install
$STD npm run build
msg_ok "Rebuilt Frontend"
msg_ok "Updated Frontend"
msg_info "Running Migrations"
cd /opt/baserow/backend
+12 -7
View File
@@ -36,13 +36,18 @@ function update_script() {
systemctl stop bentopdf
msg_ok "Stopped Service"
create_backup /opt/bentopdf/.env.production
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "bentopdf" "alam00000/bentopdf" "tarball" "latest" "/opt/bentopdf"
restore_backup
[[ -f /opt/bentopdf/.env.production ]] && cp /opt/bentopdf/.env.production /opt/production.env
msg_info "Configuring BentoPDF"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "bentopdf" "alam00000/bentopdf" "tarball" "latest" "/opt/bentopdf"
msg_info "Updating BentoPDF"
cd /opt/bentopdf
$STD npm ci --no-audit --no-fund
if [[ -f /opt/production.env ]]; then
mv /opt/production.env ./.env.production
else
cp ./.env.example ./.env.production
fi
export NODE_OPTIONS="--max-old-space-size=3072"
export SIMPLE_MODE=true
export VITE_USE_CDN=true
@@ -59,9 +64,9 @@ EOF
if [[ ! -f /etc/ssl/private/bentopdf-selfsigned.key || ! -f /etc/ssl/certs/bentopdf-selfsigned.crt ]]; then
CERT_CN="$(hostname -I | awk '{print $1}')"
$STD openssl req -x509 -nodes -newkey rsa:2048 -days 3650 \
-keyout /etc/ssl/private/bentopdf-selfsigned.key \
-out /etc/ssl/certs/bentopdf-selfsigned.crt \
-subj "/CN=${CERT_CN}"
-keyout /etc/ssl/private/bentopdf-selfsigned.key \
-out /etc/ssl/certs/bentopdf-selfsigned.crt \
-subj "/CN=${CERT_CN}"
fi
cat <<'EOF' >/etc/nginx/sites-available/bentopdf
server {
+7 -7
View File
@@ -35,14 +35,14 @@ function update_script() {
fi
MIGRATE_V1=0
if [[ $CURRENT_VERSION == 0.* ]]; then
if [[ "$CURRENT_VERSION" == 0.* ]]; then
MIGRATE_V1=1
DISK_USAGE=$(df / | awk 'NR==2 {print $5}' | sed 's/%//')
if [ "$DISK_USAGE" -gt 50 ]; then
echo -e "\n${RD}Warning: Less than 50% free storage remaining on the root disk.${CL}"
echo -e "${RD}Bichon v1 data migration temporarily duplicates data and requires free space for it.${CL}"
read -r -p "Are you sure you want to proceed with the update? (y/N): " proceed
if [[ ! $proceed =~ ^[Yy]$ ]]; then
if [[ ! "$proceed" =~ ^[Yy]$ ]]; then
msg_error "Update cancelled by user."
exit
fi
@@ -53,7 +53,7 @@ function update_script() {
echo -e "\n${RD}Warning: LXC has less than 2GB of RAM allocated (${RAM_TOTAL}MB).${CL}"
echo -e "${RD}Bichon v1 data migration consumes significant memory and may crash if insufficient.${CL}"
read -r -p "Are you sure you want to proceed with the update? (y/N): " proceed_ram
if [[ ! $proceed_ram =~ ^[Yy]$ ]]; then
if [[ ! "$proceed_ram" =~ ^[Yy]$ ]]; then
msg_error "Update cancelled by user."
exit
fi
@@ -65,12 +65,12 @@ function update_script() {
systemctl stop bichon
msg_ok "Stopped service"
create_backup /opt/bichon/bichon.env
cp /opt/bichon/bichon.env /tmp/bichon.env.backup
if [ "$MIGRATE_V1" -eq 1 ] && [ "$CURRENT_VERSION" != "0.3.7" ]; then
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "bichon" "rustmailer/bichon" "prebuild" "v0.3.7" "/opt/bichon" "bichon-*-x86_64-unknown-linux-gnu.tar.gz"
restore_backup
msg_info "Updating to intermediate version v0.3.7"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "bichon" "rustmailer/bichon" "prebuild" "v0.3.7" "/opt/bichon" "bichon-*-x86_64-unknown-linux-gnu.tar.gz"
cp /tmp/bichon.env.backup /opt/bichon/bichon.env
systemctl start bichon
sleep 30
systemctl stop bichon
@@ -78,7 +78,7 @@ function update_script() {
fi
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "bichon" "rustmailer/bichon" "prebuild" "latest" "/opt/bichon" "bichon-*-x86_64-unknown-linux-gnu.tar.gz"
restore_backup
cp /tmp/bichon.env.backup /opt/bichon/bichon.env
if [ "$MIGRATE_V1" -eq 1 ]; then
msg_info "Running Bichon v1 Data Migration (patience)"
+8 -6
View File
@@ -56,19 +56,21 @@ function update_script() {
bitmagnet \
>/tmp/backup.sql
mv /tmp/backup.sql /opt/
create_backup /opt/bitmagnet/.env \
/opt/bitmagnet/config.yml
[ -f /opt/bitmagnet/.env ] && cp /opt/bitmagnet/.env /opt/
[ -f /opt/bitmagnet/config.yml ] && cp /opt/bitmagnet/config.yml /opt/
msg_ok "Data backed up"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "bitmagnet" "bitmagnet-io/bitmagnet" "tarball"
restore_backup
rm -rf /opt/bitmagnet
fetch_and_deploy_gh_release "bitmagnet" "bitmagnet-io/bitmagnet" "tarball"
msg_info "Configuring Bitmagnet"
msg_info "Updating Bitmagnet"
cd /opt/bitmagnet
VREL=v$(curl -fsSL https://api.github.com/repos/bitmagnet-io/bitmagnet/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
$STD go build -ldflags "-s -w -X github.com/bitmagnet-io/bitmagnet/internal/version.GitTag=$VREL"
chmod +x bitmagnet
msg_ok "Configured Bitmagnet"
[ -f "/opt/.env" ] && cp "/opt/.env" /opt/bitmagnet/
[ -f "/opt/config.yml" ] && cp "/opt/config.yml" /opt/bitmagnet/
msg_ok "Updated Bitmagnet"
msg_info "Starting Service"
systemctl start bitmagnet-web
+8 -2
View File
@@ -33,9 +33,15 @@ function update_script() {
systemctl stop blocky
msg_ok "Stopped Service"
create_backup /opt/blocky/config.yml
msg_info "Backup Config"
mv /opt/blocky/config.yml /opt/config.yml
msg_ok "Backed Up Config"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "blocky" "0xERR0R/blocky" "prebuild" "latest" "/opt/blocky" "blocky_*_Linux_x86_64.tar.gz"
restore_backup
msg_info "Restore Config"
mv /opt/config.yml /opt/blocky/config.yml
msg_ok "Restored Config"
msg_info "Starting Service"
systemctl start blocky
-78
View File
@@ -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: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/bookorbit/bookorbit
APP="BookOrbit"
var_tags="${var_tags:-books;library;reading}"
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_arm64="${var_arm64:-no}"
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/bookorbit ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "bookorbit" "bookorbit/bookorbit"; then
msg_info "Stopping Service"
systemctl stop bookorbit
msg_ok "Stopped Service"
create_backup /opt/bookorbit/.env
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "bookorbit" "bookorbit/bookorbit" "tarball"
msg_info "Rebuilding Application"
cd /opt/bookorbit
PNPM_VERSION=$(jq -r '.packageManager | ltrimstr("pnpm@")' /opt/bookorbit/package.json)
$STD corepack enable
$STD corepack prepare "pnpm@${PNPM_VERSION}" --activate
$STD pnpm install --frozen-lockfile
$STD pnpm --filter client run build-only
$STD pnpm --filter server run build
cp -r /opt/bookorbit/client/dist /opt/bookorbit/server/public
mkdir -p /opt/bookorbit/server/migrations
cp -r /opt/bookorbit/server/src/db/migrations/. /opt/bookorbit/server/migrations/
chmod +x /opt/bookorbit/server/bin/kepubify/*
APP_VER=$(cat ~/.bookorbit)
sed -i "s/^APP_VERSION=.*/APP_VERSION=v$APP_VER/" /opt/bookorbit/.env
msg_ok "Rebuilt Application"
msg_info "Updating Kobo Python Runtime"
$STD uv pip install --python /opt/bookorbit-python/bin/python -r /opt/bookorbit/server/requirements/kobo-cloudscraper.txt
msg_ok "Updated Kobo Python Runtime"
msg_info "Starting Service"
systemctl start bookorbit
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}:3000${CL}"
+12 -5
View File
@@ -36,14 +36,20 @@ function update_script() {
systemctl stop apache2
msg_ok "Services Stopped"
create_backup /opt/bookstack/.env \
/opt/bookstack/public/uploads \
/opt/bookstack/storage/uploads \
/opt/bookstack/themes
msg_info "Backing up data"
mv /opt/bookstack /opt/bookstack-backup
msg_ok "Backup finished"
fetch_and_deploy_gh_release "bookstack" "BookStackApp/BookStack" "tarball"
PHP_VERSION="8.3" PHP_APACHE="YES" PHP_FPM="YES" PHP_MODULE="ldap,tidy,mysqli" setup_php
setup_composer
restore_backup
msg_info "Restoring backup"
cp /opt/bookstack-backup/.env /opt/bookstack/.env
[[ -d /opt/bookstack-backup/public/uploads ]] && cp -a /opt/bookstack-backup/public/uploads/. /opt/bookstack/public/uploads/
[[ -d /opt/bookstack-backup/storage/uploads ]] && cp -a /opt/bookstack-backup/storage/uploads/. /opt/bookstack/storage/uploads/
[[ -d /opt/bookstack-backup/themes ]] && cp -a /opt/bookstack-backup/themes/. /opt/bookstack/themes/
msg_ok "Backup restored"
msg_info "Configuring BookStack"
cd /opt/bookstack
@@ -54,6 +60,7 @@ function update_script() {
chmod -R 755 /opt/bookstack /opt/bookstack/bootstrap/cache /opt/bookstack/public/uploads /opt/bookstack/storage
chmod -R 775 /opt/bookstack/storage /opt/bookstack/bootstrap/cache /opt/bookstack/public/uploads
chmod -R 640 /opt/bookstack/.env
rm -rf /opt/bookstack-backup
msg_ok "Configured BookStack"
msg_info "Starting Apache2"
+18 -3
View File
@@ -34,10 +34,25 @@ function update_script() {
systemctl stop bytestash-backend bytestash-frontend
msg_ok "Services Stopped"
[[ -d /opt/bytestash/data ]] && create_backup /opt/bytestash/data
[[ -d /opt/data ]] && create_backup /opt/data
msg_info "Backing up data"
tmp_dir="/opt/bytestash-data-backup"
mkdir -p "$tmp_dir"
if [[ -d /opt/bytestash/data ]]; then
cp -r /opt/bytestash/data "$tmp_dir"/data
elif [[ -d /opt/data ]]; then
cp -r /opt/data "$tmp_dir"/data
fi
msg_ok "Data backed up"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "bytestash" "jordan-dalby/ByteStash" "tarball"
restore_backup
msg_info "Restoring data"
if [[ -d "$tmp_dir"/data ]]; then
mkdir -p /opt/bytestash/data
cp -r "$tmp_dir"/data/* /opt/bytestash/data/
rm -rf "$tmp_dir"
fi
msg_ok "Data restored"
msg_info "Configuring ByteStash"
cd /opt/bytestash/server
+9 -3
View File
@@ -35,8 +35,10 @@ function update_script() {
systemctl stop calibre-web
msg_ok "Stopped Service"
create_backup /opt/calibre-web/app.db \
/opt/calibre-web/data
msg_info "Backing up Data"
cp -r /opt/calibre-web/app.db /opt/app.db_backup
cp -r /opt/calibre-web/data /opt/data_backup
msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "Calibre-Web" "janeczku/calibre-web" "prebuild" "latest" "/opt/calibre-web" "calibre-web*.tar.gz"
setup_uv
@@ -48,7 +50,11 @@ function update_script() {
$STD uv pip install --python /opt/calibre-web/.venv/bin/python --no-cache-dir -r requirements.txt
msg_ok "Installed Dependencies"
restore_backup
msg_info "Restoring Data"
cp /opt/app.db_backup /opt/calibre-web/app.db 2>/dev/null
cp -r /opt/data_backup /opt/calibre-web/data 2>/dev/null
rm -rf /opt/app.db_backup /opt/data_backup
msg_ok "Restored Data"
msg_info "Starting Service"
systemctl start calibre-web
+7 -2
View File
@@ -35,11 +35,16 @@ function update_script() {
systemctl stop certimate
msg_ok "Stopped Service"
create_backup /opt/certimate/pb_data
msg_info "Backing up Data"
cp -r /opt/certimate/pb_data /opt/certimate_pb_data_backup
msg_ok "Backed up Data"
fetch_and_deploy_gh_release "certimate" "certimate-go/certimate" "prebuild" "latest" "/opt/certimate" "certimate_*_linux_amd64.zip"
restore_backup
msg_info "Restoring Data"
cp -r /opt/certimate_pb_data_backup/. /opt/certimate/pb_data
rm -rf /opt/certimate_pb_data_backup
msg_ok "Restored Data"
msg_info "Starting Service"
systemctl start certimate
+8 -3
View File
@@ -35,8 +35,10 @@ function update_script() {
systemctl stop checkmate-server checkmate-client nginx
msg_ok "Stopped Services"
create_backup /opt/checkmate/server/.env \
/opt/checkmate/client/.env.local
msg_info "Backing up Data"
cp /opt/checkmate/server/.env /opt/checkmate_server.env.bak
[ -f /opt/checkmate/client/.env.local ] && cp /opt/checkmate/client/.env.local /opt/checkmate_client.env.local.bak
msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "checkmate" "bluewave-labs/Checkmate" "tarball"
@@ -54,7 +56,10 @@ function update_script() {
VITE_APP_API_BASE_URL="/api/v1" UPTIME_APP_API_BASE_URL="/api/v1" VITE_APP_LOG_LEVEL="warn" $STD npm run build
msg_ok "Updated Checkmate Client"
restore_backup
msg_info "Restoring Data"
mv /opt/checkmate_server.env.bak /opt/checkmate/server/.env
[ -f /opt/checkmate_client.env.local.bak ] && mv /opt/checkmate_client.env.local.bak /opt/checkmate/client/.env.local
msg_ok "Restored Data"
msg_info "Starting Services"
systemctl start checkmate-server checkmate-client nginx
-1
View File
@@ -33,7 +33,6 @@ function update_script() {
RELEASE="${RELEASE%%+*}"
msg_info "Updating checkmk"
$STD omd stop monitoring
$STD omd -f rm monitoringbackup 2>/dev/null || true
$STD omd cp monitoring monitoringbackup
curl_download "/opt/checkmk.deb" "https://download.checkmk.com/checkmk/${RELEASE}/check-mk-community-${RELEASE}_0.$(get_os_info codename)_amd64.deb"
$STD apt install -y /opt/checkmk.deb
+7 -2
View File
@@ -33,11 +33,16 @@ function update_script() {
systemctl stop cleanuparr
msg_ok "Stopped Service"
create_backup /opt/cleanuparr/config
msg_info "Backing up config"
cp -r /opt/cleanuparr/config /opt/cleanuparr_config_backup
msg_ok "Backed up config"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "Cleanuparr" "Cleanuparr/Cleanuparr" "prebuild" "latest" "/opt/cleanuparr" "*linux-amd64.zip"
restore_backup
msg_info "Restoring config"
[[ -d /opt/cleanuparr/config ]] && rm -rf /opt/cleanuparr/config
mv /opt/cleanuparr_config_backup /opt/cleanuparr/config
msg_ok "Restored config"
msg_info "Starting Service"
systemctl start cleanuparr
+11 -2
View File
@@ -36,11 +36,20 @@ function update_script() {
msg_ok "Stopped Service"
ensure_dependencies rsync
create_backup /opt/commafeed/data
if [ -d /opt/commafeed/data ] && [ "$(ls -A /opt/commafeed/data)" ]; then
msg_info "Backing up existing data"
mv /opt/commafeed/data /opt/data.bak
msg_ok "Backed up existing data"
fi
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "commafeed" "Athou/commafeed" "prebuild" "latest" "/opt/commafeed" "commafeed-*-h2-jvm.zip"
restore_backup
if [ -d /opt/data.bak ] && [ "$(ls -A /opt/data.bak)" ]; then
msg_info "Restoring data"
mv /opt/data.bak /opt/commafeed/data
msg_ok "Restored data"
fi
msg_info "Starting Service"
systemctl start commafeed
+4 -6
View File
@@ -33,13 +33,11 @@ function update_script() {
systemctl stop configarr-task.timer
msg_ok "Stopped Service"
create_backup /opt/configarr/config.yml \
/opt/configarr/secrets.yml \
/opt/configarr/.env
mkdir -p /opt/backup/
mv /opt/configarr/{config.yml,secrets.yml,.env} /opt/backup/
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "configarr" "raydak-labs/configarr" "prebuild" "latest" "/opt/configarr" "configarr-linux-x64.tar.xz"
restore_backup
mv /opt/backup/{config.yml,secrets.yml,.env} /opt/configarr/
rm -rf /opt/backup
msg_info "Starting Service"
systemctl start configarr-task.timer
+9 -4
View File
@@ -36,14 +36,19 @@ function update_script() {
ensure_dependencies libreoffice-writer
create_backup /opt/convertx/data
msg_info "Move data-Folder"
if [[ -d /opt/convertx/data ]]; then
mv /opt/convertx/data /opt/data
fi
msg_ok "Moved data-Folder"
fetch_and_deploy_gh_release "ConvertX" "C4illin/ConvertX" "tarball" "latest" "/opt/convertx"
restore_backup
msg_info "Updating ConvertX"
cd /opt/convertx
if [[ -d /opt/data ]]; then
mv /opt/data /opt/convertx/data
fi
cd /opt/convertx
$STD bun install
msg_ok "Updated ConvertX"
+13 -7
View File
@@ -30,17 +30,20 @@ function update_script() {
fi
RELEASE=$(curl -fsSL "https://gitlab.com/api/v4/projects/20430749/releases" | grep -o '"tag_name":"v[^"]*"' | head -n 1 | sed 's/"tag_name":"v//;s/"//')
if [[ ! -f /opt/crafty-controller_version.txt ]] || [[ ${RELEASE} != "$(cat /opt/crafty-controller_version.txt)" ]]; then
if [[ ! -f /opt/crafty-controller_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/crafty-controller_version.txt)" ]]; then
msg_info "Stopping Crafty-Controller"
systemctl stop crafty-controller
msg_ok "Stopped Crafty-Controller"
create_backup /opt/crafty-controller/crafty/crafty-4/app/config/version.json \
/opt/crafty-controller/crafty/crafty-4/app/config/credits.json \
/opt/crafty-controller/crafty/crafty-4/app/config/logging.json \
/opt/crafty-controller/crafty/crafty-4/app/config/default.json.example \
/opt/crafty-controller/crafty/crafty-4/app/config/motd_format.json
msg_info "Creating Backup of config"
cp -a /opt/crafty-controller/crafty/crafty-4/app/config/. /opt/crafty-controller/backup
rm /opt/crafty-controller/backup/version.json
rm /opt/crafty-controller/backup/credits.json
rm /opt/crafty-controller/backup/logging.json
rm /opt/crafty-controller/backup/default.json.example
rm /opt/crafty-controller/backup/motd_format.json
msg_ok "Backup Created"
msg_info "Updating Crafty-Controller to v${RELEASE}"
curl -fsSL "https://gitlab.com/crafty-controller/crafty-4/-/archive/v${RELEASE}/crafty-4-v${RELEASE}.zip" -o $(basename "https://gitlab.com/crafty-controller/crafty-4/-/archive/v${RELEASE}/crafty-4-v${RELEASE}.zip")
@@ -55,8 +58,11 @@ function update_script() {
echo "${RELEASE}" >"/opt/crafty-controller_version.txt"
msg_ok "Updated Crafty-Controller to v${RELEASE}"
restore_backup
msg_info "Restoring Backup of config"
cp -a /opt/crafty-controller/backup/. /opt/crafty-controller/crafty/crafty-4/app/config
rm -rf /opt/crafty-controller/backup
chown -R crafty:crafty /opt/crafty-controller/
msg_ok "Backup Restored"
msg_info "Starting Crafty-Controller"
systemctl start crafty-controller
+12 -9
View File
@@ -34,18 +34,21 @@ function update_script() {
systemctl stop cryptpad
msg_info "Stopped Service"
create_backup /opt/cryptpad/config/config.js \
/opt/cryptpad/blob \
/opt/cryptpad/block \
/opt/cryptpad/customize \
/opt/cryptpad/data \
/opt/cryptpad/datastore \
/opt/cryptpad/www/common/onlyoffice/dist \
/opt/cryptpad/onlyoffice-conf
msg_info "Creating backup"
[ -f /opt/cryptpad/config/config.js ] && mv /opt/cryptpad/config/config.js /opt/
for dir in blob block customize data datastore www/common/onlyoffice/dist onlyoffice-conf; do
[ -d "/opt/cryptpad/${dir}" ] && mv "/opt/cryptpad/${dir}" "/tmp/cryptpad_${dir//\//_}"
done
msg_ok "Created backup"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "cryptpad" "cryptpad/cryptpad" "tarball"
restore_backup
msg_info "Restoring backup"
mv /opt/config.js /opt/cryptpad/config/
for dir in blob block customize data datastore www/common/onlyoffice/dist onlyoffice-conf; do
[ -d "/tmp/cryptpad_${dir//\//_}" ] && mv "/tmp/cryptpad_${dir//\//_}" "/opt/cryptpad/${dir}"
done
msg_ok "Restored backup"
msg_info "Updating CryptPad"
cd /opt/cryptpad
+8 -2
View File
@@ -35,11 +35,17 @@ function update_script() {
systemctl stop dagu
msg_ok "Stopped Service"
create_backup /opt/dagu/data
msg_info "Backing up Data"
cp -r /opt/dagu/data /opt/dagu_data_backup
msg_ok "Backed up Data"
fetch_and_deploy_gh_release "dagu" "dagucloud/dagu" "prebuild" "latest" "/opt/dagu" "dagu_*_linux_amd64.tar.gz"
restore_backup
msg_info "Restoring Data"
mkdir -p /opt/dagu/data
cp -r /opt/dagu_data_backup/. /opt/dagu/data
rm -rf /opt/dagu_data_backup
msg_ok "Restored Data"
msg_info "Starting Service"
systemctl start dagu
+8 -2
View File
@@ -36,7 +36,10 @@ function update_script() {
systemctl stop dashy
msg_ok "Stopped Service"
create_backup /opt/dashy/user-data
msg_info "Backing up user-data"
rm -rf /opt/dashy_user_data_backup
cp -r /opt/dashy/user-data /opt/dashy_user_data_backup
msg_ok "Backed up user-data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "dashy" "lissy93/dashy" "prebuild" "latest" "/opt/dashy" "dashy-*.tar.gz"
@@ -45,7 +48,10 @@ function update_script() {
$STD yarn install --ignore-engines --network-timeout 300000
msg_ok "Updated Dashy"
restore_backup
msg_info "Restoring user-data"
cp -r /opt/dashy_user_data_backup/. /opt/dashy/user-data/
rm -rf /opt/dashy_user_data_backup
msg_ok "Restored user-data"
msg_info "Starting Dashy"
systemctl start dashy
+11 -2
View File
@@ -35,7 +35,12 @@ function update_script() {
$STD systemctl stop databasus
msg_ok "Stopped Databasus"
create_backup /opt/databasus/.env
msg_info "Backing up Configuration"
[[ ! -f /.env && -f /opt/databasus/.env ]] && cp /opt/databasus/.env /.env
chmod 600 /.env
cp /.env /opt/databasus.env.bak
chmod 600 /opt/databasus.env.bak
msg_ok "Backed up Configuration"
msg_info "Ensuring Database Clients"
# Create PostgreSQL version symlinks for compatibility
@@ -82,7 +87,11 @@ function update_script() {
chown -R postgres:postgres /opt/databasus
msg_ok "Updated Databasus"
restore_backup
msg_info "Restoring Configuration"
cp /opt/databasus.env.bak /.env
rm -f /opt/databasus.env.bak
chmod 600 /.env
msg_ok "Restored Configuration"
if ! grep -q "EnvironmentFile=/.env" /etc/systemd/system/databasus.service; then
msg_info "Updating Service"
+11 -4
View File
@@ -37,9 +37,11 @@ function update_script() {
systemctl stop dawarich-web dawarich-worker
msg_ok "Stopped Services"
create_backup /opt/dawarich/app/storage \
/opt/dawarich/app/config/master.key \
/opt/dawarich/app/config/credentials.yml.enc
msg_info "Backing up Data"
cp -r /opt/dawarich/app/storage /opt/dawarich_storage_backup 2>/dev/null || true
cp /opt/dawarich/app/config/master.key /opt/dawarich_master.key 2>/dev/null || true
cp /opt/dawarich/app/config/credentials.yml.enc /opt/dawarich_credentials.yml.enc 2>/dev/null || true
msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "dawarich" "Freika/dawarich" "tarball" "latest" "/opt/dawarich/app"
@@ -83,7 +85,12 @@ function update_script() {
$STD bundle exec rake data:migrate
msg_ok "Ran Migrations"
restore_backup
msg_info "Restoring Data"
cp -r /opt/dawarich_storage_backup/. /opt/dawarich/app/storage/ 2>/dev/null || true
cp /opt/dawarich_master.key /opt/dawarich/app/config/master.key 2>/dev/null || true
cp /opt/dawarich_credentials.yml.enc /opt/dawarich/app/config/credentials.yml.enc 2>/dev/null || true
rm -rf /opt/dawarich_storage_backup /opt/dawarich_master.key /opt/dawarich_credentials.yml.enc
msg_ok "Restored Data"
msg_info "Starting Services"
systemctl start dawarich-web dawarich-worker
+7 -2
View File
@@ -33,11 +33,16 @@ function update_script() {
systemctl stop ddns-updater
msg_ok "Stopped Service"
create_backup /opt/ddns-updater/data
msg_info "Backing up Data"
cp -r /opt/ddns-updater/data /opt/ddns-updater_data_backup
msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "ddns-updater" "qdm12/ddns-updater" "singlefile" "latest" "/opt/ddns-updater" "ddns-updater_*_linux_amd64"
restore_backup
msg_info "Restoring Data"
cp -r /opt/ddns-updater_data_backup/. /opt/ddns-updater/data/
rm -rf /opt/ddns-updater_data_backup
msg_ok "Restored Data"
msg_info "Starting Service"
systemctl start ddns-updater
+7 -3
View File
@@ -35,8 +35,10 @@ function update_script() {
systemctl stop degoog
msg_ok "Stopped Service"
create_backup /opt/degoog/.env \
/opt/degoog/data
msg_info "Backing up Configuration & Data"
[[ -f /opt/degoog/.env ]] && cp /opt/degoog/.env /opt/degoog.env.bak
[[ -d /opt/degoog/data ]] && mv /opt/degoog/data /opt/degoog_data_backup
msg_ok "Backed up Configuration & Data"
if ! command -v bun >/dev/null 2>&1; then
msg_info "Installing Bun"
@@ -53,7 +55,9 @@ function update_script() {
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "degoog" "fccview/degoog" "prebuild" "latest" "/opt/degoog" "degoog_*_prebuild.tar.gz"
restore_backup
msg_info "Restoring Configuration & Data"
[[ -f /opt/degoog.env.bak ]] && mv /opt/degoog.env.bak /opt/degoog/.env
[[ -d /opt/degoog_data_backup ]] && mv /opt/degoog_data_backup /opt/degoog/data
if [[ -f /opt/degoog/.env ]]; then
grep -q "^DEGOOG_VALKEY_URL=" /opt/degoog/.env && sed -i "s|^DEGOOG_VALKEY_URL=.*|DEGOOG_VALKEY_URL=redis://valkey:6379|" /opt/degoog/.env || echo "DEGOOG_VALKEY_URL=redis://valkey:6379" >>/opt/degoog/.env
+9 -2
View File
@@ -37,12 +37,19 @@ function update_script() {
systemctl stop discopanel
msg_ok "Stopped Service"
create_backup /opt/discopanel/data/discopanel.db
msg_info "Creating Backup"
mkdir -p /opt/discopanel_backup_temp
cp /opt/discopanel/data/discopanel.db /opt/discopanel_backup_temp/discopanel.db
msg_ok "Created Backup"
fetch_and_deploy_gh_release "discopanel" "nickheyer/discopanel" "prebuild" "latest" "/opt/discopanel" "discopanel-linux-amd64.tar.gz"
ln -sf /opt/discopanel/discopanel-linux-amd64 /opt/discopanel/discopanel
restore_backup
msg_info "Restoring Data"
mkdir -p /opt/discopanel/data
mv /opt/discopanel_backup_temp/discopanel.db /opt/discopanel/data/discopanel.db
rm -rf /opt/discopanel_backup_temp
msg_ok "Restored Data"
msg_info "Starting Service"
systemctl start discopanel
+11 -5
View File
@@ -37,19 +37,25 @@ function update_script() {
systemctl stop docmost
msg_ok "Stopped Service"
create_backup /opt/docmost/.env \
/opt/docmost/data
msg_info "Backing up data"
cp /opt/docmost/.env /opt/
cp -r /opt/docmost/data /opt/
rm -rf /opt/docmost
msg_ok "Data backed up"
fetch_and_deploy_gh_release "docmost" "docmost/docmost" "tarball"
restore_backup
msg_info "Updating ${APP}"
cd /opt/docmost
mv /opt/.env /opt/docmost/.env
mv /opt/data /opt/docmost/data
# Fix: Docmost EE (audit logs etc.) lives in a git submodule that is NOT
# included in GitHub tarballs. The community NoopAuditService exists but
# is only exported by CoreModule child modules such as UserModule cannot
# resolve it. Making CoreModule @Global() exposes the token app-wide.
if [[ ! -f /opt/docmost/apps/server/src/ee/ee.module.ts ]] &&
! grep -q '@Global()' /opt/docmost/apps/server/src/core/core.module.ts 2>/dev/null; then
if [[ ! -f /opt/docmost/apps/server/src/ee/ee.module.ts ]] \
&& ! grep -q '@Global()' /opt/docmost/apps/server/src/core/core.module.ts 2>/dev/null; then
sed -i '/^ Module,$/a\ Global,' /opt/docmost/apps/server/src/core/core.module.ts
sed -i '/^@Module({$/i @Global()' /opt/docmost/apps/server/src/core/core.module.ts
fi
+9 -4
View File
@@ -35,19 +35,24 @@ function update_script() {
systemctl stop docuseal docuseal-sidekiq
msg_ok "Stopped Services"
create_backup /opt/docuseal/.env \
/opt/docuseal/data
msg_info "Backing up Data"
cp /opt/docuseal/.env /opt/docuseal.env.bak
[[ -d /opt/docuseal/data ]] && mv /opt/docuseal/data /opt/docuseal_data.bak
msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "docuseal" "docusealco/docuseal" "tarball"
local required_ruby current_ruby
required_ruby=$(grep -m1 '^ruby ' /opt/docuseal/Gemfile | grep -oP '[0-9]+\.[0-9]+\.[0-9]+')
current_ruby=$(PATH="/root/.rbenv/bin:/root/.rbenv/shims:${PATH}" rbenv global 2>/dev/null || true)
if [[ -n $required_ruby && $required_ruby != "$current_ruby" ]]; then
if [[ -n "$required_ruby" && "$required_ruby" != "$current_ruby" ]]; then
RUBY_VERSION="${required_ruby}" RUBY_INSTALL_RAILS="false" HOME=/root setup_ruby
fi
restore_backup
msg_info "Restoring Data"
mv /opt/docuseal.env.bak /opt/docuseal/.env
[[ -d /opt/docuseal_data.bak ]] && mv /opt/docuseal_data.bak /opt/docuseal/data
msg_ok "Restored Data"
msg_info "Building Application"
cd /opt/docuseal
+6 -2
View File
@@ -43,7 +43,9 @@ function update_script() {
systemctl stop apache2
msg_info "Service stopped"
create_backup /opt/domain-monitor/.env
msg_info "Creating backup"
mv /opt/domain-monitor/.env /opt
msg_ok "Created backup"
setup_composer
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "domain-monitor" "Hosteroid/domain-monitor" "prebuild" "latest" "/opt/domain-monitor" "domain-monitor-v*.zip"
@@ -54,7 +56,9 @@ function update_script() {
chown -R www-data:www-data /opt/domain-monitor
msg_ok "Updated Domain Monitor"
restore_backup
msg_info "Restoring backup"
mv /opt/.env /opt/domain-monitor
msg_ok "Restored backup"
msg_info "Restarting Services"
systemctl start apache2
+7 -3
View File
@@ -35,14 +35,18 @@ function update_script() {
systemctl stop donetick
msg_ok "Stopped Service"
create_backup /opt/donetick/config/selfhosted.yaml \
/opt/donetick/donetick.db
msg_info "Backing Up Configurations"
mv /opt/donetick/config/selfhosted.yaml /opt/donetick/donetick.db /opt
msg_ok "Backed Up Configurations"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "donetick" "donetick/donetick" "prebuild" "latest" "/opt/donetick" "donetick_Linux_x86_64.tar.gz"
restore_backup
msg_info "Restoring Configurations"
mv /opt/selfhosted.yaml /opt/donetick/config
grep -q 'http://localhost"$' /opt/donetick/config/selfhosted.yaml || sed -i '/https:\/\/localhost"$/a\ - "http://localhost"' /opt/donetick/config/selfhosted.yaml
grep -q 'capacitor://localhost' /opt/donetick/config/selfhosted.yaml || sed -i '/http:\/\/localhost"$/a\ - "capacitor://localhost"' /opt/donetick/config/selfhosted.yaml
mv /opt/donetick.db /opt/donetick
msg_ok "Restored Configurations"
msg_info "Starting Service"
systemctl start donetick
+10 -4
View File
@@ -35,13 +35,19 @@ function update_script() {
systemctl stop dynacat
msg_ok "Stopped Service"
create_backup /opt/dynacat/config \
/opt/dynacat/assets \
/opt/dynacat/data
msg_info "Backing up Data"
cp -r /opt/dynacat/config /opt/dynacat_config_backup
cp -r /opt/dynacat/assets /opt/dynacat_assets_backup
cp -r /opt/dynacat/data /opt/dynacat_data_backup
msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "dynacat" "Panonim/dynacat" "prebuild" "latest" "/opt/dynacat" "dynacat-linux-amd64.tar.gz"
restore_backup
msg_info "Restoring Data"
cp -r /opt/dynacat_config_backup/. /opt/dynacat/config
cp -r /opt/dynacat_assets_backup/. /opt/dynacat/assets
cp -r /opt/dynacat_data_backup/. /opt/dynacat/data
rm -rf /opt/dynacat_config_backup /opt/dynacat_assets_backup /opt/dynacat_data_backup
chmod +x /opt/dynacat/dynacat
msg_ok "Restored Data"
-6
View File
@@ -1,6 +0,0 @@
____ __ ____ __ _ __
/ __ )____ ____ / /__/ __ \_____/ /_ (_) /_
/ __ / __ \/ __ \/ //_/ / / / ___/ __ \/ / __/
/ /_/ / /_/ / /_/ / ,< / /_/ / / / /_/ / / /_
/_____/\____/\____/_/|_|\____/_/ /_.___/_/\__/
+4 -6
View File
@@ -39,16 +39,14 @@ function update_script() {
systemctl stop homebox
msg_ok "Stopped Service"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "homebox" "sysadminsmedia/homebox" "prebuild" "latest" "/opt/homebox" "homebox_Linux_x86_64.tar.gz"
if [ -f /opt/homebox ] && [ -x /opt/homebox ]; then
rm -f /opt/homebox
fi
fetch_and_deploy_gh_release "homebox" "sysadminsmedia/homebox" "prebuild" "latest" "/opt/homebox" "homebox_Linux_x86_64.tar.gz"
chmod +x /opt/homebox/homebox
[ -f /opt/.env ] && mv /opt/.env /opt/homebox/.env
[ -d /opt/.data ] && mv /opt/.data /opt/homebox/.data
if ! grep -q "HBOX_AUTH_API_KEY_PEPPER" /opt/homebox/.env; then
AUTH_KEY=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)
echo "HBOX_AUTH_API_KEY_PEPPER=${AUTH_KEY}" >>/opt/homebox/.env
fi
msg_info "Starting Service"
systemctl start homebox
msg_ok "Started Service"
+4 -4
View File
@@ -310,7 +310,7 @@ function compile_libjxl() {
SOURCE=${SOURCE_DIR}/libjxl
JPEGLI_LIBJPEG_LIBRARY_SOVERSION="62"
JPEGLI_LIBJPEG_LIBRARY_VERSION="62.3.0"
LIBJXL_REVISION="332feb17d17311c748445f7ee75c4fb55cc38530"
LIBJXL_REVISION="794a5dcf0d54f9f0b20d288a12e87afb91d20dfc"
# : "${LIBJXL_REVISION:=$(jq -cr '.revision' "$BASE_DIR"/server/sources/libjxl.json)}"
if [[ "$LIBJXL_REVISION" != "$(grep 'libjxl' ~/.immich_library_revisions | awk '{print $2}')" ]]; then
msg_info "Recompiling libjxl"
@@ -355,7 +355,7 @@ function compile_libjxl() {
function compile_libheif() {
SOURCE=${SOURCE_DIR}/libheif
ensure_dependencies libaom-dev
LIBHEIF_REVISION="62f1b8c76ed4d8305071fdacbe74ef9717bacac5"
LIBHEIF_REVISION="35dad50a9145332a7bfdf1ff6aef6801fb613d68"
# : "${LIBHEIF_REVISION:=$(jq -cr '.revision' "$BASE_DIR"/server/sources/libheif.json)}"
if [[ "${update:-}" ]] || [[ "$LIBHEIF_REVISION" != "$(grep 'libheif' ~/.immich_library_revisions | awk '{print $2}')" ]]; then
msg_info "Recompiling libheif"
@@ -387,7 +387,7 @@ function compile_libheif() {
function compile_libraw() {
SOURCE=${SOURCE_DIR}/libraw
LIBRAW_REVISION="b860248a89d9082b8e0a1e202e516f46af9adb29"
LIBRAW_REVISION="0b56545a4f828743f28a4345cdfdd4c49f9f9a2a"
# : "${LIBRAW_REVISION:=$(jq -cr '.revision' "$BASE_DIR"/server/sources/libraw.json)}"
if [[ "$LIBRAW_REVISION" != "$(grep 'libraw' ~/.immich_library_revisions | awk '{print $2}')" ]]; then
msg_info "Recompiling libraw"
@@ -430,7 +430,7 @@ function compile_imagemagick() {
function compile_libvips() {
SOURCE=$SOURCE_DIR/libvips
LIBVIPS_REVISION="17ad2f62dda7e39985955da189183e594683d45e"
LIBVIPS_REVISION="0c9151a4f416d2f8ae20a755db218f6637050eec"
if [[ "$LIBVIPS_REVISION" != "$(grep 'libvips' ~/.immich_library_revisions | awk '{print $2}')" ]]; then
msg_info "Recompiling libvips"
[[ -d "$SOURCE" ]] && rm -rf "$SOURCE"
-5
View File
@@ -37,11 +37,6 @@ function update_script() {
"2" "Set Admin Token")
if [ "$UPD" == "1" ]; then
INSTALLED_VERSION="$(/opt/vaultwarden/bin/vaultwarden --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -n1)"
if [[ -n "$INSTALLED_VERSION" ]] &&
! grep -qxF "$INSTALLED_VERSION" "$HOME/.vaultwarden" 2>/dev/null; then
printf '%s\n' "$INSTALLED_VERSION" >"$HOME/.vaultwarden"
fi
if check_for_gh_release "vaultwarden" "dani-garcia/vaultwarden"; then
msg_info "Stopping Service"
systemctl stop vaultwarden
+1 -1
View File
@@ -59,7 +59,7 @@ PG_VERSION="17" setup_postgresql
PG_DB_NAME="authentik" PG_DB_USER="authentik" PG_DB_GRANT_SUPERUSER="true" setup_postgresql_db
XMLSEC_VERSION="1.3.11"
AUTHENTIK_VERSION="version/2026.5.3"
AUTHENTIK_VERSION="version/2026.5.2"
fetch_and_deploy_gh_release "xmlsec" "lsh123/xmlsec" "tarball" "${XMLSEC_VERSION}" "/opt/xmlsec"
fetch_and_deploy_gh_release "authentik" "goauthentik/authentik" "tarball" "${AUTHENTIK_VERSION}" "/opt/authentik"
fetch_and_deploy_gh_release "geoipupdate" "maxmind/geoipupdate" "binary"
-99
View File
@@ -1,99 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/bookorbit/bookorbit
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 \
ffmpeg \
poppler-utils
msg_ok "Installed Dependencies"
PG_VERSION="16" PG_MODULES="pgvector" setup_postgresql
PG_DB_NAME="bookorbit" PG_DB_USER="bookorbit" PG_DB_EXTENSIONS="uuid-ossp,pg_trgm,vector" setup_postgresql_db
NODE_VERSION="24" setup_nodejs
setup_uv
fetch_and_deploy_gh_release "bookorbit" "bookorbit/bookorbit" "tarball"
msg_info "Building Application"
cd /opt/bookorbit
PNPM_VERSION=$(jq -r '.packageManager | ltrimstr("pnpm@")' /opt/bookorbit/package.json)
$STD corepack enable
$STD corepack prepare "pnpm@${PNPM_VERSION}" --activate
$STD pnpm install --frozen-lockfile
$STD pnpm --filter client run build-only
$STD pnpm --filter server run build
cp -r /opt/bookorbit/client/dist /opt/bookorbit/server/public
mkdir -p /opt/bookorbit/server/migrations
cp -r /opt/bookorbit/server/src/db/migrations/. /opt/bookorbit/server/migrations/
chmod +x /opt/bookorbit/server/bin/kepubify/*
msg_ok "Built Application"
msg_info "Setting up Python Runtime"
$STD uv venv /opt/bookorbit-python
$STD uv pip install --python /opt/bookorbit-python/bin/python -r /opt/bookorbit/server/requirements/kobo-cloudscraper.txt
msg_ok "Set up Python Runtime"
msg_info "Configuring Application"
mkdir -p /opt/bookorbit-data/covers /opt/bookorbit-data/book-bucket /opt/bookorbit-books
APP_VER=$(cat ~/.bookorbit)
JWT_SECRET=$(openssl rand -hex 32)
SETUP_BOOTSTRAP_TOKEN=$(openssl rand -hex 16)
cat <<EOF >>~/bookorbit.creds
Setup Token: ${SETUP_BOOTSTRAP_TOKEN}
EOF
cat <<EOF >/opt/bookorbit/.env
NODE_ENV=production
PORT=3000
DATABASE_URL=postgres://${PG_DB_USER}:${PG_DB_PASS}@127.0.0.1:5432/${PG_DB_NAME}
JWT_SECRET=${JWT_SECRET}
SETUP_BOOTSTRAP_TOKEN=${SETUP_BOOTSTRAP_TOKEN}
APP_URL=http://${LOCAL_IP}:3000
CLIENT_URL=http://${LOCAL_IP}:3000
NODE_OPTIONS=--max-old-space-size=2048
APP_DATA_PATH=/opt/bookorbit-data
KOBO_CLOUDSCRAPER_PYTHON=/opt/bookorbit-python/bin/python
BOOK_DOCK_PATH=/opt/bookorbit-data/book-bucket
APP_VERSION=v${APP_VER}
EOF
msg_ok "Configured Application"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/bookorbit.service
[Unit]
Description=BookOrbit Service
After=network.target postgresql.service
Requires=postgresql.service
[Service]
Type=simple
User=root
WorkingDirectory=/opt/bookorbit/server
EnvironmentFile=/opt/bookorbit/.env
ExecStartPre=/usr/bin/node /opt/bookorbit/server/dist/scripts/migrate.js
ExecStart=/usr/bin/node /opt/bookorbit/server/dist/main.js
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now bookorbit
msg_ok "Created Service"
motd_ssh
customize
cleanup_lxc
-2
View File
@@ -18,13 +18,11 @@ fetch_and_deploy_gh_release "homebox" "sysadminsmedia/homebox" "prebuild" "lates
msg_info "Configuring Homebox"
chmod +x /opt/homebox/homebox
AUTH_KEY="$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)"
cat <<EOF >/opt/homebox/.env
# For possible environment variables check here: https://homebox.software/en/configure-homebox
HBOX_MODE=production
HBOX_WEB_PORT=7745
HBOX_WEB_HOST=0.0.0.0
HBOX_AUTH_API_KEY_PEPPER=${AUTH_KEY}
EOF
msg_ok "Configured Homebox"
+4 -4
View File
@@ -178,7 +178,7 @@ cd "$STAGING_DIR"
SOURCE=${SOURCE_DIR}/libjxl
JPEGLI_LIBJPEG_LIBRARY_SOVERSION="62"
JPEGLI_LIBJPEG_LIBRARY_VERSION="62.3.0"
LIBJXL_REVISION="332feb17d17311c748445f7ee75c4fb55cc38530"
LIBJXL_REVISION="794a5dcf0d54f9f0b20d288a12e87afb91d20dfc"
# : "${LIBJXL_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/libjxl.json)}"
$STD git clone https://github.com/libjxl/libjxl.git "$SOURCE"
cd "$SOURCE"
@@ -216,7 +216,7 @@ msg_ok "(1/5) Compiled libjxl"
msg_info "(2/5) Compiling libheif"
SOURCE=${SOURCE_DIR}/libheif
LIBHEIF_REVISION="62f1b8c76ed4d8305071fdacbe74ef9717bacac5"
LIBHEIF_REVISION="35dad50a9145332a7bfdf1ff6aef6801fb613d68"
# : "${LIBHEIF_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/libheif.json)}"
$STD git clone https://github.com/strukturag/libheif.git "$SOURCE"
cd "$SOURCE"
@@ -242,7 +242,7 @@ msg_ok "(2/5) Compiled libheif"
msg_info "(3/5) Compiling libraw"
SOURCE=${SOURCE_DIR}/libraw
LIBRAW_REVISION="b860248a89d9082b8e0a1e202e516f46af9adb29"
LIBRAW_REVISION="0b56545a4f828743f28a4345cdfdd4c49f9f9a2a"
# : "${LIBRAW_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/libraw.json)}"
$STD git clone https://github.com/LibRaw/LibRaw.git "$SOURCE"
cd "$SOURCE"
@@ -272,7 +272,7 @@ msg_ok "(4/5) Compiled imagemagick"
msg_info "(5/5) Compiling libvips"
SOURCE=$SOURCE_DIR/libvips
LIBVIPS_REVISION="17ad2f62dda7e39985955da189183e594683d45e"
LIBVIPS_REVISION="0c9151a4f416d2f8ae20a755db218f6637050eec"
$STD git clone https://github.com/libvips/libvips.git "$SOURCE"
cd "$SOURCE"
$STD git reset --hard "$LIBVIPS_REVISION"
-2
View File
@@ -133,8 +133,6 @@ server {
fastcgi_pass unix:/run/php/php8.4-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_param HTTP_X_FORWARDED_HOST $http_host;
fastcgi_param HTTP_X_FORWARDED_PROTO $scheme;
fastcgi_read_timeout 300;
}
+5 -33
View File
@@ -979,20 +979,6 @@ base_settings() {
IPV6_METHOD=${var_ipv6_method:-"none"}
GATE=${var_gateway:-""}
# Guard against invalid gateway combinations from defaults/app vars:
# - DHCP must not force a static gateway
# - Static IPv4 must use a gateway in the same subnet
if [[ "$NET" == "dhcp" && -n "$GATE" ]]; then
msg_warn "Ignoring var_gateway '$GATE' because var_net is 'dhcp'"
GATE=""
elif [[ "$NET" != "dhcp" && -n "$GATE" ]]; then
if ! validate_gateway_in_subnet "$NET" "$GATE"; then
msg_warn "Ignoring var_gateway '$GATE' because it is not in subnet of var_net '$NET'"
GATE=""
fi
fi
APT_CACHER=${var_apt_cacher:-""}
APT_CACHER_IP=${var_apt_cacher_ip:-""}
@@ -3852,6 +3838,7 @@ build_container() {
export ENABLE_TUN="$ENABLE_TUN"
export PCT_OSTYPE="$var_os"
export PCT_OSVERSION="$var_version"
export PCT_ARCH="$(dpkg --print-architecture 2>/dev/null || uname -m)"
export PCT_DISK_SIZE="$DISK_SIZE"
export IPV6_METHOD="$IPV6_METHOD"
export ENABLE_GPU="$ENABLE_GPU"
@@ -4393,12 +4380,10 @@ EOF
pct exec "$CTID" -- bash -c "apt-get update 2>&1 && apt-get install -y ${_base_pkgs} 2>&1" >>"$BUILD_LOG" 2>&1 || {
local failed_mirror
failed_mirror=$(pct exec "$CTID" -- bash -c "grep -m1 -oP '(?<=URIs: https?://)[^/]+' /etc/apt/sources.list.d/debian.sources 2>/dev/null || grep -m1 -oP '(?<=deb https?://)[^/]+' /etc/apt/sources.list 2>/dev/null" 2>/dev/null || echo "unknown")
msg_warn "apt-get update failed (${failed_mirror})."
msg_custom "️" "${YW}" "Probing alternate mirrors (this can take 1-2 minutes on network issues)"
msg_warn "apt-get update failed (${failed_mirror}), trying alternate mirrors..."
local mirror_exit=0
pct exec "$CTID" -- env APT_BASE="$_base_pkgs" bash -c '
DISTRO=$(. /etc/os-release 2>/dev/null && echo "$ID" || echo "debian")
echo " Mirror fallback for distro: $DISTRO"
if [ "$DISTRO" = "ubuntu" ]; then
EU_MIRRORS="de.archive.ubuntu.com fr.archive.ubuntu.com se.archive.ubuntu.com nl.archive.ubuntu.com it.archive.ubuntu.com ch.archive.ubuntu.com mirrors.xtom.de"
@@ -4456,21 +4441,15 @@ EOF
}
# Phase 1: Scan global mirrors first (independent of local CDN issues)
echo " Phase 1/3: Scanning global mirrors for reachability..."
OTHERS_OK=$(scan_reachable "$OTHERS")
OTHERS_PICK=$(printf "%s\n" $OTHERS_OK | shuf | head -3 | xargs)
if [ -z "$OTHERS_PICK" ]; then
echo " No reachable global mirrors found"
fi
for mirror in $OTHERS_PICK; do
echo " Attempting mirror: $mirror"
try_mirrors "$mirror" && exit 0
done
# Phase 2: Try primary mirror
echo " Phase 2/3: Trying primary mirror..."
if [ "$DISTRO" = "ubuntu" ]; then
PRIMARY="archive.ubuntu.com"
else
@@ -4482,14 +4461,9 @@ EOF
fi
# Phase 3: Fall back to regional mirrors
echo " Phase 3/3: Scanning regional mirrors..."
REGIONAL_OK=$(scan_reachable "$REGIONAL")
REGIONAL_PICK=$(printf "%s\n" $REGIONAL_OK | shuf | head -3 | xargs)
if [ -z "$REGIONAL_PICK" ]; then
echo " No reachable regional mirrors found"
fi
for mirror in $REGIONAL_PICK; do
echo " Attempting mirror: $mirror"
try_mirrors "$mirror" && exit 0
@@ -4523,14 +4497,12 @@ EOF
msg_warn "Mirror '${custom_mirror}' also failed. Try another or type 'skip'."
done
if [[ "$custom_mirror" == "skip" ]]; then
msg_warn "Mirror selection aborted by user ('skip')"
msg_warn "Aborting installation before base package bootstrap"
post_update_to_api "aborted" "130" "force"
install_exit_code=130
msg_error "apt-get base packages installation failed"
install_exit_code=1
fi
elif [[ $mirror_exit -ne 0 ]]; then
msg_error "apt-get base packages installation failed"
install_exit_code=100
install_exit_code=1
fi
}
fi
+20
View File
@@ -360,6 +360,26 @@ arch_check() {
fi
}
# ------------------------------------------------------------------------------
# get_arch_value()
#
# - Selects an architecture-specific value while preserving amd64 defaults
# - Usage: get_arch_value "amd64-value" "arm64-value"
# - Defaults: amd64="amd64", arm64="arm64"
# ------------------------------------------------------------------------------
get_arch_value() {
local amd64_val="${1:-amd64}"
local arm64_val="${2:-arm64}"
case "$PCT_ARCH" in
amd64) echo "$amd64_val" ;;
arm64) echo "$arm64_val" ;;
*)
msg_error "Unsupported architecture: $PCT_ARCH"
return 106
;;
esac
}
# ------------------------------------------------------------------------------
# ssh_check()
#
+1 -9
View File
@@ -5267,8 +5267,6 @@ _setup_intel_arc() {
intel-media-va-driver-non-free \
intel-opencl-icd \
libmfx-gen1.2 \
mesa-vulkan-drivers \
vulkan-tools \
vainfo \
intel-gpu-tools 2>/dev/null || msg_warn "Some Intel Arc packages failed"
@@ -5303,8 +5301,6 @@ _setup_intel_arc() {
ocl-icd-libopencl1 \
libvpl2 \
libmfx-gen1.2 \
mesa-vulkan-drivers \
vulkan-tools \
vainfo \
intel-gpu-tools 2>/dev/null || msg_warn "Some Intel Arc packages failed"
@@ -5328,8 +5324,6 @@ _setup_intel_modern() {
va-driver-all \
intel-media-va-driver \
ocl-icd-libopencl1 \
mesa-vulkan-drivers \
vulkan-tools \
vainfo \
intel-gpu-tools 2>/dev/null || msg_warn "Some Intel packages failed"
@@ -5364,8 +5358,6 @@ _setup_intel_modern() {
$STD apt -y install \
intel-media-va-driver-non-free \
ocl-icd-libopencl1 \
mesa-vulkan-drivers \
vulkan-tools \
vainfo \
libmfx-gen1.2 \
intel-gpu-tools 2>/dev/null || msg_warn "Some Intel packages failed"
@@ -8106,7 +8098,7 @@ setup_postgresql_db() {
IFS=',' read -ra EXT_LIST <<<"${PG_DB_EXTENSIONS:-}"
for ext in "${EXT_LIST[@]}"; do
ext=$(echo "$ext" | xargs) # Trim whitespace
$STD sudo -u postgres psql -d "$PG_DB_NAME" -c "CREATE EXTENSION IF NOT EXISTS \"$ext\";"
$STD sudo -u postgres psql -d "$PG_DB_NAME" -c "CREATE EXTENSION IF NOT EXISTS $ext;"
done
fi
+45 -549
View File
@@ -1,5 +1,5 @@
# Copyright (c) 2021-2026 community-scripts ORG
# License: MIT | https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/LICENSE
# License: MIT | https://git.community-scripts.org/community-scripts/ProxmoxVE/raw/branch/main/LICENSE
set -euo pipefail
SPINNER_PID=""
@@ -14,18 +14,9 @@ declare -A MSG_INFO_SHOWN
[[ -n "${_CORE_FUNC_LOADED:-}" ]] && return
_CORE_FUNC_LOADED=1
COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://git.community-scripts.org/community-scripts/ProxmoxVE/raw/branch/main}"
load_api_functions() {
if ! declare -f post_to_api_vm >/dev/null 2>&1; then
source /dev/stdin <<<$(curl -fsSL "$COMMUNITY_SCRIPTS_URL/misc/api.func")
fi
}
load_functions() {
[[ -n "${__FUNCTIONS_LOADED:-}" ]] && return
__FUNCTIONS_LOADED=1
load_api_functions
color
formatting
icons
@@ -40,24 +31,18 @@ load_functions() {
arch_check
}
load_cloud_init_functions() {
if ! declare -f setup_cloud_init >/dev/null 2>&1; then
source <(curl -fsSL "$COMMUNITY_SCRIPTS_URL/misc/cloud-init.func") 2>/dev/null || true
fi
}
# Function to download & save header files
get_header() {
local app_name=$(echo "${APP,,}" | tr ' ' '-')
local app_type=${APP_TYPE:-vm}
local header_url="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/${app_type}/headers/${app_name}"
local header_url="https://git.community-scripts.org/community-scripts/ProxmoxVE/raw/branch/main/${app_type}/headers/${app_name}"
local local_header_path="/usr/local/community-scripts/headers/${app_type}/${app_name}"
mkdir -p "$(dirname "$local_header_path")"
if [ ! -s "$local_header_path" ]; then
if ! curl -fsSL "$header_url" -o "$local_header_path"; then
return 1
return 250
fi
fi
@@ -113,7 +98,6 @@ icons() {
DNSOK="✔️ "
DNSFAIL="${TAB}✖️${TAB}"
INFO="${TAB}💡${TAB}${CL}"
CLOUD="${TAB}☁️${TAB}${CL}"
OS="${TAB}🖥️${TAB}${CL}"
OSVERSION="${TAB}🌟${TAB}${CL}"
CONTAINERTYPE="${TAB}📦${TAB}${CL}"
@@ -204,32 +188,18 @@ silent() {
trap 'error_handler' ERR
if [[ $rc -ne 0 ]]; then
# Source explain_exit_code if needed
if ! declare -f explain_exit_code >/dev/null 2>&1; then
source <(curl -fsSL "$COMMUNITY_SCRIPTS_URL/misc/error_handler.func") 2>/dev/null || true
fi
# Return instead of exit so that callers can use `$STD cmd || true`
# When no || is used, set -e + ERR trap catches it via error_handler()
export _SILENT_FAILED_RC="$rc"
export _SILENT_FAILED_CMD="$cmd"
export _SILENT_FAILED_LINE="$caller_line"
export _SILENT_FAILED_LOG="$logfile"
local explanation=""
if declare -f explain_exit_code >/dev/null 2>&1; then
explanation="$(explain_exit_code "$rc")"
fi
printf "\e[?25h"
if [[ -n "$explanation" ]]; then
msg_error "in line ${caller_line}: exit code ${rc} (${explanation})"
else
msg_error "in line ${caller_line}: exit code ${rc}"
fi
msg_custom "→" "${YWB}" "${cmd}"
if [[ -s "$logfile" ]]; then
echo -e "\n${TAB}--- Last 20 lines of log ---"
tail -n 20 "$logfile"
echo -e "${TAB}----------------------------\n"
fi
exit "$rc"
return "$rc"
fi
# Clear stale flags on success
unset _SILENT_FAILED_RC _SILENT_FAILED_CMD _SILENT_FAILED_LINE _SILENT_FAILED_LOG 2>/dev/null || true
}
# ------------------------------------------------------------------------------
@@ -260,7 +230,7 @@ curl_handler() {
if [[ -z "$url" ]]; then
msg_error "no valid url or option entered for curl_handler"
exit 1
exit 64
fi
$STD msg_info "Fetching: $url"
@@ -289,7 +259,7 @@ curl_handler() {
rm -f /tmp/curl_error.log
fi
__curl_err_handler "$exit_code" "$url" "$curl_stderr"
exit 1 # hard exit if exit_code is not 0
exit "$exit_code"
fi
$STD printf "\r\033[K${INFO}${YW}Retry $attempt/$max_retries in ${delay}s...${CL}" >&2
@@ -332,7 +302,7 @@ __curl_err_handler() {
esac
[[ -n "$curl_msg" ]] && printf "%s\n" "$curl_msg" >&2
exit 1
exit "$exit_code"
}
# ------------------------------------------------------------------------------
@@ -347,7 +317,7 @@ shell_check() {
msg_error "Your default shell is currently not set to Bash. To use these scripts, please switch to the Bash shell."
echo -e "\nExiting..."
sleep 2
exit
exit 103
fi
}
@@ -368,11 +338,11 @@ clear_line() {
#
# - Determines if script should run in verbose mode
# - Checks VERBOSE and var_verbose variables
# - Also returns true if not running in TTY (pipe/redirect scenario)
# - Note: Non-TTY (pipe) scenarios are handled separately in msg_info()
# ------------------------------------------------------------------------------
is_verbose_mode() {
local verbose="${VERBOSE:-${var_verbose:-no}}"
[[ "$verbose" != "no" || ! -t 2 ]]
[[ "$verbose" != "no" ]]
}
### dev spinner ###
@@ -511,20 +481,6 @@ msg_debug() {
fi
}
error_handler() {
local exit_code="$?"
local line_number="${1:-unknown}"
local command="${2:-unknown}"
if declare -f post_update_to_api >/dev/null 2>&1; then
post_update_to_api "failed" "$exit_code"
fi
local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}"
echo -e "\n$error_message\n"
cleanup_vmid
}
# Displays error message and immediately terminates script
fatal() {
msg_error "$1"
@@ -560,13 +516,9 @@ cleanup_vmid() {
cleanup() {
local exit_code=$?
stop_spinner
if [[ "$(dirs -p | wc -l)" -gt 1 ]]; then
popd >/dev/null || true
fi
if [[ -n "${TEMP_DIR:-}" && -d "$TEMP_DIR" ]]; then
rm -rf "$TEMP_DIR"
fi
# Report final telemetry status if post_to_api_vm was called but no update was sent
if [[ "${POST_TO_API_DONE:-}" == "true" && "${POST_UPDATE_DONE:-}" != "true" ]]; then
if declare -f post_update_to_api >/dev/null 2>&1; then
@@ -586,37 +538,18 @@ check_root() {
msg_error "Please run this script as root."
echo -e "\nExiting..."
sleep 2
exit
exit 104
fi
}
pve_check() {
local pve_ver
pve_ver="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')"
if [[ "$pve_ver" =~ ^8\.([0-9]+) ]]; then
local minor="${BASH_REMATCH[1]}"
if ((minor < 0 || minor > 9)); then
msg_error "This version of Proxmox VE is not supported."
msg_error "Supported: Proxmox VE version 8.0 8.9"
exit 105
fi
return 0
if ! pveversion | grep -Eq "pve-manager/(8\.[1-4]|9\.[0-2])(\.[0-9]+)*"; then
msg_error "This version of Proxmox Virtual Environment is not supported"
echo -e "Requires Proxmox Virtual Environment Version 8.1 - 8.4 or 9.0 - 9.2."
echo -e "Exiting..."
sleep 2
exit 105
fi
if [[ "$pve_ver" =~ ^9\.([0-9]+) ]]; then
local minor="${BASH_REMATCH[1]}"
if ((minor < 0 || minor > 2)); then
msg_error "This version of Proxmox VE is not supported."
msg_error "Supported: Proxmox VE version 9.0 9.2"
exit 105
fi
return 0
fi
msg_error "This version of Proxmox VE is not supported."
msg_error "Supported versions: Proxmox VE 8.0 8.9 or 9.0 9.2"
exit 105
}
arch_check() {
@@ -625,487 +558,50 @@ arch_check() {
echo -e "\n ${YWB}Visit https://github.com/asylumexp/Proxmox for ARM64 support. \n"
echo -e "Exiting..."
sleep 2
exit
fi
}
ssh_check() {
if command -v pveversion >/dev/null 2>&1 && [ -n "${SSH_CLIENT:-}" ]; then
if whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then
:
else
clear
exit
fi
exit 106
fi
}
exit_script() {
clear
echo -e "\n${CROSS}${RD}User exited script${CL}\n"
exit
}
sanitize_vm_hostname() {
local hostname="${1,,}"
hostname=$(echo "$hostname" | tr -cs 'a-z0-9-' '-' | sed 's/^-//;s/-$//')
echo "${hostname:0:63}"
}
vm_confirm_new_vm() {
local title="$1"
local message="$2"
local height="${3:-10}"
local width="${4:-58}"
whiptail --backtitle "Proxmox VE Helper Scripts" --title "$title" --yesno "$message" "$height" "$width"
}
vm_choose_settings_mode() {
local message="${1:-Use Default Settings?}"
local height="${2:-10}"
local width="${3:-58}"
whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "$message" --no-button Advanced "$height" "$width"
}
vm_confirm_advanced_settings() {
local message="$1"
local height="${2:-10}"
local width="${3:-58}"
whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "$message" --no-button Do-Over "$height" "$width"
}
vm_prompt_vmid() {
local default_vmid="${1:-$(get_valid_nextid)}"
while true; do
if VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 "$default_vmid" --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
if [ -z "$VMID" ]; then
VMID=$(get_valid_nextid)
fi
if pct status "$VMID" &>/dev/null || qm status "$VMID" &>/dev/null; then
echo -e "${CROSS}${RD} ID $VMID is already in use${CL}"
sleep 2
continue
fi
echo -e "${CONTAINERID}${BOLD}${DGN}Virtual Machine ID: ${BGN}$VMID${CL}"
break
else
exit_script
fi
done
}
vm_apply_machine_type() {
local machine_type="${1:-i440fx}"
if [ "$machine_type" = "q35" ]; then
MACHINE_TYPE="q35"
FORMAT=""
MACHINE=" -machine q35"
else
MACHINE_TYPE="i440fx"
FORMAT=",efitype=4m"
MACHINE=""
fi
}
vm_machine_type_label() {
case "${1:-i440fx}" in
q35)
echo "Q35 (Modern)"
;;
*)
echo "i440fx"
;;
esac
}
vm_prompt_machine_type() {
local default_machine="${1:-i440fx}"
local i440fx_default="ON"
local q35_default="OFF"
local machine_choice
if [ "$default_machine" = "q35" ]; then
i440fx_default="OFF"
q35_default="ON"
fi
if machine_choice=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "MACHINE TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \
"i440fx" "Machine i440fx" "$i440fx_default" \
"q35" "Machine q35" "$q35_default" \
3>&1 1>&2 2>&3); then
vm_apply_machine_type "$machine_choice"
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Machine Type: ${BGN}$(vm_machine_type_label "$MACHINE_TYPE")${CL}"
else
exit_script
fi
}
vm_prompt_cloud_init() {
local default_user="${1:-root}"
USE_CLOUD_INIT="no"
load_cloud_init_functions
if ! declare -f configure_cloud_init_interactive >/dev/null 2>&1; then
echo -e "${CLOUD}${BOLD}${DGN}Cloud-Init: ${BGN}unavailable${CL}"
return 1
fi
configure_cloud_init_interactive "$default_user" || true
USE_CLOUD_INIT="${CLOUDINIT_ENABLE:-no}"
echo -e "${CLOUD}${BOLD}${DGN}Cloud-Init: ${BGN}${USE_CLOUD_INIT}${CL}"
if [ "$USE_CLOUD_INIT" = "yes" ] && declare -f configure_cloudinit_ssh_keys >/dev/null 2>&1; then
configure_cloudinit_ssh_keys || true
fi
return 0
}
vm_prompt_disk_size() {
local default_size="${1:-8G}"
local prompt_message="${2:-Set Disk Size in GiB (e.g., 10, 20)}"
if DISK_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "$prompt_message" 8 58 "$default_size" --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
DISK_SIZE=$(echo "$DISK_SIZE" | tr -d ' ')
if [[ "$DISK_SIZE" =~ ^[0-9]+$ ]]; then
DISK_SIZE="${DISK_SIZE}G"
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}$DISK_SIZE${CL}"
elif [[ "$DISK_SIZE" =~ ^[0-9]+G$ ]]; then
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}$DISK_SIZE${CL}"
else
echo -e "${DISKSIZE}${BOLD}${RD}Invalid Disk Size. Please use a number (e.g., 10 or 10G).${CL}"
exit_script
fi
else
exit_script
fi
}
vm_prompt_disk_cache() {
local default_cache="${1:-none}"
local none_default="ON"
local write_default="OFF"
local cache_choice
if [ "$default_cache" = "writethrough" ]; then
none_default="OFF"
write_default="ON"
fi
if cache_choice=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DISK CACHE" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \
"0" "None (Default)" "$none_default" \
"1" "Write Through" "$write_default" \
3>&1 1>&2 2>&3); then
if [ "$cache_choice" = "1" ]; then
DISK_CACHE="cache=writethrough,"
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Cache: ${BGN}Write Through${CL}"
else
DISK_CACHE=""
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Cache: ${BGN}None${CL}"
fi
else
exit_script
fi
}
vm_prompt_hostname() {
local default_hostname="${1:-vm}"
local adjusted_hostname
local input_hostname
if input_hostname=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 "$default_hostname" --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
if [ -z "$input_hostname" ]; then
HN="$default_hostname"
else
adjusted_hostname=$(sanitize_vm_hostname "$input_hostname")
HN="${adjusted_hostname:-$default_hostname}"
if [ "$HN" != "${input_hostname,,}" ]; then
whiptail --backtitle "Proxmox VE Helper Scripts" --title "HOSTNAME ADJUSTED" --msgbox "Invalid characters detected. Hostname has been adjusted to:\n\n $HN" 10 58
fi
fi
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
else
exit_script
fi
}
vm_prompt_cpu_model() {
local default_model="${1:-kvm64}"
local kvm_default="ON"
local host_default="OFF"
local cpu_choice
if [ "$default_model" = "host" ]; then
kvm_default="OFF"
host_default="ON"
fi
if cpu_choice=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CPU MODEL" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \
"0" "KVM64 (Default)" "$kvm_default" \
"1" "Host" "$host_default" \
3>&1 1>&2 2>&3); then
if [ "$cpu_choice" = "1" ]; then
CPU_TYPE=" -cpu host"
echo -e "${OS}${BOLD}${DGN}CPU Model: ${BGN}Host${CL}"
else
CPU_TYPE=""
echo -e "${OS}${BOLD}${DGN}CPU Model: ${BGN}KVM64${CL}"
fi
else
exit_script
fi
}
vm_prompt_cpu_cores() {
local default_cores="${1:-2}"
while true; do
if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 "$default_cores" --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
if [ -z "$CORE_COUNT" ]; then
CORE_COUNT="$default_cores"
fi
if [[ "$CORE_COUNT" =~ ^[1-9][0-9]*$ ]]; then
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
break
fi
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "CPU Cores must be a positive integer (e.g., 2)." 8 58
else
exit_script
fi
done
}
vm_prompt_ram() {
local default_ram="${1:-2048}"
while true; do
if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 "$default_ram" --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
if [ -z "$RAM_SIZE" ]; then
RAM_SIZE="$default_ram"
fi
if [[ "$RAM_SIZE" =~ ^[1-9][0-9]*$ ]]; then
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
break
fi
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "RAM Size must be a positive integer in MiB (e.g., 2048)." 8 58
else
exit_script
fi
done
}
vm_prompt_bridge() {
local default_bridge="${1:-vmbr0}"
if BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 "$default_bridge" --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
if [ -z "$BRG" ]; then
BRG="$default_bridge"
fi
echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}"
else
exit_script
fi
}
vm_prompt_mac() {
local default_mac="${1:-$GEN_MAC}"
local input_mac
while true; do
if input_mac=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a MAC Address" 8 58 "$default_mac" --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
if [ -z "$input_mac" ]; then
MAC="$default_mac"
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
break
fi
if [[ "$input_mac" =~ ^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$ ]]; then
MAC="$input_mac"
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
break
fi
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "Invalid MAC address format. Use XX:XX:XX:XX:XX:XX (e.g., AA:BB:CC:DD:EE:FF)." 8 58
else
exit_script
fi
done
}
vm_prompt_vlan() {
local default_vlan="${1:-}"
local input_vlan
while true; do
if input_vlan=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Vlan (leave blank for default)" 8 58 "$default_vlan" --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
if [ -z "$input_vlan" ]; then
VLAN=""
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}Default${CL}"
break
fi
if [[ "$input_vlan" =~ ^[0-9]+$ ]] && [ "$input_vlan" -ge 1 ] && [ "$input_vlan" -le 4094 ]; then
VLAN=",tag=$input_vlan"
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$input_vlan${CL}"
break
fi
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "VLAN must be a number between 1 and 4094, or leave blank for default." 8 58
else
exit_script
fi
done
}
vm_prompt_mtu() {
local default_mtu="${1:-}"
local input_mtu
while true; do
if input_mtu=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 "$default_mtu" --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
if [ -z "$input_mtu" ]; then
MTU=""
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}Default${CL}"
break
fi
if [[ "$input_mtu" =~ ^[0-9]+$ ]] && [ "$input_mtu" -ge 576 ] && [ "$input_mtu" -le 65520 ]; then
MTU=",mtu=$input_mtu"
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$input_mtu${CL}"
break
fi
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "MTU Size must be a number between 576 and 65520, or leave blank for default." 8 58
else
exit_script
fi
done
}
vm_prompt_start_vm() {
local default_start="${1:-yes}"
local default_flag=()
if [ "$default_start" = "no" ]; then
default_flag=(--defaultno)
fi
if whiptail --backtitle "Proxmox VE Helper Scripts" "${default_flag[@]}" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58; then
START_VM="yes"
else
START_VM="no"
fi
echo -e "${GATEWAY}${BOLD}${DGN}Start VM when completed: ${BGN}${START_VM}${CL}"
}
vm_apply_storage_layout() {
local storage_type="$1"
case $storage_type in
nfs | dir | cifs)
DISK_EXT=".qcow2"
DISK_REF="$VMID/"
DISK_IMPORT_FORMAT="qcow2"
THIN=""
;;
btrfs)
DISK_EXT=".raw"
DISK_REF="$VMID/"
DISK_IMPORT_FORMAT="raw"
FORMAT=",efitype=4m"
THIN=""
;;
*)
DISK_EXT=""
DISK_REF=""
DISK_IMPORT_FORMAT="raw"
;;
esac
}
vm_select_storage() {
local hostname="${1:-${HN:-vm}}"
local storage_menu=()
local msg_max_length=0
local line tag type free item
local offset=2
local valid_storage
msg_info "Validating Storage"
while read -r line; do
tag=$(echo "$line" | awk '{print $1}')
type=$(echo "$line" | awk '{printf "%-10s", $2}')
free=$(echo "$line" | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}')
item=" Type: $type Free: $free "
if [[ $((${#item} + offset)) -gt $msg_max_length ]]; then
msg_max_length=$((${#item} + offset))
fi
storage_menu+=("$tag" "$item" "OFF")
done < <(pvesm status -content images | awk 'NR>1')
valid_storage=$(pvesm status -content images | awk 'NR>1')
if [ -z "$valid_storage" ]; then
msg_error "Unable to detect a valid storage location."
exit
elif [ $((${#storage_menu[@]} / 3)) -eq 1 ]; then
STORAGE=${storage_menu[0]}
else
if [ -n "${SPINNER_PID:-}" ] && ps -p "$SPINNER_PID" >/dev/null 2>&1; then
kill "$SPINNER_PID" >/dev/null 2>&1 || true
SPINNER_ACTIVE=0
printf "\r\e[2K" >&2
fi
while [ -z "${STORAGE:+x}" ]; do
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
"Which storage pool would you like to use for ${hostname}?\nTo make a selection, use the Spacebar.\n" \
16 $(($msg_max_length + 23)) 6 \
"${storage_menu[@]}" 3>&1 1>&2 2>&3)
done
fi
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}."
STORAGE_TYPE=$(pvesm status -storage "$STORAGE" | awk 'NR>1 {print $2}')
vm_apply_storage_layout "$STORAGE_TYPE"
}
vm_define_disk_references() {
local disk_count="${1:-2}"
local i disk_name
for ((i = 0; i < disk_count; i++)); do
disk_name="vm-${VMID}-disk-${i}${DISK_EXT:-}"
printf -v "DISK${i}" '%s' "$disk_name"
printf -v "DISK${i}_REF" '%s' "${STORAGE}:${DISK_REF:-}${disk_name}"
done
exit 0
}
check_hostname_conflict() {
local hostname="$1"
if qm list | awk '{print $2}' | grep -qx "$hostname"; then
msg_error "Hostname $hostname already in use by another VM."
exit 1
exit 206
fi
}
set_description() {
local description_title="${APP:-${NSAPP} VM}"
local app_name script_slug script_url donate_url
app_name=$(echo "${APP,,}" | tr ' ' '-')
script_slug="${SCRIPT_SLUG:-${app_name}}"
script_slug="$(echo "$script_slug" | tr '[:upper:]' '[:lower:]' | tr ' ' '-')"
script_url="https://community-scripts.org/scripts/${script_slug}"
donate_url="https://community-scripts.org/donate"
DESCRIPTION=$(
cat <<EOF
<div align='center'>
<a href='https://Helper-Scripts.com' target='_blank' rel='noopener noreferrer'>
<a href='https://community-scripts.org' target='_blank' rel='noopener noreferrer'>
<img src='https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/images/logo-81x112.png' alt='Logo' style='width:81px;height:112px;'/>
</a>
<h2 style='font-size: 24px; margin: 20px 0;'>${description_title}</h2>
<h2 style='font-size: 24px; margin: 20px 0;'>${NSAPP} VM</h2>
<p style='margin: 16px 0;'>
<a href='https://ko-fi.com/community_scripts' target='_blank' rel='noopener noreferrer'>
<img src='https://img.shields.io/badge/&#x2615;-Buy us a coffee-blue' alt='spend Coffee' />
<a href='${donate_url}' target='_blank' rel='noopener noreferrer'>
<img src='https://img.shields.io/badge/❤️-Sponsoring%20%26%20Donations-FF5E5B' alt='Sponsoring and donations' />
</a>
</p>
<p style='margin: 12px 0;'>
<a href='${script_url}' target='_blank' rel='noopener noreferrer'>
<img src='https://img.shields.io/badge/📦-Open%20Script%20Page-00617f' alt='Open script page' />
</a>
</p>