Compare commits

..

5 Commits

Author SHA1 Message Date
github-actions[bot] 9f19a7d23d Update CHANGELOG.md 2026-06-13 16:43:31 +00:00
Slaviša Arežina d4b9bc86e8 Refactor A-B (#15075) 2026-06-13 18:43:15 +02:00
MickLesk 07ab5dc16e Quote PostgreSQL extension names
Wrap the extension identifier in double quotes in the CREATE EXTENSION SQL call within setup_postgresql_db. This ensures extension names containing hyphens, mixed case, or other characters that require quoting are handled correctly and avoids syntax errors when creating extensions.
2026-06-13 18:17:21 +02:00
community-scripts-pr-app[bot] 9020fa88b8 Update CHANGELOG.md (#15081)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-13 14:01:50 +00:00
push-app-to-main[bot] a5208b5564 Add bookorbit (ct) (#15080)
Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com>
2026-06-13 16:01:22 +02:00
22 changed files with 289 additions and 174 deletions
+12
View File
@@ -480,6 +480,18 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
</details>
## 2026-06-13
### 🆕 New Scripts
- BookOrbit ([#15080](https://github.com/community-scripts/ProxmoxVE/pull/15080))
### 🚀 Updated Scripts
- #### 🔧 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
+10 -6
View File
@@ -35,8 +35,10 @@ function update_script() {
$STD apt -y upgrade
msg_info "Creating Backup"
rm -rf /opt/2fauth-backup
mv /opt/2fauth /opt/2fauth-backup
create_backup \
/opt/2fauth/.env \
/opt/2fauth/storage
if ! dpkg -l | grep -q 'php8.4'; then
cp /etc/nginx/conf.d/2fauth.conf /etc/nginx/conf.d/2fauth.conf.bak
fi
@@ -46,11 +48,13 @@ 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
cp /opt/2fauth-backup/.env /opt/2fauth/.env
cp -r /opt/2fauth-backup/storage /opt/2fauth/storage
cd /opt/2fauth || return
restore_backup
msg_info "Configuring 2FAuth"
cd /opt/2fauth
export COMPOSER_ALLOW_SUPERUSER=1
$STD composer install --no-dev --prefer-dist
php artisan 2fauth:install
@@ -58,7 +62,7 @@ function update_script() {
chmod -R 755 /opt/2fauth
$STD systemctl restart php8.4-fpm
$STD systemctl restart nginx
rm -rf /opt/2fauth-backup
msg_ok "Configured 2FAuth"
msg_ok "Updated successfully!"
fi
exit
+6 -10
View File
@@ -35,10 +35,8 @@ function update_script() {
systemctl stop adventurelog-frontend
msg_ok "Services Stopped"
msg_info "Backup Old Installation"
cp -r /opt/adventurelog /opt/adventurelog-backup
rm -rf /opt/adventurelog
msg_ok "Backup done"
create_backup /opt/adventurelog/backend/server/.env \
/opt/adventurelog/backend/server/media
fetch_and_deploy_gh_release "adventurelog" "seanmorley15/adventurelog" "tarball"
PYTHON_VERSION="3.13" setup_uv
@@ -47,9 +45,9 @@ function update_script() {
$STD sudo -u postgres psql -d adventurelog_db -c "CREATE EXTENSION IF NOT EXISTS postgis;"
msg_ok "PostgreSQL Extensions Ready"
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
restore_backup
msg_info "Updating AdventureLog"
cd /opt/adventurelog/backend/server
if [[ ! -x .venv/bin/python ]]; then
$STD uv venv --clear .venv
@@ -61,12 +59,10 @@ 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
rm -rf /opt/adventurelog-backup
msg_ok "Updated ${APP}"
msg_ok "Updated AdventureLog"
msg_info "Starting Services"
systemctl daemon-reexec
+5 -13
View File
@@ -34,24 +34,16 @@ function update_script() {
systemctl stop apache2
msg_ok "Stopped Service"
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"
create_backup /opt/ampache/config/ampache.cfg.php \
/opt/ampache/public/rest/.htaccess \
/opt/ampache/public/play/.htaccess \
/opt/ampache/advanced-config
fetch_and_deploy_gh_release "Ampache" "ampache/ampache" "prebuild" "latest" "/opt/ampache" "ampache-*_all_php8.4.zip"
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
restore_backup
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
+2 -5
View File
@@ -35,9 +35,7 @@ function update_script() {
systemctl stop anchor-web anchor-server
msg_ok "Stopped Services"
msg_info "Backing up Configuration"
cp /opt/anchor/.env /opt/anchor.env.bak
msg_ok "Backed up Configuration"
create_backup /opt/anchor/.env
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "anchor" "ZhFahim/anchor" "tarball"
@@ -57,8 +55,7 @@ function update_script() {
cp -r public .next/standalone/public
msg_ok "Built Web Interface"
cp /opt/anchor.env.bak /opt/anchor/.env
rm -f /opt/anchor.env.bak
restore_backup
msg_info "Running Database Migrations"
cd /opt/anchor/server
+2 -7
View File
@@ -36,17 +36,12 @@ function update_script() {
systemctl stop anytype
msg_ok "Stopped Service"
msg_info "Backing up Data"
cp -r /opt/anytype/data /opt/anytype_data_backup
msg_ok "Backed up Data"
create_backup /opt/anytype/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
msg_info "Restoring Data"
cp -r /opt/anytype_data_backup/. /opt/anytype/data
rm -rf /opt/anytype_data_backup
msg_ok "Restored Data"
restore_backup
msg_info "Starting Service"
systemctl start anytype
+8 -12
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,13 +54,9 @@ function update_script() {
systemctl stop tomcat
msg_ok "Stopped Tomcat service"
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"
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 "Downloading Tomcat ${LATEST_VERSION}"
TOMCAT_URL="https://dlcdn.apache.org/tomcat/tomcat-${TOMCAT_MAJOR}/v${LATEST_VERSION}/bin/apache-tomcat-${LATEST_VERSION}.tar.gz"
@@ -78,7 +74,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/"
+3 -2
View File
@@ -37,16 +37,17 @@ 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
+5 -8
View File
@@ -34,22 +34,19 @@ function update_script() {
systemctl stop apache2
msg_ok "Stopped Service"
msg_info "Backing up data"
mv /opt/baikal /opt/baikal-backup
msg_ok "Backed up data"
create_backup /opt/baikal/config/baikal.yaml \
/opt/baikal/Specific/
PHP_APACHE="YES" PHP_VERSION="8.3" setup_php
setup_composer
fetch_and_deploy_gh_release "baikal" "sabre-io/Baikal" "tarball"
msg_info "Configuring Baikal"
cp -r /opt/baikal-backup/config/baikal.yaml /opt/baikal/config/
cp -r /opt/baikal-backup/Specific/ /opt/baikal/
restore_backup
chown -R www-data:www-data /opt/baikal/
chmod -R 755 /opt/baikal/
msg_info "Configuring Baikal"
cd /opt/baikal
$STD composer install
rm -rf /opt/baikal-backup
msg_ok "Configured Baikal"
msg_info "Starting Service"
+6 -18
View File
@@ -38,11 +38,11 @@ function update_script() {
msg_ok "Stopped Service"
msg_info "Backing up Configuration and Data"
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
create_backup /opt/bambuddy/.env \
/opt/bambuddy/data \
/opt/bambuddy/bambuddy.db \
/opt/bambuddy/bambutrack.db \
/opt/bambuddy/archive
msg_ok "Backed up Configuration and Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "bambuddy" "maziggy/bambuddy" "tarball" "latest" "/opt/bambuddy"
@@ -59,19 +59,7 @@ function update_script() {
$STD npm run build
msg_ok "Rebuilt Frontend"
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"
restore_backup
msg_info "Starting Service"
systemctl start bambuddy
+11 -15
View File
@@ -37,16 +37,15 @@ function update_script() {
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="pdo-sqlite" setup_php
msg_info "Backing up Bar Assistant"
mv /opt/bar-assistant /opt/bar-assistant-backup
msg_ok "Backed up Bar Assistant"
create_backup /opt/bar-assistant/.env \
/opt/bar-assistant/storage/bar-assistant
fetch_and_deploy_gh_release "bar-assistant" "karlomikus/bar-assistant" "tarball" "latest" "/opt/bar-assistant"
setup_composer
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
restore_backup
msg_info "Configuring Bar-Assistant"
cd /opt/bar-assistant
$STD composer install --no-interaction
$STD php artisan migrate --force
@@ -57,8 +56,7 @@ function update_script() {
$STD php artisan route:cache
$STD php artisan event:cache
chown -R www-data:www-data /opt/bar-assistant
rm -rf /opt/bar-assistant-backup
msg_ok "Updated Bar-Assistant"
msg_ok "Configured Bar-Assistant"
msg_info "Starting nginx"
systemctl start nginx
@@ -66,23 +64,21 @@ function update_script() {
fi
if check_for_gh_release "vue-salt-rim" "karlomikus/vue-salt-rim"; then
msg_info "Backing up Vue Salt Rim"
mv /opt/vue-salt-rim /opt/vue-salt-rim-backup
msg_ok "Backed up Vue Salt Rim"
create_backup /opt/vue-salt-rim/public/config.js
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 "Updating Vue Salt Rim"
cp /opt/vue-salt-rim-backup/public/config.js /opt/vue-salt-rim/public/config.js
msg_info "Configuring Vue Salt Rim"
cd /opt/vue-salt-rim
$STD npm install
$STD npm run build
rm -rf /opt/vue-salt-rim-backup
msg_ok "Updated Vue Salt Rim"
msg_ok "Configured Vue Salt Rim"
msg_info "Starting nginx"
systemctl start nginx
+6 -13
View File
@@ -35,27 +35,20 @@ function update_script() {
systemctl stop baserow-backend baserow-celery baserow-celery-beat baserow-celery-export baserow-frontend
msg_ok "Stopped Services"
msg_info "Backing up Data"
cp /opt/baserow/.env /opt/baserow.env.bak
msg_ok "Backed up Data"
create_backup /opt/baserow/.env
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "baserow" "baserow/baserow" "tarball"
restore_backup
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"
msg_info "Configuring Baserow"
cd /opt/baserow/backend
$STD uv sync --frozen --no-dev
msg_ok "Updated Backend Dependencies"
msg_ok "Configured Baserow"
msg_info "Updating Frontend"
msg_info "Rebuilding Frontend"
cd /opt/baserow/web-frontend
$STD npm install
$STD npm run build
msg_ok "Updated Frontend"
msg_ok "Rebuilt Frontend"
msg_info "Running Migrations"
cd /opt/baserow/backend
+6 -11
View File
@@ -36,18 +36,13 @@ function update_script() {
systemctl stop bentopdf
msg_ok "Stopped Service"
[[ -f /opt/bentopdf/.env.production ]] && cp /opt/bentopdf/.env.production /opt/production.env
create_backup /opt/bentopdf/.env.production
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "bentopdf" "alam00000/bentopdf" "tarball" "latest" "/opt/bentopdf"
restore_backup
msg_info "Updating BentoPDF"
msg_info "Configuring 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
@@ -64,9 +59,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"
cp /opt/bichon/bichon.env /tmp/bichon.env.backup
create_backup /opt/bichon/bichon.env
if [ "$MIGRATE_V1" -eq 1 ] && [ "$CURRENT_VERSION" != "0.3.7" ]; then
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
restore_backup
msg_info "Updating to intermediate version v0.3.7"
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"
cp /tmp/bichon.env.backup /opt/bichon/bichon.env
restore_backup
if [ "$MIGRATE_V1" -eq 1 ]; then
msg_info "Running Bichon v1 Data Migration (patience)"
+6 -8
View File
@@ -56,21 +56,19 @@ function update_script() {
bitmagnet \
>/tmp/backup.sql
mv /tmp/backup.sql /opt/
[ -f /opt/bitmagnet/.env ] && cp /opt/bitmagnet/.env /opt/
[ -f /opt/bitmagnet/config.yml ] && cp /opt/bitmagnet/config.yml /opt/
create_backup /opt/bitmagnet/.env \
/opt/bitmagnet/config.yml
msg_ok "Data backed up"
rm -rf /opt/bitmagnet
fetch_and_deploy_gh_release "bitmagnet" "bitmagnet-io/bitmagnet" "tarball"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "bitmagnet" "bitmagnet-io/bitmagnet" "tarball"
restore_backup
msg_info "Updating Bitmagnet"
msg_info "Configuring 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
[ -f "/opt/.env" ] && cp "/opt/.env" /opt/bitmagnet/
[ -f "/opt/config.yml" ] && cp "/opt/config.yml" /opt/bitmagnet/
msg_ok "Updated Bitmagnet"
msg_ok "Configured Bitmagnet"
msg_info "Starting Service"
systemctl start bitmagnet-web
+2 -8
View File
@@ -33,15 +33,9 @@ function update_script() {
systemctl stop blocky
msg_ok "Stopped Service"
msg_info "Backup Config"
mv /opt/blocky/config.yml /opt/config.yml
msg_ok "Backed Up Config"
create_backup /opt/blocky/config.yml
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "blocky" "0xERR0R/blocky" "prebuild" "latest" "/opt/blocky" "blocky_*_Linux_x86_64.tar.gz"
msg_info "Restore Config"
mv /opt/config.yml /opt/blocky/config.yml
msg_ok "Restored Config"
restore_backup
msg_info "Starting Service"
systemctl start blocky
+78
View File
@@ -0,0 +1,78 @@
#!/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}"
+5 -12
View File
@@ -36,20 +36,14 @@ function update_script() {
systemctl stop apache2
msg_ok "Services Stopped"
msg_info "Backing up data"
mv /opt/bookstack /opt/bookstack-backup
msg_ok "Backup finished"
create_backup /opt/bookstack/.env \
/opt/bookstack/public/uploads \
/opt/bookstack/storage/uploads \
/opt/bookstack/themes
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
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"
restore_backup
msg_info "Configuring BookStack"
cd /opt/bookstack
@@ -60,7 +54,6 @@ 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"
+3 -18
View File
@@ -34,25 +34,10 @@ function update_script() {
systemctl stop bytestash-backend bytestash-frontend
msg_ok "Services Stopped"
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"
[[ -d /opt/bytestash/data ]] && create_backup /opt/bytestash/data
[[ -d /opt/data ]] && create_backup /opt/data
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "bytestash" "jordan-dalby/ByteStash" "tarball"
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"
restore_backup
msg_info "Configuring ByteStash"
cd /opt/bytestash/server
+6
View File
@@ -0,0 +1,6 @@
____ __ ____ __ _ __
/ __ )____ ____ / /__/ __ \_____/ /_ (_) /_
/ __ / __ \/ __ \/ //_/ / / / ___/ __ \/ / __/
/ /_/ / /_/ / /_/ / ,< / /_/ / / / /_/ / / /_
/_____/\____/\____/_/|_|\____/_/ /_.___/_/\__/
+99
View File
@@ -0,0 +1,99 @@
#!/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
+1 -1
View File
@@ -8098,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