Compare commits

...

7 Commits

Author SHA1 Message Date
CanbiZ (MickLesk) 803b952990 core: improve mirror selection and error handling
Refactor mirror selection and update warning messages during package installation failures.
2026-06-15 09:18:16 +02:00
community-scripts-pr-app[bot] cfb84ae12d Update CHANGELOG.md (#15101)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-14 12:32:32 +00:00
Slaviša Arežina f37bf50a47 Refactor (#15096) 2026-06-14 14:32:06 +02:00
community-scripts-pr-app[bot] 4a09cac506 Update CHANGELOG.md (#15100)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-14 12:00:59 +00:00
community-scripts-pr-app[bot] 5831cc246a Update CHANGELOG.md (#15099)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-14 12:00:36 +00:00
CanbiZ (MickLesk) bcea631c30 Iinvoiceninja: fix nginx setup assets port (#15090) 2026-06-14 14:00:32 +02:00
CanbiZ (MickLesk) d9e6e6ea3d fix(checkmk): remove stale backup site before creating new backup during update (#15088) 2026-06-14 14:00:10 +02:00
25 changed files with 106 additions and 188 deletions
+11
View File
@@ -485,6 +485,17 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
## 2026-06-14 ## 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 ## 2026-06-13
### 🆕 New Scripts ### 🆕 New Scripts
+3 -9
View File
@@ -35,10 +35,8 @@ function update_script() {
systemctl stop calibre-web systemctl stop calibre-web
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up Data" create_backup /opt/calibre-web/app.db \
cp -r /opt/calibre-web/app.db /opt/app.db_backup /opt/calibre-web/data
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" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "Calibre-Web" "janeczku/calibre-web" "prebuild" "latest" "/opt/calibre-web" "calibre-web*.tar.gz"
setup_uv setup_uv
@@ -50,11 +48,7 @@ function update_script() {
$STD uv pip install --python /opt/calibre-web/.venv/bin/python --no-cache-dir -r requirements.txt $STD uv pip install --python /opt/calibre-web/.venv/bin/python --no-cache-dir -r requirements.txt
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
msg_info "Restoring Data" restore_backup
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" msg_info "Starting Service"
systemctl start calibre-web systemctl start calibre-web
+2 -7
View File
@@ -35,16 +35,11 @@ function update_script() {
systemctl stop certimate systemctl stop certimate
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up Data" create_backup /opt/certimate/pb_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" fetch_and_deploy_gh_release "certimate" "certimate-go/certimate" "prebuild" "latest" "/opt/certimate" "certimate_*_linux_amd64.zip"
msg_info "Restoring Data" restore_backup
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" msg_info "Starting Service"
systemctl start certimate systemctl start certimate
+3 -8
View File
@@ -35,10 +35,8 @@ function update_script() {
systemctl stop checkmate-server checkmate-client nginx systemctl stop checkmate-server checkmate-client nginx
msg_ok "Stopped Services" msg_ok "Stopped Services"
msg_info "Backing up Data" create_backup /opt/checkmate/server/.env \
cp /opt/checkmate/server/.env /opt/checkmate_server.env.bak /opt/checkmate/client/.env.local
[ -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" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "checkmate" "bluewave-labs/Checkmate" "tarball"
@@ -56,10 +54,7 @@ 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 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" msg_ok "Updated Checkmate Client"
msg_info "Restoring Data" restore_backup
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" msg_info "Starting Services"
systemctl start checkmate-server checkmate-client nginx systemctl start checkmate-server checkmate-client nginx
+1
View File
@@ -33,6 +33,7 @@ function update_script() {
RELEASE="${RELEASE%%+*}" RELEASE="${RELEASE%%+*}"
msg_info "Updating checkmk" msg_info "Updating checkmk"
$STD omd stop monitoring $STD omd stop monitoring
$STD omd -f rm monitoringbackup 2>/dev/null || true
$STD omd cp monitoring monitoringbackup $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" 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 $STD apt install -y /opt/checkmk.deb
+2 -7
View File
@@ -33,16 +33,11 @@ function update_script() {
systemctl stop cleanuparr systemctl stop cleanuparr
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up config" create_backup /opt/cleanuparr/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" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "Cleanuparr" "Cleanuparr/Cleanuparr" "prebuild" "latest" "/opt/cleanuparr" "*linux-amd64.zip"
msg_info "Restoring config" restore_backup
[[ -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" msg_info "Starting Service"
systemctl start cleanuparr systemctl start cleanuparr
+2 -11
View File
@@ -36,20 +36,11 @@ function update_script() {
msg_ok "Stopped Service" msg_ok "Stopped Service"
ensure_dependencies rsync 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" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "commafeed" "Athou/commafeed" "prebuild" "latest" "/opt/commafeed" "commafeed-*-h2-jvm.zip"
if [ -d /opt/data.bak ] && [ "$(ls -A /opt/data.bak)" ]; then restore_backup
msg_info "Restoring data"
mv /opt/data.bak /opt/commafeed/data
msg_ok "Restored data"
fi
msg_info "Starting Service" msg_info "Starting Service"
systemctl start commafeed systemctl start commafeed
+6 -4
View File
@@ -33,11 +33,13 @@ function update_script() {
systemctl stop configarr-task.timer systemctl stop configarr-task.timer
msg_ok "Stopped Service" msg_ok "Stopped Service"
mkdir -p /opt/backup/ create_backup /opt/configarr/config.yml \
mv /opt/configarr/{config.yml,secrets.yml,.env} /opt/backup/ /opt/configarr/secrets.yml \
/opt/configarr/.env
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "configarr" "raydak-labs/configarr" "prebuild" "latest" "/opt/configarr" "configarr-linux-x64.tar.xz" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "configarr" "raydak-labs/configarr" "prebuild" "latest" "/opt/configarr" "configarr-linux-x64.tar.xz"
mv /opt/backup/{config.yml,secrets.yml,.env} /opt/configarr/
rm -rf /opt/backup restore_backup
msg_info "Starting Service" msg_info "Starting Service"
systemctl start configarr-task.timer systemctl start configarr-task.timer
+4 -9
View File
@@ -36,19 +36,14 @@ function update_script() {
ensure_dependencies libreoffice-writer ensure_dependencies libreoffice-writer
msg_info "Move data-Folder" create_backup /opt/convertx/data
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" fetch_and_deploy_gh_release "ConvertX" "C4illin/ConvertX" "tarball" "latest" "/opt/convertx"
restore_backup
msg_info "Updating ConvertX" msg_info "Updating ConvertX"
if [[ -d /opt/data ]]; then cd /opt/convertx
mv /opt/data /opt/convertx/data
fi
cd /opt/convertx
$STD bun install $STD bun install
msg_ok "Updated ConvertX" msg_ok "Updated ConvertX"
+7 -13
View File
@@ -30,20 +30,17 @@ function update_script() {
fi 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/"//') 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" msg_info "Stopping Crafty-Controller"
systemctl stop crafty-controller systemctl stop crafty-controller
msg_ok "Stopped Crafty-Controller" msg_ok "Stopped Crafty-Controller"
msg_info "Creating Backup of config" create_backup /opt/crafty-controller/crafty/crafty-4/app/config/version.json \
cp -a /opt/crafty-controller/crafty/crafty-4/app/config/. /opt/crafty-controller/backup /opt/crafty-controller/crafty/crafty-4/app/config/credits.json \
rm /opt/crafty-controller/backup/version.json /opt/crafty-controller/crafty/crafty-4/app/config/logging.json \
rm /opt/crafty-controller/backup/credits.json /opt/crafty-controller/crafty/crafty-4/app/config/default.json.example \
rm /opt/crafty-controller/backup/logging.json /opt/crafty-controller/crafty/crafty-4/app/config/motd_format.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}" 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") 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")
@@ -58,11 +55,8 @@ function update_script() {
echo "${RELEASE}" >"/opt/crafty-controller_version.txt" echo "${RELEASE}" >"/opt/crafty-controller_version.txt"
msg_ok "Updated Crafty-Controller to v${RELEASE}" msg_ok "Updated Crafty-Controller to v${RELEASE}"
msg_info "Restoring Backup of config" restore_backup
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/ chown -R crafty:crafty /opt/crafty-controller/
msg_ok "Backup Restored"
msg_info "Starting Crafty-Controller" msg_info "Starting Crafty-Controller"
systemctl start crafty-controller systemctl start crafty-controller
+9 -12
View File
@@ -34,21 +34,18 @@ function update_script() {
systemctl stop cryptpad systemctl stop cryptpad
msg_info "Stopped Service" msg_info "Stopped Service"
msg_info "Creating backup" create_backup /opt/cryptpad/config/config.js \
[ -f /opt/cryptpad/config/config.js ] && mv /opt/cryptpad/config/config.js /opt/ /opt/cryptpad/blob \
for dir in blob block customize data datastore www/common/onlyoffice/dist onlyoffice-conf; do /opt/cryptpad/block \
[ -d "/opt/cryptpad/${dir}" ] && mv "/opt/cryptpad/${dir}" "/tmp/cryptpad_${dir//\//_}" /opt/cryptpad/customize \
done /opt/cryptpad/data \
msg_ok "Created backup" /opt/cryptpad/datastore \
/opt/cryptpad/www/common/onlyoffice/dist \
/opt/cryptpad/onlyoffice-conf
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "cryptpad" "cryptpad/cryptpad" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "cryptpad" "cryptpad/cryptpad" "tarball"
msg_info "Restoring backup" restore_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" msg_info "Updating CryptPad"
cd /opt/cryptpad cd /opt/cryptpad
+2 -8
View File
@@ -35,17 +35,11 @@ function update_script() {
systemctl stop dagu systemctl stop dagu
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up Data" create_backup /opt/dagu/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" fetch_and_deploy_gh_release "dagu" "dagucloud/dagu" "prebuild" "latest" "/opt/dagu" "dagu_*_linux_amd64.tar.gz"
msg_info "Restoring Data" restore_backup
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" msg_info "Starting Service"
systemctl start dagu systemctl start dagu
+2 -8
View File
@@ -36,10 +36,7 @@ function update_script() {
systemctl stop dashy systemctl stop dashy
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up user-data" create_backup /opt/dashy/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" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "dashy" "lissy93/dashy" "prebuild" "latest" "/opt/dashy" "dashy-*.tar.gz"
@@ -48,10 +45,7 @@ function update_script() {
$STD yarn install --ignore-engines --network-timeout 300000 $STD yarn install --ignore-engines --network-timeout 300000
msg_ok "Updated Dashy" msg_ok "Updated Dashy"
msg_info "Restoring user-data" restore_backup
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" msg_info "Starting Dashy"
systemctl start dashy systemctl start dashy
+2 -11
View File
@@ -35,12 +35,7 @@ function update_script() {
$STD systemctl stop databasus $STD systemctl stop databasus
msg_ok "Stopped Databasus" msg_ok "Stopped Databasus"
msg_info "Backing up Configuration" create_backup /opt/databasus/.env
[[ ! -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" msg_info "Ensuring Database Clients"
# Create PostgreSQL version symlinks for compatibility # Create PostgreSQL version symlinks for compatibility
@@ -87,11 +82,7 @@ function update_script() {
chown -R postgres:postgres /opt/databasus chown -R postgres:postgres /opt/databasus
msg_ok "Updated Databasus" msg_ok "Updated Databasus"
msg_info "Restoring Configuration" restore_backup
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 if ! grep -q "EnvironmentFile=/.env" /etc/systemd/system/databasus.service; then
msg_info "Updating Service" msg_info "Updating Service"
+4 -11
View File
@@ -37,11 +37,9 @@ function update_script() {
systemctl stop dawarich-web dawarich-worker systemctl stop dawarich-web dawarich-worker
msg_ok "Stopped Services" msg_ok "Stopped Services"
msg_info "Backing up Data" create_backup /opt/dawarich/app/storage \
cp -r /opt/dawarich/app/storage /opt/dawarich_storage_backup 2>/dev/null || true /opt/dawarich/app/config/master.key \
cp /opt/dawarich/app/config/master.key /opt/dawarich_master.key 2>/dev/null || true /opt/dawarich/app/config/credentials.yml.enc
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" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "dawarich" "Freika/dawarich" "tarball" "latest" "/opt/dawarich/app"
@@ -85,12 +83,7 @@ function update_script() {
$STD bundle exec rake data:migrate $STD bundle exec rake data:migrate
msg_ok "Ran Migrations" msg_ok "Ran Migrations"
msg_info "Restoring Data" restore_backup
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" msg_info "Starting Services"
systemctl start dawarich-web dawarich-worker systemctl start dawarich-web dawarich-worker
+2 -7
View File
@@ -33,16 +33,11 @@ function update_script() {
systemctl stop ddns-updater systemctl stop ddns-updater
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up Data" create_backup /opt/ddns-updater/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" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "ddns-updater" "qdm12/ddns-updater" "singlefile" "latest" "/opt/ddns-updater" "ddns-updater_*_linux_amd64"
msg_info "Restoring Data" restore_backup
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" msg_info "Starting Service"
systemctl start ddns-updater systemctl start ddns-updater
+3 -7
View File
@@ -35,10 +35,8 @@ function update_script() {
systemctl stop degoog systemctl stop degoog
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up Configuration & Data" create_backup /opt/degoog/.env \
[[ -f /opt/degoog/.env ]] && cp /opt/degoog/.env /opt/degoog.env.bak /opt/degoog/data
[[ -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 if ! command -v bun >/dev/null 2>&1; then
msg_info "Installing Bun" msg_info "Installing Bun"
@@ -55,9 +53,7 @@ function update_script() {
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "degoog" "fccview/degoog" "prebuild" "latest" "/opt/degoog" "degoog_*_prebuild.tar.gz" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "degoog" "fccview/degoog" "prebuild" "latest" "/opt/degoog" "degoog_*_prebuild.tar.gz"
msg_info "Restoring Configuration & Data" restore_backup
[[ -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 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 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
+2 -9
View File
@@ -37,19 +37,12 @@ function update_script() {
systemctl stop discopanel systemctl stop discopanel
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Creating Backup" create_backup /opt/discopanel/data/discopanel.db
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" 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 ln -sf /opt/discopanel/discopanel-linux-amd64 /opt/discopanel/discopanel
msg_info "Restoring Data" restore_backup
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" msg_info "Starting Service"
systemctl start discopanel systemctl start discopanel
+5 -11
View File
@@ -37,25 +37,19 @@ function update_script() {
systemctl stop docmost systemctl stop docmost
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up data" create_backup /opt/docmost/.env \
cp /opt/docmost/.env /opt/ /opt/docmost/data
cp -r /opt/docmost/data /opt/
rm -rf /opt/docmost
msg_ok "Data backed up"
fetch_and_deploy_gh_release "docmost" "docmost/docmost" "tarball" fetch_and_deploy_gh_release "docmost" "docmost/docmost" "tarball"
msg_info "Updating ${APP}" restore_backup
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 # Fix: Docmost EE (audit logs etc.) lives in a git submodule that is NOT
# included in GitHub tarballs. The community NoopAuditService exists but # included in GitHub tarballs. The community NoopAuditService exists but
# is only exported by CoreModule child modules such as UserModule cannot # is only exported by CoreModule child modules such as UserModule cannot
# resolve it. Making CoreModule @Global() exposes the token app-wide. # resolve it. Making CoreModule @Global() exposes the token app-wide.
if [[ ! -f /opt/docmost/apps/server/src/ee/ee.module.ts ]] \ 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 ! 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,$/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 sed -i '/^@Module({$/i @Global()' /opt/docmost/apps/server/src/core/core.module.ts
fi fi
+4 -9
View File
@@ -35,24 +35,19 @@ function update_script() {
systemctl stop docuseal docuseal-sidekiq systemctl stop docuseal docuseal-sidekiq
msg_ok "Stopped Services" msg_ok "Stopped Services"
msg_info "Backing up Data" create_backup /opt/docuseal/.env \
cp /opt/docuseal/.env /opt/docuseal.env.bak /opt/docuseal/data
[[ -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" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "docuseal" "docusealco/docuseal" "tarball"
local required_ruby current_ruby local required_ruby current_ruby
required_ruby=$(grep -m1 '^ruby ' /opt/docuseal/Gemfile | grep -oP '[0-9]+\.[0-9]+\.[0-9]+') 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) 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 RUBY_VERSION="${required_ruby}" RUBY_INSTALL_RAILS="false" HOME=/root setup_ruby
fi fi
msg_info "Restoring Data" restore_backup
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" msg_info "Building Application"
cd /opt/docuseal cd /opt/docuseal
+2 -6
View File
@@ -43,9 +43,7 @@ function update_script() {
systemctl stop apache2 systemctl stop apache2
msg_info "Service stopped" msg_info "Service stopped"
msg_info "Creating backup" create_backup /opt/domain-monitor/.env
mv /opt/domain-monitor/.env /opt
msg_ok "Created backup"
setup_composer setup_composer
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "domain-monitor" "Hosteroid/domain-monitor" "prebuild" "latest" "/opt/domain-monitor" "domain-monitor-v*.zip" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "domain-monitor" "Hosteroid/domain-monitor" "prebuild" "latest" "/opt/domain-monitor" "domain-monitor-v*.zip"
@@ -56,9 +54,7 @@ function update_script() {
chown -R www-data:www-data /opt/domain-monitor chown -R www-data:www-data /opt/domain-monitor
msg_ok "Updated Domain Monitor" msg_ok "Updated Domain Monitor"
msg_info "Restoring backup" restore_backup
mv /opt/.env /opt/domain-monitor
msg_ok "Restored backup"
msg_info "Restarting Services" msg_info "Restarting Services"
systemctl start apache2 systemctl start apache2
+3 -7
View File
@@ -35,18 +35,14 @@ function update_script() {
systemctl stop donetick systemctl stop donetick
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing Up Configurations" create_backup /opt/donetick/config/selfhosted.yaml \
mv /opt/donetick/config/selfhosted.yaml /opt/donetick/donetick.db /opt /opt/donetick/donetick.db
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" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "donetick" "donetick/donetick" "prebuild" "latest" "/opt/donetick" "donetick_Linux_x86_64.tar.gz"
msg_info "Restoring Configurations" restore_backup
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 '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 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" msg_info "Starting Service"
systemctl start donetick systemctl start donetick
+4 -10
View File
@@ -35,19 +35,13 @@ function update_script() {
systemctl stop dynacat systemctl stop dynacat
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up Data" create_backup /opt/dynacat/config \
cp -r /opt/dynacat/config /opt/dynacat_config_backup /opt/dynacat/assets \
cp -r /opt/dynacat/assets /opt/dynacat_assets_backup /opt/dynacat/data
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" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "dynacat" "Panonim/dynacat" "prebuild" "latest" "/opt/dynacat" "dynacat-linux-amd64.tar.gz"
msg_info "Restoring Data" restore_backup
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 chmod +x /opt/dynacat/dynacat
msg_ok "Restored Data" msg_ok "Restored Data"
+2
View File
@@ -133,6 +133,8 @@ server {
fastcgi_pass unix:/run/php/php8.4-fpm.sock; fastcgi_pass unix:/run/php/php8.4-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params; include fastcgi_params;
fastcgi_param HTTP_X_FORWARDED_HOST $http_host;
fastcgi_param HTTP_X_FORWARDED_PROTO $scheme;
fastcgi_read_timeout 300; fastcgi_read_timeout 300;
} }
+19 -4
View File
@@ -4379,10 +4379,12 @@ EOF
pct exec "$CTID" -- bash -c "apt-get update 2>&1 && apt-get install -y ${_base_pkgs} 2>&1" >>"$BUILD_LOG" 2>&1 || { 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 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") 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}), trying alternate mirrors..." msg_warn "apt-get update failed (${failed_mirror})."
msg_custom "️" "${YW}" "Probing alternate mirrors (this can take 1-2 minutes on network issues)"
local mirror_exit=0 local mirror_exit=0
pct exec "$CTID" -- env APT_BASE="$_base_pkgs" bash -c ' pct exec "$CTID" -- env APT_BASE="$_base_pkgs" bash -c '
DISTRO=$(. /etc/os-release 2>/dev/null && echo "$ID" || echo "debian") DISTRO=$(. /etc/os-release 2>/dev/null && echo "$ID" || echo "debian")
echo " Mirror fallback for distro: $DISTRO"
if [ "$DISTRO" = "ubuntu" ]; then 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" 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"
@@ -4440,15 +4442,21 @@ EOF
} }
# Phase 1: Scan global mirrors first (independent of local CDN issues) # 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_OK=$(scan_reachable "$OTHERS")
OTHERS_PICK=$(printf "%s\n" $OTHERS_OK | shuf | head -3 | xargs) 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 for mirror in $OTHERS_PICK; do
echo " Attempting mirror: $mirror" echo " Attempting mirror: $mirror"
try_mirrors "$mirror" && exit 0 try_mirrors "$mirror" && exit 0
done done
# Phase 2: Try primary mirror # Phase 2: Try primary mirror
echo " Phase 2/3: Trying primary mirror..."
if [ "$DISTRO" = "ubuntu" ]; then if [ "$DISTRO" = "ubuntu" ]; then
PRIMARY="archive.ubuntu.com" PRIMARY="archive.ubuntu.com"
else else
@@ -4460,9 +4468,14 @@ EOF
fi fi
# Phase 3: Fall back to regional mirrors # Phase 3: Fall back to regional mirrors
echo " Phase 3/3: Scanning regional mirrors..."
REGIONAL_OK=$(scan_reachable "$REGIONAL") REGIONAL_OK=$(scan_reachable "$REGIONAL")
REGIONAL_PICK=$(printf "%s\n" $REGIONAL_OK | shuf | head -3 | xargs) 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 for mirror in $REGIONAL_PICK; do
echo " Attempting mirror: $mirror" echo " Attempting mirror: $mirror"
try_mirrors "$mirror" && exit 0 try_mirrors "$mirror" && exit 0
@@ -4496,12 +4509,14 @@ EOF
msg_warn "Mirror '${custom_mirror}' also failed. Try another or type 'skip'." msg_warn "Mirror '${custom_mirror}' also failed. Try another or type 'skip'."
done done
if [[ "$custom_mirror" == "skip" ]]; then if [[ "$custom_mirror" == "skip" ]]; then
msg_error "apt-get base packages installation failed" msg_warn "Mirror selection aborted by user ('skip')"
install_exit_code=1 msg_warn "Aborting installation before base package bootstrap"
post_update_to_api "aborted" "130" "force"
install_exit_code=130
fi fi
elif [[ $mirror_exit -ne 0 ]]; then elif [[ $mirror_exit -ne 0 ]]; then
msg_error "apt-get base packages installation failed" msg_error "apt-get base packages installation failed"
install_exit_code=1 install_exit_code=100
fi fi
} }
fi fi