Compare commits

..

4 Commits

Author SHA1 Message Date
MickLesk 1b195cbd1c refactor(ct): migrate manual update backups to create_backup (batch 2)
Manually standardize 52 more update scripts with clear backup/restore
patterns, including multi-path and post-build restore timing where needed.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-19 23:42:12 +02:00
MickLesk a1f4bc3240 refactor(ct): migrate manual update backups to create_backup (batch 1)
Replace ad-hoc mv/cp .bak patterns with create_backup/restore_backup across
58 update scripts so failed updates can roll back via the shared ERR trap.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-19 23:35:15 +02:00
MickLesk 578089b69e chore(ci): add create_backup gap report for update scripts
Summarize how many CT update_script blocks still need backup migration.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-19 23:29:44 +02:00
MickLesk c9c456f340 feat(tools): auto-restore update backups on failure
Arm create_backup with an ERR trap, add clear_update_backup, and ship a CI checker for update scripts that mutate config without backups.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-19 22:47:03 +02:00
114 changed files with 393 additions and 932 deletions
+2 -8
View File
@@ -30,16 +30,10 @@ function update_script() {
fi fi
if check_for_gh_release "cinny" "cinnyapp/cinny"; then if check_for_gh_release "cinny" "cinnyapp/cinny"; then
msg_info "Backing up Configuration" create_backup /opt/cinny/config.json
cp /opt/cinny/config.json /opt/cinny_config.json.bak
msg_ok "Backed up Configuration"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "cinny" "cinnyapp/cinny" "prebuild" "latest" "/opt/cinny" "cinny-*.tar.gz" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "cinny" "cinnyapp/cinny" "prebuild" "latest" "/opt/cinny" "cinny-*.tar.gz"
restore_backup
msg_info "Restoring Configuration"
cp /opt/cinny_config.json.bak /opt/cinny/config.json
rm -f /opt/cinny_config.json.bak
msg_ok "Restored Configuration"
msg_info "Restarting nginx" msg_info "Restarting nginx"
$STD rc-service nginx restart $STD rc-service nginx restart
+2 -4
View File
@@ -33,15 +33,13 @@ function update_script() {
rc-service garage stop || true rc-service garage stop || true
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing Up Data" create_backup /etc/garage.toml
cp /usr/local/bin/garage /usr/local/bin/garage.old 2>/dev/null || true
cp /etc/garage.toml /etc/garage.toml.bak 2>/dev/null || true
msg_ok "Backed Up Data"
msg_info "Updating Garage" msg_info "Updating Garage"
curl -fsSL "https://garagehq.deuxfleurs.fr/_releases/${GITEA_RELEASE}/$(arch_resolve "x86_64" "aarch64")-unknown-linux-musl/garage" -o /usr/local/bin/garage curl -fsSL "https://garagehq.deuxfleurs.fr/_releases/${GITEA_RELEASE}/$(arch_resolve "x86_64" "aarch64")-unknown-linux-musl/garage" -o /usr/local/bin/garage
chmod +x /usr/local/bin/garage chmod +x /usr/local/bin/garage
echo "${GITEA_RELEASE}" >~/.garage echo "${GITEA_RELEASE}" >~/.garage
clear_update_backup
msg_ok "Updated Garage" msg_ok "Updated Garage"
msg_info "Starting Service" msg_info "Starting Service"
+2 -8
View File
@@ -33,18 +33,12 @@ function update_script() {
rc-service ironclaw stop 2>/dev/null || true rc-service ironclaw stop 2>/dev/null || true
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up Configuration" create_backup /root/.ironclaw/.env
cp /root/.ironclaw/.env /root/ironclaw.env.bak
msg_ok "Backed up Configuration"
fetch_and_deploy_gh_release "ironclaw-bin" "nearai/ironclaw" "prebuild" "latest" "/usr/local/bin" \ fetch_and_deploy_gh_release "ironclaw-bin" "nearai/ironclaw" "prebuild" "latest" "/usr/local/bin" \
"ironclaw-$(uname -m)-unknown-linux-musl.tar.gz" "ironclaw-$(uname -m)-unknown-linux-musl.tar.gz"
chmod +x /usr/local/bin/ironclaw chmod +x /usr/local/bin/ironclaw
restore_backup
msg_info "Restoring Configuration"
cp /root/ironclaw.env.bak /root/.ironclaw/.env
rm -f /root/ironclaw.env.bak
msg_ok "Restored Configuration"
msg_info "Starting Service" msg_info "Starting Service"
rc-service ironclaw start rc-service ironclaw start
+4 -8
View File
@@ -34,10 +34,8 @@ function update_script() {
systemctl stop endurain systemctl stop endurain
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Creating Backup" create_backup /opt/endurain/.env
cp /opt/endurain/.env /opt/endurain.env [[ -f /opt/endurain/frontend/app/dist/env.js ]] && cp /opt/endurain/frontend/app/dist/env.js /opt/endurain.env.js
cp /opt/endurain/frontend/app/dist/env.js /opt/endurain.env.js
msg_ok "Created Backup"
CLEAN_INSTALL=1 fetch_and_deploy_codeberg_release "endurain" "endurain-project/endurain" "tarball" "latest" "/opt/endurain" CLEAN_INSTALL=1 fetch_and_deploy_codeberg_release "endurain" "endurain-project/endurain" "tarball" "latest" "/opt/endurain"
@@ -47,16 +45,14 @@ function update_script() {
/opt/endurain/{docs,example.env,screenshot_01.png} \ /opt/endurain/{docs,example.env,screenshot_01.png} \
/opt/endurain/docker* \ /opt/endurain/docker* \
/opt/endurain/*.yml /opt/endurain/*.yml
cp /opt/endurain.env /opt/endurain/.env restore_backup
rm /opt/endurain.env
msg_ok "Prepared Update" msg_ok "Prepared Update"
msg_info "Updating Frontend" msg_info "Updating Frontend"
cd /opt/endurain/frontend/app cd /opt/endurain/frontend/app
$STD npm ci $STD npm ci
$STD npm run build $STD npm run build
cp /opt/endurain.env.js /opt/endurain/frontend/app/dist/env.js [[ -f /opt/endurain.env.js ]] && cp /opt/endurain.env.js /opt/endurain/frontend/app/dist/env.js && rm -f /opt/endurain.env.js
rm /opt/endurain.env.js
msg_ok "Updated Frontend" msg_ok "Updated Frontend"
msg_info "Updating Backend" msg_info "Updating Backend"
+2 -12
View File
@@ -35,21 +35,11 @@ function update_script() {
systemctl stop ezbookkeeping systemctl stop ezbookkeeping
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up configuration" create_backup /opt/ezbookkeeping/data /opt/ezbookkeeping/storage
mkdir -p /opt/ezbookkeeping-backup
cp /opt/ezbookkeeping/conf/ezbookkeeping.ini /opt/ezbookkeeping-backup/
cp -r /opt/ezbookkeeping/data /opt/ezbookkeeping-backup/data/
cp -r /opt/ezbookkeeping/storage /opt/ezbookkeeping-backup/storage/
msg_ok "Backed up configuration"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "ezbookkeeping" "mayswind/ezbookkeeping" "prebuild" "latest" "/opt/ezbookkeeping" "ezbookkeeping-*-linux-$(arch_resolve).tar.gz" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "ezbookkeeping" "mayswind/ezbookkeeping" "prebuild" "latest" "/opt/ezbookkeeping" "ezbookkeeping-*-linux-$(arch_resolve).tar.gz"
restore_backup
msg_info "Restoring configuration"
cp -rf /opt/ezbookkeeping-backup/ezbookkeeping.ini /opt/ezbookkeeping/conf/
cp -rf /opt/ezbookkeeping-backup/data/. /opt/ezbookkeeping/data/
cp -rf /opt/ezbookkeeping-backup/storage/. /opt/ezbookkeeping/storage/
rm -rf /opt/ezbookkeeping-backup
msg_ok "Restored configuration"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start ezbookkeeping systemctl start ezbookkeeping
+3 -2
View File
@@ -35,9 +35,10 @@ function update_script() {
systemctl stop fireshare systemctl stop fireshare
msg_ok "Stopped Service" msg_ok "Stopped Service"
mv /opt/fireshare/fireshare.env /opt create_backup /opt/fireshare/fireshare.env
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "fireshare" "ShaneIsrael/fireshare" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "fireshare" "ShaneIsrael/fireshare" "tarball"
mv /opt/fireshare.env /opt/fireshare restore_backup
rm -f /usr/local/bin/fireshare rm -f /usr/local/bin/fireshare
msg_info "Updating Fireshare" msg_info "Updating Fireshare"
+2 -13
View File
@@ -35,21 +35,10 @@ function update_script() {
systemctl stop nginx systemctl stop nginx
msg_ok "Stopped Service" msg_ok "Stopped Service"
if [[ -f /opt/fladder/assets/config/config.json ]]; then create_backup /opt/fladder/assets/config/config.json
msg_info "Backing up configuration"
cp /opt/fladder/assets/config/config.json /tmp/fladder_config.json.bak
msg_ok "Configuration backed up"
fi
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "Fladder" "DonutWare/Fladder" "prebuild" "latest" "/opt/fladder" "Fladder-Web-*.zip" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "Fladder" "DonutWare/Fladder" "prebuild" "latest" "/opt/fladder" "Fladder-Web-*.zip"
restore_backup
if [[ -f /tmp/fladder_config.json.bak ]]; then
msg_info "Restoring configuration"
mkdir -p /opt/fladder/assets/config
cp /tmp/fladder_config.json.bak /opt/fladder/assets/config/config.json
rm -f /tmp/fladder_config.json.bak
msg_ok "Configuration restored"
fi
msg_info "Starting Service" msg_info "Starting Service"
systemctl start nginx systemctl start nginx
+2 -10
View File
@@ -34,12 +34,10 @@ function update_script() {
systemctl stop flatnotes systemctl stop flatnotes
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up Configuration and Data" create_backup /opt/flatnotes/data
cp /opt/flatnotes/.env /opt/flatnotes.env
cp -r /opt/flatnotes/data /opt/flatnotes_data_backup
msg_ok "Backed up Configuration and Data"
fetch_and_deploy_gh_release "flatnotes" "dullage/flatnotes" "tarball" fetch_and_deploy_gh_release "flatnotes" "dullage/flatnotes" "tarball"
restore_backup
msg_info "Updating Flatnotes" msg_info "Updating Flatnotes"
cd /opt/flatnotes/client cd /opt/flatnotes/client
@@ -52,12 +50,6 @@ function update_script() {
$STD /usr/local/bin/uv sync $STD /usr/local/bin/uv sync
msg_ok "Updated Flatnotes" msg_ok "Updated Flatnotes"
msg_info "Restoring Configuration and Data"
cp /opt/flatnotes.env /opt/flatnotes/.env
cp -r /opt/flatnotes_data_backup/. /opt/flatnotes/data
rm -f /opt/flatnotes.env
rm -r /opt/flatnotes_data_backup
msg_ok "Restored Configuration and Data"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start flatnotes systemctl start flatnotes
+2 -14
View File
@@ -41,20 +41,11 @@ function update_script() {
systemctl stop apache2 systemctl stop apache2
msg_ok "Stopped Apache2" msg_ok "Stopped Apache2"
msg_info "Backing up FreshRSS" create_backup /opt/freshrss /opt/freshrss/data /opt/freshrss/extensions
mv /opt/freshrss /opt/freshrss-backup
msg_ok "Backup Created"
fetch_and_deploy_gh_release "freshrss" "FreshRSS/FreshRSS" "tarball" fetch_and_deploy_gh_release "freshrss" "FreshRSS/FreshRSS" "tarball"
restore_backup
msg_info "Restoring data and configuration"
if [[ -d /opt/freshrss-backup/data ]]; then
cp -a /opt/freshrss-backup/data/. /opt/freshrss/data/
fi
if [[ -d /opt/freshrss-backup/extensions ]]; then
cp -a /opt/freshrss-backup/extensions/. /opt/freshrss/extensions/
fi
msg_ok "Data Restored"
msg_info "Setting permissions" msg_info "Setting permissions"
chown -R www-data:www-data /opt/freshrss chown -R www-data:www-data /opt/freshrss
@@ -66,9 +57,6 @@ function update_script() {
systemctl start apache2 systemctl start apache2
msg_ok "Started Apache2" msg_ok "Started Apache2"
msg_info "Cleaning up backup"
rm -rf /opt/freshrss-backup
msg_ok "Cleaned up backup"
msg_ok "Updated successfully!" msg_ok "Updated successfully!"
fi fi
exit exit
+2 -4
View File
@@ -34,15 +34,13 @@ function update_script() {
systemctl stop garage systemctl stop garage
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing Up Data" create_backup /etc/garage.toml
cp /usr/local/bin/garage /usr/local/bin/garage.old 2>/dev/null || true
cp /etc/garage.toml /etc/garage.toml.bak 2>/dev/null || true
msg_ok "Backed Up Data"
msg_info "Updating Garage" msg_info "Updating Garage"
curl -fsSL "https://garagehq.deuxfleurs.fr/_releases/${GITEA_RELEASE}/x86_64-unknown-linux-musl/garage" -o /usr/local/bin/garage curl -fsSL "https://garagehq.deuxfleurs.fr/_releases/${GITEA_RELEASE}/x86_64-unknown-linux-musl/garage" -o /usr/local/bin/garage
chmod +x /usr/local/bin/garage chmod +x /usr/local/bin/garage
echo "${GITEA_RELEASE}" >~/.garage echo "${GITEA_RELEASE}" >~/.garage
clear_update_backup
msg_ok "Updated Garage" msg_ok "Updated Garage"
msg_info "Starting Service" msg_info "Starting Service"
+3 -2
View File
@@ -34,15 +34,16 @@ function update_script() {
systemctl stop gatus systemctl stop gatus
msg_ok "Stopped Service" msg_ok "Stopped Service"
mv /opt/gatus/config/config.yaml /opt create_backup /opt/gatus/config/config.yaml
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "gatus" "TwiN/gatus" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "gatus" "TwiN/gatus" "tarball"
restore_backup
msg_info "Updating Gatus" msg_info "Updating Gatus"
cd /opt/gatus cd /opt/gatus
$STD go mod tidy $STD go mod tidy
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o gatus . CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o gatus .
setcap CAP_NET_RAW+ep gatus setcap CAP_NET_RAW+ep gatus
mv /opt/config.yaml config
msg_ok "Updated Gatus" msg_ok "Updated Gatus"
msg_info "Starting Service" msg_info "Starting Service"
+2 -9
View File
@@ -35,19 +35,12 @@ function update_script() {
systemctl stop ghostfolio systemctl stop ghostfolio
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Creating Backup" create_backup /opt/ghostfolio/.env
tar -czf "/opt/ghostfolio_backup_$(date +%F).tar.gz" \
-C /opt \
--exclude="ghostfolio/node_modules" \
--exclude="ghostfolio/dist" \
ghostfolio
mv /opt/ghostfolio/.env /opt/env.backup
msg_ok "Backup Created"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "ghostfolio" "ghostfolio/ghostfolio" "tarball" "latest" "/opt/ghostfolio" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "ghostfolio" "ghostfolio/ghostfolio" "tarball" "latest" "/opt/ghostfolio"
restore_backup
msg_info "Updating Ghostfolio" msg_info "Updating Ghostfolio"
mv /opt/env.backup /opt/ghostfolio/.env
sed -i -E '/^DATABASE_URL=/ s/[?&]sslmode=prefer//g' /opt/ghostfolio/.env sed -i -E '/^DATABASE_URL=/ s/[?&]sslmode=prefer//g' /opt/ghostfolio/.env
cd /opt/ghostfolio cd /opt/ghostfolio
$STD npm ci $STD npm ci
+2 -13
View File
@@ -38,22 +38,11 @@ function update_script() {
systemctl stop actions-runner systemctl stop actions-runner
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up runner configuration" create_backup /opt/actions-runner/$f
BACKUP_DIR="/opt/actions-runner.backup"
mkdir -p "$BACKUP_DIR"
for f in .runner .credentials .credentials_rsaparams .env .path; do
[[ -f /opt/actions-runner/$f ]] && cp -a /opt/actions-runner/$f "$BACKUP_DIR/"
done
msg_ok "Backed up configuration"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "actions-runner" "actions/runner" "prebuild" "latest" "/opt/actions-runner" "actions-runner-linux-x64-*.tar.gz" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "actions-runner" "actions/runner" "prebuild" "latest" "/opt/actions-runner" "actions-runner-linux-x64-*.tar.gz"
restore_backup
msg_info "Restoring runner configuration"
for f in .runner .credentials .credentials_rsaparams .env .path; do
[[ -f "$BACKUP_DIR/$f" ]] && cp -a "$BACKUP_DIR/$f" /opt/actions-runner/
done
rm -rf "$BACKUP_DIR"
msg_ok "Restored configuration"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start actions-runner systemctl start actions-runner
+2 -9
View File
@@ -35,18 +35,11 @@ function update_script() {
systemctl stop gogs systemctl stop gogs
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up Data" create_backup /opt/gogs/custom /opt/gogs/data
cp -r /opt/gogs/custom /opt/gogs_custom_backup
cp -r /opt/gogs/data /opt/gogs_data_backup
msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "gogs" "gogs/gogs" "prebuild" "latest" "/opt/gogs" "gogs_*_linux_amd64.tar.gz" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "gogs" "gogs/gogs" "prebuild" "latest" "/opt/gogs" "gogs_*_linux_amd64.tar.gz"
restore_backup
msg_info "Restoring Data"
cp -r /opt/gogs_custom_backup/. /opt/gogs/custom
cp -r /opt/gogs_data_backup/. /opt/gogs/data
rm -rf /opt/gogs_custom_backup /opt/gogs_data_backup
msg_ok "Restored Data"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start gogs systemctl start gogs
+2 -10
View File
@@ -37,21 +37,13 @@ function update_script() {
systemctl stop grist systemctl stop grist
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Creating backup" create_backup /opt/grist/.env /opt/grist/docs /opt/grist/grist-sessions.db /opt/grist/landing.db
rm -rf /opt/grist_bak
mv /opt/grist /opt/grist_bak
msg_ok "Backup created"
fetch_and_deploy_gh_release "grist" "gristlabs/grist-core" "tarball" fetch_and_deploy_gh_release "grist" "gristlabs/grist-core" "tarball"
restore_backup
msg_info "Updating Grist" msg_info "Updating Grist"
mkdir -p /opt/grist/docs mkdir -p /opt/grist/docs
cp -n /opt/grist_bak/.env /opt/grist/.env
if ls /opt/grist_bak/docs/* &>/dev/null; then
cp -r /opt/grist_bak/docs/* /opt/grist/docs/
fi
[[ -f /opt/grist_bak/grist-sessions.db ]] && cp /opt/grist_bak/grist-sessions.db /opt/grist/grist-sessions.db
[[ -f /opt/grist_bak/landing.db ]] && cp /opt/grist_bak/landing.db /opt/grist/landing.db
cd /opt/grist cd /opt/grist
$STD yarn install $STD yarn install
$STD yarn run build:prod $STD yarn run build:prod
+2 -14
View File
@@ -35,22 +35,10 @@ function update_script() {
systemctl stop guardian-backend guardian-frontend systemctl stop guardian-backend guardian-frontend
msg_ok "Stopped Services" msg_ok "Stopped Services"
if [[ -f "/opt/guardian/backend/plex-guard.db" ]]; then create_backup /opt/guardian/.env /opt/guardian/backend/plex-guard.db
msg_info "Backing up Database"
cp "/opt/guardian/backend/plex-guard.db" "/tmp/plex-guard.db.backup"
msg_ok "Backed up Database"
fi
[[ -f "/opt/guardian/.env" ]] && cp "/opt/guardian/.env" "/opt"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "guardian" "HydroshieldMKII/Guardian" "tarball" "latest" "/opt/guardian" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "guardian" "HydroshieldMKII/Guardian" "tarball" "latest" "/opt/guardian"
[[ -f "/opt/.env" ]] && mv "/opt/.env" "/opt/guardian" restore_backup
if [[ -f "/tmp/plex-guard.db.backup" ]]; then
msg_info "Restoring Database"
cp "/tmp/plex-guard.db.backup" "/opt/guardian/backend/plex-guard.db"
rm "/tmp/plex-guard.db.backup"
msg_ok "Restored Database"
fi
msg_info "Updating Guardian" msg_info "Updating Guardian"
cd /opt/guardian/backend cd /opt/guardian/backend
+2 -4
View File
@@ -35,12 +35,10 @@ function update_script() {
systemctl stop healthchecks systemctl stop healthchecks
msg_ok "Stopped Services" msg_ok "Stopped Services"
msg_info "Backing up existing installation" create_backup /opt/healthchecks
BACKUP="/opt/healthchecks-backup-$(date +%F-%H%M)"
cp -a /opt/healthchecks "$BACKUP"
msg_ok "Backup created at $BACKUP"
fetch_and_deploy_gh_release "healthchecks" "healthchecks/healthchecks" "tarball" fetch_and_deploy_gh_release "healthchecks" "healthchecks/healthchecks" "tarball"
restore_backup
cd /opt/healthchecks cd /opt/healthchecks
if [[ -d venv ]]; then if [[ -d venv ]]; then
+3 -16
View File
@@ -35,15 +35,10 @@ function update_script() {
systemctl stop homelable systemctl stop homelable
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up Configuration and Data" create_backup /opt/homelable/backend/.env /opt/homelable/data /opt/homelable/mcp/.env
cp /opt/homelable/backend/.env /opt/homelable.env.bak
cp -r /opt/homelable/data /opt/homelable_data_bak
if [[ -f /opt/homelable/mcp/.env ]]; then
cp -a /opt/homelable/mcp/.env /opt/homelable-mcp.env.bak
fi
msg_ok "Backed up Configuration and Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "homelable" "Pouzor/homelable" "tarball" "latest" "/opt/homelable" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "homelable" "Pouzor/homelable" "tarball" "latest" "/opt/homelable"
restore_backup
msg_info "Updating Python Dependencies" msg_info "Updating Python Dependencies"
cd /opt/homelable/backend cd /opt/homelable/backend
@@ -57,17 +52,9 @@ function update_script() {
$STD npm run build $STD npm run build
msg_ok "Rebuilt Frontend" msg_ok "Rebuilt Frontend"
msg_info "Restoring Configuration and Data"
cp /opt/homelable.env.bak /opt/homelable/backend/.env
cp -r /opt/homelable_data_bak/. /opt/homelable/data/
rm -f /opt/homelable.env.bak
rm -rf /opt/homelable_data_bak
msg_ok "Restored Configuration and Data"
if [[ -f /opt/homelable-mcp.env.bak ]]; then if [[ -f /opt/homelable/mcp/.env ]]; then
msg_info "Restoring MCP Server" msg_info "Restoring MCP Server"
cp -a /opt/homelable-mcp.env.bak /opt/homelable/mcp/.env
rm -f /opt/homelable-mcp.env.bak
MCP_OWNER=$(stat -c '%U' /opt/homelable/mcp/.env) MCP_OWNER=$(stat -c '%U' /opt/homelable/mcp/.env)
cd /opt/homelable/mcp cd /opt/homelable/mcp
$STD uv venv --clear /opt/homelable/mcp/.venv $STD uv venv --clear /opt/homelable/mcp/.venv
+2 -14
View File
@@ -37,20 +37,10 @@ function update_script() {
systemctl stop homepage systemctl stop homepage
msg_ok "Stopped service" msg_ok "Stopped service"
msg_info "Creating Backup" create_backup /opt/homepage/.env /opt/homepage/config /opt/homepage/public/images /opt/homepage/public/icons
cp /opt/homepage/.env /opt/homepage.env
cp -r /opt/homepage/config /opt/homepage_config_backup
[[ -d /opt/homepage/public/images ]] && cp -r /opt/homepage/public/images /opt/homepage_images_backup
[[ -d /opt/homepage/public/icons ]] && cp -r /opt/homepage/public/icons /opt/homepage_icons_backup
msg_ok "Created Backup"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "homepage" "gethomepage/homepage" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "homepage" "gethomepage/homepage" "tarball"
restore_backup
msg_info "Restoring Backup"
mv /opt/homepage.env /opt/homepage
rm -rf /opt/homepage/config
mv /opt/homepage_config_backup /opt/homepage/config
msg_ok "Restored Backup"
msg_info "Updating Homepage (Patience)" msg_info "Updating Homepage (Patience)"
RELEASE=$(get_latest_github_release "gethomepage/homepage") RELEASE=$(get_latest_github_release "gethomepage/homepage")
@@ -63,8 +53,6 @@ function update_script() {
export NEXT_PUBLIC_BUILDTIME=$(curl -fsSL https://api.github.com/repos/gethomepage/homepage/releases/latest | jq -r '.published_at') export NEXT_PUBLIC_BUILDTIME=$(curl -fsSL https://api.github.com/repos/gethomepage/homepage/releases/latest | jq -r '.published_at')
export NEXT_TELEMETRY_DISABLED=1 export NEXT_TELEMETRY_DISABLED=1
$STD pnpm build $STD pnpm build
[[ -d /opt/homepage_images_backup ]] && mv /opt/homepage_images_backup /opt/homepage/public/images
[[ -d /opt/homepage_icons_backup ]] && mv /opt/homepage_icons_backup /opt/homepage/public/icons
msg_ok "Updated Homepage" msg_ok "Updated Homepage"
msg_info "Starting service" msg_info "Starting service"
+2 -11
View File
@@ -34,19 +34,10 @@ function update_script() {
systemctl stop homer systemctl stop homer
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up assets directory" create_backup /opt/homer/assets
cd ~
mkdir -p assets-backup
cp -R /opt/homer/assets/. assets-backup
msg_ok "Backed up assets directory"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "homer" "bastienwirtz/homer" "prebuild" "latest" "/opt/homer" "homer.zip" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "homer" "bastienwirtz/homer" "prebuild" "latest" "/opt/homer" "homer.zip"
restore_backup
msg_info "Restoring assets directory"
cd ~
cp -Rf assets-backup/. /opt/homer/assets/
rm -rf assets-backup
msg_ok "Restored assets directory"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start homer systemctl start homer
+2 -8
View File
@@ -36,16 +36,10 @@ function update_script() {
systemctl stop hoodik systemctl stop hoodik
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up Configuration" create_backup /opt/hoodik/.env
cp /opt/hoodik/.env /opt/hoodik.env.bak
msg_ok "Backed up Configuration"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "hoodik" "hudikhq/hoodik" "prebuild" "latest" "/opt/hoodik" "*x86_64.tar.gz" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "hoodik" "hudikhq/hoodik" "prebuild" "latest" "/opt/hoodik" "*x86_64.tar.gz"
restore_backup
msg_info "Restoring Configuration"
cp /opt/hoodik.env.bak /opt/hoodik/.env
rm -f /opt/hoodik.env.bak
msg_ok "Restored Configuration"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start hoodik systemctl start hoodik
+2 -7
View File
@@ -34,24 +34,19 @@ function update_script() {
systemctl stop apache2 systemctl stop apache2
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up current HortusFox installation" create_backup /opt/hortusfox/.env /opt/hortusfox/public/img
cd /opt
mv /opt/hortusfox/ /opt/hortusfox-backup
msg_ok "Backed up current HortusFox installation"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "hortusfox" "danielbrendel/hortusfox-web" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "hortusfox" "danielbrendel/hortusfox-web" "tarball"
restore_backup
msg_info "Updating HortusFox" msg_info "Updating HortusFox"
cd /opt/hortusfox cd /opt/hortusfox
cp /opt/hortusfox-backup/.env /opt/hortusfox/.env
cp -a /opt/hortusfox-backup/public/img/. /opt/hortusfox/public/img/
export COMPOSER_ALLOW_SUPERUSER=1 export COMPOSER_ALLOW_SUPERUSER=1
$STD composer install --no-dev --optimize-autoloader $STD composer install --no-dev --optimize-autoloader
$STD php asatru migrate:upgrade $STD php asatru migrate:upgrade
$STD php asatru plants:attributes $STD php asatru plants:attributes
$STD php asatru calendar:classes $STD php asatru calendar:classes
chown -R www-data:www-data /opt/hortusfox chown -R www-data:www-data /opt/hortusfox
rm -r /opt/hortusfox-backup
msg_ok "Updated HortusFox" msg_ok "Updated HortusFox"
msg_info "Starting Service" msg_info "Starting Service"
+2 -8
View File
@@ -35,16 +35,10 @@ function update_script() {
systemctl stop igotify systemctl stop igotify
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up Configuration" create_backup /opt/igotify/.env
cp /opt/igotify/.env /opt/igotify.env.bak
msg_ok "Backed up Configuration"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "igotify" "androidseb25/iGotify-Notification-Assistent" "prebuild" "latest" "/opt/igotify" "iGotify-Notification-Service-amd64-v*.zip" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "igotify" "androidseb25/iGotify-Notification-Assistent" "prebuild" "latest" "/opt/igotify" "iGotify-Notification-Service-amd64-v*.zip"
restore_backup
msg_info "Restoring Configuration"
cp /opt/igotify.env.bak /opt/igotify/.env
rm -f /opt/igotify.env.bak
msg_ok "Restored Configuration"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start igotify systemctl start igotify
+2 -8
View File
@@ -35,11 +35,10 @@ function update_script() {
systemctl stop immichframe systemctl stop immichframe
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up Configuration" create_backup /opt/immichframe/Config
cp -r /opt/immichframe/Config /tmp/immichframe_config.bak
msg_ok "Backed up Configuration"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "immichframe" "immichFrame/ImmichFrame" "tarball" "latest" "/tmp/immichframe" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "immichframe" "immichFrame/ImmichFrame" "tarball" "latest" "/tmp/immichframe"
restore_backup
msg_info "Setting up ImmichFrame" msg_info "Setting up ImmichFrame"
cd /tmp/immichframe cd /tmp/immichframe
@@ -57,11 +56,6 @@ function update_script() {
rm -rf /tmp/immichframe rm -rf /tmp/immichframe
msg_ok "Setup ImmichFrame" msg_ok "Setup ImmichFrame"
msg_info "Restoring Configuration"
cp -r /tmp/immichframe_config.bak/* /opt/immichframe/Config/
rm -rf /tmp/immichframe_config.bak
chown -R immichframe:immichframe /opt/immichframe
msg_ok "Restored Configuration"
msg_info "Starting Service" msg_info "Starting Service"
+2 -10
View File
@@ -41,20 +41,13 @@ function update_script() {
NODE_VERSION="22" setup_nodejs NODE_VERSION="22" setup_nodejs
PG_VERSION="17" setup_postgresql PG_VERSION="17" setup_postgresql
msg_info "Creating Backup" create_backup /opt/investbrain/.env /opt/investbrain/storage
rm -f /opt/.env.backup
rm -rf /opt/investbrain_backup
cp /opt/investbrain/.env /opt/.env.backup
cp -r /opt/investbrain/storage /opt/investbrain_backup
msg_ok "Created Backup"
fetch_and_deploy_gh_release "Investbrain" "investbrainapp/investbrain" "tarball" "latest" "/opt/investbrain" fetch_and_deploy_gh_release "Investbrain" "investbrainapp/investbrain" "tarball" "latest" "/opt/investbrain"
restore_backup
msg_info "Updating Investbrain" msg_info "Updating Investbrain"
cd /opt/investbrain cd /opt/investbrain
rm -rf /opt/investbrain/storage
cp /opt/.env.backup /opt/investbrain/.env
cp -r /opt/investbrain_backup/ /opt/investbrain/storage
export COMPOSER_ALLOW_SUPERUSER=1 export COMPOSER_ALLOW_SUPERUSER=1
$STD /usr/local/bin/composer install --no-interaction --no-dev --optimize-autoloader $STD /usr/local/bin/composer install --no-interaction --no-dev --optimize-autoloader
$STD npm install $STD npm install
@@ -69,7 +62,6 @@ function update_script() {
$STD php artisan event:cache $STD php artisan event:cache
chown -R www-data:www-data /opt/investbrain chown -R www-data:www-data /opt/investbrain
chmod -R 775 /opt/investbrain/storage /opt/investbrain/bootstrap/cache chmod -R 775 /opt/investbrain/storage /opt/investbrain/bootstrap/cache
rm -rf /opt/.env.backup /opt/investbrain_backup
msg_ok "Updated Investbrain" msg_ok "Updated Investbrain"
msg_info "Starting Services" msg_info "Starting Services"
+2 -9
View File
@@ -35,21 +35,14 @@ function update_script() {
systemctl stop supervisor nginx php8.4-fpm systemctl stop supervisor nginx php8.4-fpm
msg_ok "Stopped Services" msg_ok "Stopped Services"
msg_info "Creating Backup" create_backup /opt/invoiceninja/storage /opt/invoiceninja/public/storage
mkdir -p /tmp/invoiceninja_backup
cp /opt/invoiceninja/.env /tmp/invoiceninja_backup/
cp -r /opt/invoiceninja/storage /tmp/invoiceninja_backup/ 2>/dev/null || true cp -r /opt/invoiceninja/storage /tmp/invoiceninja_backup/ 2>/dev/null || true
cp -r /opt/invoiceninja/public/storage /tmp/invoiceninja_backup/public_storage 2>/dev/null || true cp -r /opt/invoiceninja/public/storage /tmp/invoiceninja_backup/public_storage 2>/dev/null || true
msg_ok "Created Backup" msg_ok "Created Backup"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "invoiceninja" "invoiceninja/invoiceninja" "prebuild" "latest" "/opt/invoiceninja" "invoiceninja.tar.gz" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "invoiceninja" "invoiceninja/invoiceninja" "prebuild" "latest" "/opt/invoiceninja" "invoiceninja.tar.gz"
restore_backup
msg_info "Restoring Data"
cp /tmp/invoiceninja_backup/.env /opt/invoiceninja/
cp -r /tmp/invoiceninja_backup/storage/* /opt/invoiceninja/storage/ 2>/dev/null || true
cp -r /tmp/invoiceninja_backup/public_storage/* /opt/invoiceninja/public/storage/ 2>/dev/null || true
rm -rf /tmp/invoiceninja_backup
msg_ok "Restored Data"
msg_info "Running Migrations" msg_info "Running Migrations"
cd /opt/invoiceninja cd /opt/invoiceninja
+2 -10
View File
@@ -35,19 +35,11 @@ function update_script() {
systemctl stop caddy systemctl stop caddy
msg_ok "Stopped Services" msg_ok "Stopped Services"
msg_info "Backing up Data" create_backup /opt/invoiceshelf/storage
cp /opt/invoiceshelf/.env /opt/invoiceshelf.env.bak
cp -r /opt/invoiceshelf/storage /opt/invoiceshelf_storage_backup
msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "invoiceshelf" "InvoiceShelf/InvoiceShelf" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "invoiceshelf" "InvoiceShelf/InvoiceShelf" "tarball"
restore_backup
msg_info "Restoring Data"
cp /opt/invoiceshelf.env.bak /opt/invoiceshelf/.env
rm -f /opt/invoiceshelf.env.bak
cp -r /opt/invoiceshelf_storage_backup/. /opt/invoiceshelf/storage
rm -rf /opt/invoiceshelf_storage_backup
msg_ok "Restored Data"
msg_info "Updating Application" msg_info "Updating Application"
cd /opt/invoiceshelf cd /opt/invoiceshelf
+2 -8
View File
@@ -35,18 +35,12 @@ function update_script() {
systemctl stop ironclaw systemctl stop ironclaw
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up Configuration" create_backup /root/.ironclaw/.env
cp /root/.ironclaw/.env /root/ironclaw.env.bak
msg_ok "Backed up Configuration"
fetch_and_deploy_gh_release "ironclaw-bin" "nearai/ironclaw" "prebuild" "latest" "/usr/local/bin" \ fetch_and_deploy_gh_release "ironclaw-bin" "nearai/ironclaw" "prebuild" "latest" "/usr/local/bin" \
"ironclaw-$(uname -m)-unknown-linux-gnu.tar.gz" "ironclaw-$(uname -m)-unknown-linux-gnu.tar.gz"
chmod +x /usr/local/bin/ironclaw chmod +x /usr/local/bin/ironclaw
restore_backup
msg_info "Restoring Configuration"
cp /root/ironclaw.env.bak /root/.ironclaw/.env
rm -f /root/ironclaw.env.bak
msg_ok "Restored Configuration"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start ironclaw systemctl start ironclaw
+2 -10
View File
@@ -35,20 +35,12 @@ function update_script() {
systemctl stop jotty systemctl stop jotty
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up configuration & data" create_backup /opt/jotty/data /opt/jotty/config
cp /opt/jotty/.env /opt/app.env
[[ -d /opt/jotty/data ]] && mv /opt/jotty/data /opt/data
[[ -d /opt/jotty/config ]] && mv /opt/jotty/config /opt/config
msg_ok "Backed up configuration & data"
NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "jotty" "fccview/jotty" "prebuild" "latest" "/opt/jotty" "jotty_*_prebuild.tar.gz" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "jotty" "fccview/jotty" "prebuild" "latest" "/opt/jotty" "jotty_*_prebuild.tar.gz"
restore_backup
msg_info "Restoring configuration & data"
mv /opt/app.env /opt/jotty/.env
[[ -d /opt/data ]] && mv /opt/data /opt/jotty/data
[[ -d /opt/config ]] && cp -a /opt/config/* /opt/jotty/config && rm -rf /opt/config
msg_ok "Restored configuration & data"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start jotty systemctl start jotty
+2 -8
View File
@@ -35,16 +35,10 @@ function update_script() {
systemctl stop kan systemctl stop kan
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up Data" create_backup /opt/kan/.env
cp /opt/kan/.env /opt/kan.env.bak
msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_tag "kan" "kanbn/kan" "latest" CLEAN_INSTALL=1 fetch_and_deploy_gh_tag "kan" "kanbn/kan" "latest"
restore_backup
msg_info "Restoring Configuration"
cp /opt/kan.env.bak /opt/kan/.env
rm -f /opt/kan.env.bak
msg_ok "Restored Configuration"
msg_info "Building Application" msg_info "Building Application"
cd /opt/kan cd /opt/kan
+2 -4
View File
@@ -37,14 +37,12 @@ function update_script() {
systemctl stop kapowarr systemctl stop kapowarr
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Creating Backup" create_backup /opt/kapowarr/db
mv /opt/kapowarr/db /opt/
msg_ok "Backup Created"
fetch_and_deploy_gh_release "kapowarr" "Casvt/Kapowarr" "tarball" fetch_and_deploy_gh_release "kapowarr" "Casvt/Kapowarr" "tarball"
restore_backup
msg_info "Updating Kapowarr" msg_info "Updating Kapowarr"
mv /opt/db /opt/kapowarr
msg_ok "Updated Kapowarr" msg_ok "Updated Kapowarr"
msg_info "Starting Service" msg_info "Starting Service"
+2 -10
View File
@@ -37,18 +37,10 @@ function update_script() {
systemctl stop kima-frontend kima-backend kima-analyzer kima-analyzer-clap systemctl stop kima-frontend kima-backend kima-analyzer kima-analyzer-clap
msg_ok "Stopped Services" msg_ok "Stopped Services"
msg_info "Backing up Data" create_backup /opt/kima-hub/backend/.env /opt/kima-hub/frontend/.env
cp /opt/kima-hub/backend/.env /opt/kima-hub-backend-env.bak
cp /opt/kima-hub/frontend/.env /opt/kima-hub-frontend-env.bak
msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "kima-hub" "Chevron7Locked/kima-hub" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "kima-hub" "Chevron7Locked/kima-hub" "tarball"
restore_backup
msg_info "Restoring Data"
cp /opt/kima-hub-backend-env.bak /opt/kima-hub/backend/.env
cp /opt/kima-hub-frontend-env.bak /opt/kima-hub/frontend/.env
rm -f /opt/kima-hub-backend-env.bak /opt/kima-hub-frontend-env.bak
msg_ok "Restored Data"
msg_info "Rebuilding Backend" msg_info "Rebuilding Backend"
cd /opt/kima-hub/backend cd /opt/kima-hub/backend
+3 -12
View File
@@ -35,24 +35,15 @@ function update_script() {
systemctl stop kitchenowl systemctl stop kitchenowl
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Creating Backup" create_backup /opt/kitchenowl/data /opt/kitchenowl/kitchenowl.env
mkdir -p /opt/kitchenowl_backup
cp -r /opt/kitchenowl/data /opt/kitchenowl_backup/
cp -f /opt/kitchenowl/kitchenowl.env /opt/kitchenowl_backup/
msg_ok "Created Backup"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "kitchenowl" "TomBursch/kitchenowl" "tarball" "latest" "/opt/kitchenowl" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "kitchenowl" "TomBursch/kitchenowl" "tarball" "latest" "/opt/kitchenowl"
rm -rf /opt/kitchenowl/web rm -rf /opt/kitchenowl/web
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "kitchenowl-web" "TomBursch/kitchenowl" "prebuild" "latest" "/opt/kitchenowl/web" "kitchenowl_Web.tar.gz" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "kitchenowl-web" "TomBursch/kitchenowl" "prebuild" "latest" "/opt/kitchenowl/web" "kitchenowl_Web.tar.gz"
restore_backup
msg_info "Restoring data"
sed -i 's/default=True/default=False/' /opt/kitchenowl/backend/wsgi.py
cp -r /opt/kitchenowl_backup/data /opt/kitchenowl/
cp -f /opt/kitchenowl_backup/kitchenowl.env /opt/kitchenowl/
rm -rf /opt/kitchenowl_backup
msg_ok "Restored data"
msg_info "Updating KitchenOwl" msg_info "Updating KitchenOwl"
sed -i 's/default=True/default=False/' /opt/kitchenowl/backend/wsgi.py
cd /opt/kitchenowl/backend cd /opt/kitchenowl/backend
$STD uv sync --frozen $STD uv sync --frozen
cd /opt/kitchenowl/backend cd /opt/kitchenowl/backend
+2 -9
View File
@@ -35,21 +35,14 @@ function update_script() {
systemctl stop nginx php8.4-fpm systemctl stop nginx php8.4-fpm
msg_ok "Stopped Services" msg_ok "Stopped Services"
msg_info "Creating Backup" create_backup /opt/koel/storage /opt/koel/public/img
mkdir -p /tmp/koel_backup
cp /opt/koel/.env /tmp/koel_backup/
cp -r /opt/koel/storage /tmp/koel_backup/ 2>/dev/null || true cp -r /opt/koel/storage /tmp/koel_backup/ 2>/dev/null || true
cp -r /opt/koel/public/img /tmp/koel_backup/ 2>/dev/null || true cp -r /opt/koel/public/img /tmp/koel_backup/ 2>/dev/null || true
msg_ok "Created Backup" msg_ok "Created Backup"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "koel" "koel/koel" "prebuild" "latest" "/opt/koel" "koel-*.tar.gz" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "koel" "koel/koel" "prebuild" "latest" "/opt/koel" "koel-*.tar.gz"
restore_backup
msg_info "Restoring Data"
cp /tmp/koel_backup/.env /opt/koel/
cp -r /tmp/koel_backup/storage/* /opt/koel/storage/ 2>/dev/null || true
cp -r /tmp/koel_backup/img/* /opt/koel/public/img/ 2>/dev/null || true
rm -rf /tmp/koel_backup
msg_ok "Restored Data"
msg_info "Running Migrations" msg_info "Running Migrations"
cd /opt/koel cd /opt/koel
+2 -11
View File
@@ -31,22 +31,13 @@ function update_script() {
fi fi
setup_mariadb setup_mariadb
if check_for_gh_release "leantime" "Leantime/leantime"; then if check_for_gh_release "leantime" "Leantime/leantime"; then
msg_info "Creating Backup" create_backup /opt/leantime
mariadb-dump leantime >"/opt/leantime_db_backup_$(date +%F).sql"
tar -czf "/opt/leantime_backup_$(date +%F).tar.gz" "/opt/leantime"
mv /opt/leantime /opt/leantime_bak
msg_ok "Backup Created"
fetch_and_deploy_gh_release "leantime" "Leantime/leantime" "prebuild" "latest" "/opt/leantime" Leantime*.tar.gz fetch_and_deploy_gh_release "leantime" "Leantime/leantime" "prebuild" "latest" "/opt/leantime" Leantime*.tar.gz
restore_backup
msg_info "Restoring Config & Permissions"
mv /opt/leantime_bak/config/.env /opt/leantime/config/.env
chown -R www-data:www-data "/opt/leantime"
chmod -R 750 "/opt/leantime"
msg_ok "Restored Config & Permissions"
msg_info "Removing Backup" msg_info "Removing Backup"
rm -rf /opt/leantime_bak
msg_ok "Removed Backup" msg_ok "Removed Backup"
msg_ok "Updated successfully!" msg_ok "Updated successfully!"
fi fi
+4 -14
View File
@@ -35,9 +35,7 @@ function update_script() {
systemctl stop librechat rag-api systemctl stop librechat rag-api
msg_ok "Stopped Services" msg_ok "Stopped Services"
msg_info "Backing up Configuration" create_backup /opt/librechat/.env
cp /opt/librechat/.env /opt/librechat.env.bak
msg_ok "Backed up Configuration"
CLEAN_INSTALL=1 fetch_and_deploy_gh_tag "librechat" "danny-avila/LibreChat" CLEAN_INSTALL=1 fetch_and_deploy_gh_tag "librechat" "danny-avila/LibreChat"
@@ -52,10 +50,7 @@ function update_script() {
$STD npm cache clean --force $STD npm cache clean --force
msg_ok "Built Frontend" msg_ok "Built Frontend"
msg_info "Restoring Configuration" restore_backup
cp /opt/librechat.env.bak /opt/librechat/.env
rm -f /opt/librechat.env.bak
msg_ok "Restored Configuration"
msg_info "Starting Services" msg_info "Starting Services"
systemctl start rag-api librechat systemctl start rag-api librechat
@@ -68,9 +63,7 @@ function update_script() {
systemctl stop rag-api systemctl stop rag-api
msg_ok "Stopped RAG API" msg_ok "Stopped RAG API"
msg_info "Backing up RAG API Configuration" create_backup /opt/rag-api/.env
cp /opt/rag-api/.env /opt/rag-api.env.bak
msg_ok "Backed up RAG API Configuration"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "rag-api" "danny-avila/rag_api" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "rag-api" "danny-avila/rag_api" "tarball"
@@ -79,10 +72,7 @@ function update_script() {
$STD .venv/bin/pip install -r requirements.lite.txt $STD .venv/bin/pip install -r requirements.lite.txt
msg_ok "Updated RAG API Dependencies" msg_ok "Updated RAG API Dependencies"
msg_info "Restoring RAG API Configuration" restore_backup
cp /opt/rag-api.env.bak /opt/rag-api/.env
rm -f /opt/rag-api.env.bak
msg_ok "Restored RAG API Configuration"
msg_info "Starting RAG API" msg_info "Starting RAG API"
systemctl start rag-api systemctl start rag-api
+2 -10
View File
@@ -35,19 +35,11 @@ function update_script() {
systemctl stop nginx linkding linkding-tasks systemctl stop nginx linkding linkding-tasks
msg_ok "Stopped Services" msg_ok "Stopped Services"
msg_info "Backing up Data" create_backup /opt/linkding/data
cp -r /opt/linkding/data /opt/linkding_data_backup
cp /opt/linkding/.env /opt/linkding_env_backup
msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "linkding" "sissbruecker/linkding" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "linkding" "sissbruecker/linkding" "tarball"
restore_backup
msg_info "Restoring Data"
cp -r /opt/linkding_data_backup/. /opt/linkding/data
cp /opt/linkding_env_backup /opt/linkding/.env
rm -rf /opt/linkding_data_backup /opt/linkding_env_backup
ln -sf /usr/lib/x86_64-linux-gnu/mod_icu.so /opt/linkding/libicu.so
msg_ok "Restored Data"
msg_info "Updating LinkDing" msg_info "Updating LinkDing"
cd /opt/linkding cd /opt/linkding
+2 -7
View File
@@ -35,13 +35,10 @@ function update_script() {
RUST_CRATES="monolith" setup_rust RUST_CRATES="monolith" setup_rust
msg_info "Backing up data" create_backup /opt/linkwarden/.env /opt/linkwarden/data
mv /opt/linkwarden/.env /opt/.env
[ -d /opt/linkwarden/data ] && mv /opt/linkwarden/data /opt/data.bak
rm -rf /opt/linkwarden
msg_ok "Backed up data"
fetch_and_deploy_gh_release "linkwarden" "linkwarden/linkwarden" "tarball" fetch_and_deploy_gh_release "linkwarden" "linkwarden/linkwarden" "tarball"
restore_backup
msg_info "Updating Linkwarden" msg_info "Updating Linkwarden"
cd /opt/linkwarden cd /opt/linkwarden
@@ -60,11 +57,9 @@ function update_script() {
$STD yarn $STD yarn
$STD npx playwright install-deps $STD npx playwright install-deps
$STD npx playwright install $STD npx playwright install
mv /opt/.env /opt/linkwarden/.env
$STD yarn prisma:generate $STD yarn prisma:generate
$STD yarn web:build $STD yarn web:build
$STD yarn prisma:deploy $STD yarn prisma:deploy
[ -d /opt/data.bak ] && mv /opt/data.bak /opt/linkwarden/data
rm -rf ~/.cargo/registry ~/.cargo/git ~/.cargo/.package-cache rm -rf ~/.cargo/registry ~/.cargo/git ~/.cargo/.package-cache
rm -rf /root/.cache/yarn rm -rf /root/.cache/yarn
rm -rf /opt/linkwarden/.next/cache rm -rf /opt/linkwarden/.next/cache
+2 -6
View File
@@ -33,17 +33,13 @@ function update_script() {
systemctl stop listmonk systemctl stop listmonk
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up data" create_backup /opt/listmonk/config.toml /opt/listmonk/uploads
mv /opt/listmonk/ /opt/listmonk-backup
msg_ok "Backed up data"
fetch_and_deploy_gh_release "listmonk" "knadh/listmonk" "prebuild" "latest" "/opt/listmonk" "listmonk*linux_amd64.tar.gz" fetch_and_deploy_gh_release "listmonk" "knadh/listmonk" "prebuild" "latest" "/opt/listmonk" "listmonk*linux_amd64.tar.gz"
restore_backup
msg_info "Configuring listmonk" msg_info "Configuring listmonk"
mv /opt/listmonk-backup/config.toml /opt/listmonk/config.toml
mv /opt/listmonk-backup/uploads /opt/listmonk/uploads
$STD /opt/listmonk/listmonk --upgrade --yes --config /opt/listmonk/config.toml $STD /opt/listmonk/listmonk --upgrade --yes --config /opt/listmonk/config.toml
rm -rf /opt/listmonk-backup/
msg_ok "Configured listmonk" msg_ok "Configured listmonk"
msg_info "Starting Service" msg_info "Starting Service"
+2 -8
View File
@@ -35,16 +35,10 @@ function update_script() {
systemctl stop lobehub systemctl stop lobehub
msg_ok "Stopped Services" msg_ok "Stopped Services"
msg_info "Backing up Data" create_backup /opt/lobehub/.env
cp /opt/lobehub/.env /opt/lobehub.env.bak
msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "lobehub" "lobehub/lobehub" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "lobehub" "lobehub/lobehub" "tarball"
restore_backup
msg_info "Restoring Configuration"
cp /opt/lobehub.env.bak /opt/lobehub/.env
rm -f /opt/lobehub.env.bak
msg_ok "Restored Configuration"
msg_info "Building Application" msg_info "Building Application"
cd /opt/lobehub cd /opt/lobehub
+2 -15
View File
@@ -33,23 +33,10 @@ function update_script() {
systemctl stop lubelogger systemctl stop lubelogger
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up data" create_backup /opt/lubelogger/data/
mkdir -p /tmp/lubeloggerData/data
cp /opt/lubelogger/appsettings.json /tmp/lubeloggerData/appsettings.json
cp -r /opt/lubelogger/data/ /tmp/lubeloggerData/
# Lubelogger has moved multiples folders to the 'data' folder, and we need to move them before the update to keep the user data
# Github Discussion: https://github.com/hargata/lubelog/discussions/787
[[ -e /opt/lubelogger/config ]] && cp -r /opt/lubelogger/config /tmp/lubeloggerData/data/
[[ -e /opt/lubelogger/wwwroot/translations ]] && cp -r /opt/lubelogger/wwwroot/translations /tmp/lubeloggerData/data/
[[ -e /opt/lubelogger/wwwroot/documents ]] && cp -r /opt/lubelogger/wwwroot/documents /tmp/lubeloggerData/data/
[[ -e /opt/lubelogger/wwwroot/images ]] && cp -r /opt/lubelogger/wwwroot/images /tmp/lubeloggerData/data/
[[ -e /opt/lubelogger/wwwroot/temp ]] && cp -r /opt/lubelogger/wwwroot/temp /tmp/lubeloggerData/data/
[[ -e /opt/lubelogger/log ]] && cp -r /opt/lubelogger/log /tmp/lubeloggerData/
rm -rf /opt/lubelogger
msg_ok "Backed up data"
fetch_and_deploy_gh_release "lubelogger" "hargata/lubelog" "prebuild" "latest" "/opt/lubelogger" "LubeLogger*linux_x64.zip" fetch_and_deploy_gh_release "lubelogger" "hargata/lubelog" "prebuild" "latest" "/opt/lubelogger" "LubeLogger*linux_x64.zip"
restore_backup
msg_info "Configuring LubeLogger" msg_info "Configuring LubeLogger"
chmod 700 /opt/lubelogger/CarCareTracker chmod 700 /opt/lubelogger/CarCareTracker
+2 -10
View File
@@ -35,19 +35,11 @@ function update_script() {
systemctl stop caddy systemctl stop caddy
msg_ok "Stopped Services" msg_ok "Stopped Services"
msg_info "Backing up Data" create_backup /opt/lychee/storage
cp /opt/lychee/.env /opt/lychee.env.bak
cp -r /opt/lychee/storage /opt/lychee_storage_backup
msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "lychee" "LycheeOrg/Lychee" "prebuild" "latest" "/opt/lychee" "Lychee.zip" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "lychee" "LycheeOrg/Lychee" "prebuild" "latest" "/opt/lychee" "Lychee.zip"
restore_backup
msg_info "Restoring Data"
cp /opt/lychee.env.bak /opt/lychee/.env
rm -f /opt/lychee.env.bak
cp -r /opt/lychee_storage_backup/. /opt/lychee/storage
rm -rf /opt/lychee_storage_backup
msg_ok "Restored Data"
msg_info "Updating Application" msg_info "Updating Application"
cd /opt/lychee cd /opt/lychee
+3 -7
View File
@@ -33,19 +33,15 @@ function update_script() {
systemctl stop mafl systemctl stop mafl
msg_ok "Service stopped" msg_ok "Service stopped"
msg_info "Backing up data" create_backup /opt/mafl/data
mkdir -p /opt/mafl-backup/data
mv /opt/mafl/data /opt/mafl-backup/data
rm -rf /opt/mafl
msg_ok "Backup complete"
fetch_and_deploy_gh_release "mafl" "hywax/mafl" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "mafl" "hywax/mafl" "tarball"
restore_backup
msg_info "Updating Mafl" msg_info "Updating Mafl"
cd /opt/mafl cd /opt/mafl
$STD yarn install $STD yarn install
$STD yarn build $STD yarn build
mv /opt/mafl-backup/data /opt/mafl/data
msg_ok "Mafl updated" msg_ok "Mafl updated"
msg_info "Starting Service" msg_info "Starting Service"
+2 -13
View File
@@ -35,26 +35,15 @@ function update_script() {
NODE_VERSION="24" setup_nodejs NODE_VERSION="24" setup_nodejs
msg_info "Backing up data" create_backup /opt/magicmirror/config/config.js /opt/magicmirror/css/custom.css /opt/magicmirror/modules
rm -rf /opt/magicmirror-backup
mkdir /opt/magicmirror-backup
cp /opt/magicmirror/config/config.js /opt/magicmirror-backup
if [[ -f /opt/magicmirror/css/custom.css ]]; then
cp /opt/magicmirror/css/custom.css /opt/magicmirror-backup
fi
cp -r /opt/magicmirror/modules /opt/magicmirror-backup
msg_ok "Backed up data"
fetch_and_deploy_gh_release "magicmirror" "MagicMirrorOrg/MagicMirror" "tarball" fetch_and_deploy_gh_release "magicmirror" "MagicMirrorOrg/MagicMirror" "tarball"
restore_backup
msg_info "Configuring MagicMirror" msg_info "Configuring MagicMirror"
cd /opt/magicmirror cd /opt/magicmirror
sed -i -E 's/("postinstall": )".*"/\1""/; s/("prepare": )".*"/\1""/' package.json sed -i -E 's/("postinstall": )".*"/\1""/; s/("prepare": )".*"/\1""/' package.json
$STD npm run install-mm $STD npm run install-mm
cp /opt/magicmirror-backup/config.js /opt/magicmirror/config/
if [[ -f /opt/magicmirror-backup/custom.css ]]; then
cp /opt/magicmirror-backup/custom.css /opt/magicmirror/css/
fi
msg_ok "Configured MagicMirror" msg_ok "Configured MagicMirror"
msg_info "Starting Service" msg_info "Starting Service"
+2 -7
View File
@@ -36,12 +36,11 @@ function update_script() {
systemctl stop mail-archiver systemctl stop mail-archiver
msg_ok "Stopped Mail-Archiver" msg_ok "Stopped Mail-Archiver"
msg_info "Creating Backup" create_backup /opt/mail-archiver/DataProtection-Keys
cp /opt/mail-archiver/appsettings.json /opt/mail-archiver/.env /opt/
[[ -d /opt/mail-archiver/DataProtection-Keys ]] && cp -r /opt/mail-archiver/DataProtection-Keys /opt
msg_ok "Created Backup" msg_ok "Created Backup"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "mail-archiver" "s1t5/mail-archiver" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "mail-archiver" "s1t5/mail-archiver" "tarball"
restore_backup
msg_info "Updating Mail-Archiver" msg_info "Updating Mail-Archiver"
mv /opt/mail-archiver /opt/mail-archiver-build mv /opt/mail-archiver /opt/mail-archiver-build
@@ -51,10 +50,6 @@ function update_script() {
rm -rf /opt/mail-archiver-build rm -rf /opt/mail-archiver-build
msg_ok "Updated Mail-Archiver" msg_ok "Updated Mail-Archiver"
msg_info "Restoring Backup"
cp /opt/appsettings.json /opt/.env /opt/mail-archiver
[[ -d /opt/DataProtection-Keys ]] && cp -r /opt/DataProtection-Keys /opt/mail-archiver/
msg_ok "Restored Backup"
msg_info "Starting Mail-Archiver" msg_info "Starting Mail-Archiver"
systemctl start mail-archiver systemctl start mail-archiver
+2 -14
View File
@@ -37,14 +37,10 @@ function update_script() {
systemctl stop manyfold.target manyfold-rails.1 manyfold-default_worker.1 manyfold-performance_worker.1 systemctl stop manyfold.target manyfold-rails.1 manyfold-default_worker.1 manyfold-performance_worker.1
msg_ok "Stopped Services" msg_ok "Stopped Services"
msg_info "Backing up Data" create_backup /opt/manyfold/app/storage /opt/manyfold/app/tmp
CURRENT_VERSION=$(grep -oP 'APP_VERSION=\K[^ ]+' /opt/manyfold/.env || echo "unknown")
cp -r /opt/manyfold/app/storage /opt/manyfold_storage_backup 2>/dev/null || true
cp -r /opt/manyfold/app/tmp /opt/manyfold_tmp_backup 2>/dev/null || true
$STD tar -czf "/opt/manyfold_${CURRENT_VERSION}_backup.tar.gz" -C /opt/manyfold app
msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "manyfold" "manyfold3d/manyfold" "tarball" "latest" "/opt/manyfold/app" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "manyfold" "manyfold3d/manyfold" "tarball" "latest" "/opt/manyfold/app"
restore_backup
msg_info "Configuring Manyfold" msg_info "Configuring Manyfold"
RUBY_INSTALL_VERSION=$(cat /opt/manyfold/app/.ruby-version) RUBY_INSTALL_VERSION=$(cat /opt/manyfold/app/.ruby-version)
@@ -55,14 +51,6 @@ function update_script() {
RUBY_VERSION=${RUBY_INSTALL_VERSION} RUBY_INSTALL_RAILS="true" HOME=/home/manyfold setup_ruby RUBY_VERSION=${RUBY_INSTALL_VERSION} RUBY_INSTALL_RAILS="true" HOME=/home/manyfold setup_ruby
msg_info "Restoring Data"
rm -rf /opt/manyfold/app/{storage,tmp}
cp -r /opt/manyfold_storage_backup /opt/manyfold/app/storage 2>/dev/null || true
cp -r /opt/manyfold_tmp_backup /opt/manyfold/app/tmp 2>/dev/null || true
chown -R manyfold:manyfold {/home/manyfold,/opt/manyfold}
chown -R manyfold:manyfold /opt/manyfold/app/storage /opt/manyfold/app/tmp /opt/manyfold/app/config
rm -rf /opt/manyfold_storage_backup /opt/manyfold_tmp_backup
msg_ok "Restored Data"
msg_info "Installing Manyfold" msg_info "Installing Manyfold"
$STD npm install --global corepack $STD npm install --global corepack
+2 -19
View File
@@ -35,28 +35,11 @@ function update_script() {
systemctl stop caddy systemctl stop caddy
msg_ok "Stopped Services" msg_ok "Stopped Services"
msg_info "Backing up Data" create_backup /opt/matomo/misc/user
[[ -f /opt/matomo/config/config.ini.php ]] && cp /opt/matomo/config/config.ini.php /opt/matomo_config.bak
[[ -d /opt/matomo/misc/user ]] && cp -r /opt/matomo/misc/user /opt/matomo_user_backup
[[ -f /root/matomo.creds ]] && cp /root/matomo.creds /opt/matomo_db_creds.bak
msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "matomo" "matomo-org/matomo" "prebuild" "latest" "/opt/matomo" "matomo-*.zip" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "matomo" "matomo-org/matomo" "prebuild" "latest" "/opt/matomo" "matomo-*.zip"
restore_backup
msg_info "Restoring Data"
if [[ -f /opt/matomo_config.bak ]]; then
mkdir -p /opt/matomo/config
cp /opt/matomo_config.bak /opt/matomo/config/config.ini.php
fi
if [[ -d /opt/matomo_user_backup ]]; then
mkdir -p /opt/matomo/misc/user
cp -r /opt/matomo_user_backup/. /opt/matomo/misc/user
fi
[[ -f /opt/matomo_db_creds.bak ]] && cp /opt/matomo_db_creds.bak /root/matomo.creds
rm -f /opt/matomo_config.bak /opt/matomo_db_creds.bak
rm -rf /opt/matomo_user_backup
chown -R www-data:www-data /opt/matomo
msg_ok "Restored Data"
msg_info "Starting Services" msg_info "Starting Services"
systemctl start caddy systemctl start caddy
+2 -3
View File
@@ -37,12 +37,11 @@ function update_script() {
systemctl stop mealie systemctl stop mealie
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up Configuration" create_backup /opt/mealie/mealie.env /opt/mealie/start.sh
cp -f /opt/mealie/mealie.env /opt/mealie.env
[[ -f /opt/mealie/start.sh ]] && cp -f /opt/mealie/start.sh /opt/mealie.start.sh
msg_ok "Backup completed" msg_ok "Backup completed"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "mealie" "mealie-recipes/mealie" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "mealie" "mealie-recipes/mealie" "tarball"
restore_backup
msg_info "Restoring Configuration" msg_info "Restoring Configuration"
mv -f /opt/mealie.env /opt/mealie/mealie.env mv -f /opt/mealie.env /opt/mealie/mealie.env
+2 -7
View File
@@ -34,20 +34,15 @@ function update_script() {
systemctl stop metabase systemctl stop metabase
msg_info "Stopped Service" msg_info "Stopped Service"
msg_info "Creating backup" create_backup /opt/metabase/.env
mv /opt/metabase/.env /opt
msg_ok "Created backup"
msg_info "Updating Metabase" msg_info "Updating Metabase"
RELEASE=$(get_latest_github_release "metabase/metabase") RELEASE=$(get_latest_github_release "metabase/metabase")
curl -fsSL "https://downloads.metabase.com/v${RELEASE}.x/metabase.jar" -o /opt/metabase/metabase.jar curl -fsSL "https://downloads.metabase.com/v${RELEASE}.x/metabase.jar" -o /opt/metabase/metabase.jar
echo $RELEASE >~/.metabase echo $RELEASE >~/.metabase
restore_backup
msg_ok "Updated Metabase" msg_ok "Updated Metabase"
msg_info "Restoring backup"
mv /opt/.env /opt/metabase
msg_ok "Restored backup"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start metabase systemctl start metabase
msg_ok "Started Service" msg_ok "Started Service"
+2 -12
View File
@@ -48,14 +48,10 @@ function update_script() {
systemctl stop metube systemctl stop metube
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up Old Installation" create_backup /opt/metube
if [[ -d /opt/metube_bak ]]; then
rm -rf /opt/metube_bak
fi
mv /opt/metube /opt/metube_bak
msg_ok "Backup created"
fetch_and_deploy_gh_release "metube" "alexta69/metube" "tarball" "latest" fetch_and_deploy_gh_release "metube" "alexta69/metube" "tarball" "latest"
restore_backup
msg_info "Building Frontend" msg_info "Building Frontend"
cd /opt/metube/ui cd /opt/metube/ui
@@ -75,12 +71,6 @@ function update_script() {
$STD uv sync $STD uv sync
msg_ok "Installed Backend" msg_ok "Installed Backend"
msg_info "Restoring .env"
if [[ -f /opt/metube_bak/.env ]]; then
cp /opt/metube_bak/.env /opt/metube/.env
fi
rm -rf /opt/metube_bak
msg_ok "Restored .env"
if grep -q 'pipenv' /etc/systemd/system/metube.service; then if grep -q 'pipenv' /etc/systemd/system/metube.service; then
msg_info "Patching systemd Service" msg_info "Patching systemd Service"
+2 -6
View File
@@ -42,16 +42,13 @@ function update_script() {
systemctl stop apache2 systemctl stop apache2
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Creating backup" create_backup /opt/monica/.env /opt/monica/storage
mv /opt/monica/ /opt/monica-backup
msg_ok "Backup created"
fetch_and_deploy_gh_release "monica" "monicahq/monica" "prebuild" "latest" "/opt/monica" "monica-v*.tar.bz2" fetch_and_deploy_gh_release "monica" "monicahq/monica" "prebuild" "latest" "/opt/monica" "monica-v*.tar.bz2"
restore_backup
msg_info "Configuring monica" msg_info "Configuring monica"
cd /opt/monica/ cd /opt/monica/
cp -r /opt/monica-backup/.env /opt/monica
cp -r /opt/monica-backup/storage/* /opt/monica/storage/
$STD composer install --no-interaction --no-dev $STD composer install --no-interaction --no-dev
$STD yarn config set ignore-engines true $STD yarn config set ignore-engines true
$STD yarn install $STD yarn install
@@ -59,7 +56,6 @@ function update_script() {
$STD php artisan monica:update --force $STD php artisan monica:update --force
chown -R www-data:www-data /opt/monica chown -R www-data:www-data /opt/monica
chmod -R 775 /opt/monica/storage chmod -R 775 /opt/monica/storage
rm -r /opt/monica-backup
msg_ok "Configured monica" msg_ok "Configured monica"
msg_info "Starting Service" msg_info "Starting Service"
+2 -10
View File
@@ -35,13 +35,11 @@ function update_script() {
systemctl stop musicseerr systemctl stop musicseerr
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up Data" create_backup /opt/musicseerr/backend/config /opt/musicseerr/backend/cache
cp -a /opt/musicseerr/backend/config /opt/musicseerr_config_backup
cp -a /opt/musicseerr/backend/cache /opt/musicseerr_cache_backup
msg_ok "Backed up Data"
PYTHON_VERSION="3.13" setup_uv PYTHON_VERSION="3.13" setup_uv
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "musicseerr" "HabiRabbu/Musicseerr" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "musicseerr" "HabiRabbu/Musicseerr" "tarball"
restore_backup
NODE_VERSION="25" NODE_MODULE="pnpm@10.33.0" setup_nodejs NODE_VERSION="25" NODE_MODULE="pnpm@10.33.0" setup_nodejs
msg_info "Building Frontend" msg_info "Building Frontend"
@@ -60,12 +58,6 @@ function update_script() {
cp -r /opt/musicseerr/frontend/build /opt/musicseerr/backend/static cp -r /opt/musicseerr/frontend/build /opt/musicseerr/backend/static
msg_ok "Updated Application" msg_ok "Updated Application"
msg_info "Restoring Data"
rm -rf /opt/musicseerr/backend/config /opt/musicseerr/backend/cache
cp -a /opt/musicseerr_config_backup/. /opt/musicseerr/backend/config/
cp -a /opt/musicseerr_cache_backup/. /opt/musicseerr/backend/cache/
rm -rf /opt/musicseerr_config_backup /opt/musicseerr_cache_backup
msg_ok "Restored Data"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start musicseerr systemctl start musicseerr
+2 -8
View File
@@ -30,9 +30,7 @@ function update_script() {
exit exit
fi fi
msg_info "Backing up Configuration" create_backup /usr/local/nagios/etc
cp -a /usr/local/nagios/etc /opt/nagios-etc-backup
msg_ok "Backed up Configuration"
if check_for_gh_release "nagios" "NagiosEnterprises/nagioscore"; then if check_for_gh_release "nagios" "NagiosEnterprises/nagioscore"; then
msg_info "Stopping Nagios" msg_info "Stopping Nagios"
@@ -40,6 +38,7 @@ function update_script() {
msg_ok "Stopped Nagios" msg_ok "Stopped Nagios"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "nagios" "NagiosEnterprises/nagioscore" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "nagios" "NagiosEnterprises/nagioscore" "tarball"
restore_backup
msg_info "Building Nagios Core" msg_info "Building Nagios Core"
cd /opt/nagios cd /opt/nagios
@@ -73,11 +72,6 @@ function update_script() {
msg_ok "Built Nagios Plugins" msg_ok "Built Nagios Plugins"
fi fi
msg_info "Restoring Configuration"
rm -rf /usr/local/nagios/etc
cp -a /opt/nagios-etc-backup /usr/local/nagios/etc
rm -rf /opt/nagios-etc-backup
msg_ok "Restored Configuration"
msg_ok "Updated successfully!" msg_ok "Updated successfully!"
exit exit
} }
+2 -10
View File
@@ -35,12 +35,10 @@ function update_script() {
systemctl stop nametag systemctl stop nametag
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up Data" create_backup /opt/nametag/data
cp /opt/nametag/.env /opt/nametag.env.bak
cp -r /opt/nametag/data /opt/nametag_data_bak
msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "nametag" "mattogodoy/nametag" "tarball" "latest" "/opt/nametag" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "nametag" "mattogodoy/nametag" "tarball" "latest" "/opt/nametag"
restore_backup
msg_info "Rebuilding Application" msg_info "Rebuilding Application"
cd /opt/nametag cd /opt/nametag
@@ -54,12 +52,6 @@ function update_script() {
cp -r /opt/nametag/public /opt/nametag/.next/standalone/public cp -r /opt/nametag/public /opt/nametag/.next/standalone/public
msg_ok "Rebuilt Application" msg_ok "Rebuilt Application"
msg_info "Restoring Data"
cp /opt/nametag.env.bak /opt/nametag/.env
cp -r /opt/nametag_data_bak/. /opt/nametag/data/
rm -f /opt/nametag.env.bak
rm -rf /opt/nametag_data_bak
msg_ok "Restored Data"
msg_info "Running Migrations" msg_info "Running Migrations"
cd /opt/nametag cd /opt/nametag
+2 -7
View File
@@ -36,9 +36,7 @@ function update_script() {
systemctl stop neko systemctl stop neko
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up Data" create_backup /etc/neko/neko.yaml
cp /etc/neko/neko.yaml /opt/neko.yaml.bak
msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "neko" "m1k1o/neko" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "neko" "m1k1o/neko" "tarball"
@@ -56,10 +54,7 @@ function update_script() {
cp -r /opt/neko/server/bin/plugins/* /etc/neko/plugins/ 2>/dev/null || true cp -r /opt/neko/server/bin/plugins/* /etc/neko/plugins/ 2>/dev/null || true
msg_ok "Built Server" msg_ok "Built Server"
msg_info "Restoring Data" restore_backup
cp /opt/neko.yaml.bak /etc/neko/neko.yaml
rm -f /opt/neko.yaml.bak
msg_ok "Restored Data"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start neko systemctl start neko
+2 -7
View File
@@ -33,9 +33,7 @@ function update_script() {
fi fi
if check_for_gh_release "netboot-xyz" "netbootxyz/netboot.xyz"; then if check_for_gh_release "netboot-xyz" "netbootxyz/netboot.xyz"; then
msg_info "Backing up Configuration" create_backup /var/www/html/boot.cfg
cp /var/www/html/boot.cfg /opt/netboot-xyz-boot.cfg.bak
msg_ok "Backed up Configuration"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "netboot-xyz" "netbootxyz/netboot.xyz" "prebuild" "latest" "/var/www/html" "menus.tar.gz" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "netboot-xyz" "netbootxyz/netboot.xyz" "prebuild" "latest" "/var/www/html" "menus.tar.gz"
@@ -70,10 +68,7 @@ function update_script() {
USE_ORIGINAL_FILENAME=true fetch_and_deploy_gh_release "netboot-xyz-multiarch-img" "netbootxyz/netboot.xyz" "singlefile" "latest" "/var/www/html" "netboot.xyz-multiarch.img" USE_ORIGINAL_FILENAME=true fetch_and_deploy_gh_release "netboot-xyz-multiarch-img" "netbootxyz/netboot.xyz" "singlefile" "latest" "/var/www/html" "netboot.xyz-multiarch.img"
USE_ORIGINAL_FILENAME=true fetch_and_deploy_gh_release "netboot-xyz-checksums" "netbootxyz/netboot.xyz" "singlefile" "latest" "/var/www/html" "netboot.xyz-sha256-checksums.txt" USE_ORIGINAL_FILENAME=true fetch_and_deploy_gh_release "netboot-xyz-checksums" "netbootxyz/netboot.xyz" "singlefile" "latest" "/var/www/html" "netboot.xyz-sha256-checksums.txt"
msg_info "Restoring Configuration" restore_backup
cp /opt/netboot-xyz-boot.cfg.bak /var/www/html/boot.cfg
rm -f /opt/netboot-xyz-boot.cfg.bak
msg_ok "Restored Configuration"
msg_ok "Updated successfully!" msg_ok "Updated successfully!"
fi fi
+5 -10
View File
@@ -34,20 +34,15 @@ function update_script() {
systemctl stop netbox netbox-rq systemctl stop netbox netbox-rq
msg_ok "Stopped Services" msg_ok "Stopped Services"
msg_info "Backing up NetBox configurations" create_backup /opt/netbox/netbox/netbox/configuration.py \
mv /opt/netbox/ /opt/netbox-backup /opt/netbox/netbox/media /opt/netbox/netbox/scripts /opt/netbox/netbox/reports \
msg_ok "Backed up NetBox configurations" /opt/netbox/gunicorn.py /opt/netbox/local_requirements.txt \
/opt/netbox/netbox/netbox/ldap_config.py
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "netbox" "netbox-community/netbox" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "netbox" "netbox-community/netbox" "tarball"
restore_backup
cp -r /opt/netbox-backup/netbox/netbox/configuration.py /opt/netbox/netbox/netbox/
cp -r /opt/netbox-backup/netbox/{media,scripts,reports}/ /opt/netbox/netbox/
cp -r /opt/netbox-backup/gunicorn.py /opt/netbox/
[[ -f /opt/netbox-backup/local_requirements.txt ]] && cp -r /opt/netbox-backup/local_requirements.txt /opt/netbox/
[[ -f /opt/netbox-backup/netbox/netbox/ldap_config.py ]] && cp -r /opt/netbox-backup/netbox/netbox/ldap_config.py /opt/netbox/netbox/netbox/
$STD /opt/netbox/upgrade.sh $STD /opt/netbox/upgrade.sh
rm -r /opt/netbox-backup
msg_info "Starting Services" msg_info "Starting Services"
systemctl start netbox netbox-rq systemctl start netbox netbox-rq
+2 -7
View File
@@ -35,9 +35,7 @@ function update_script() {
systemctl stop nginx-ui systemctl stop nginx-ui
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up Configuration" create_backup /usr/local/etc/nginx-ui/app.ini
cp /usr/local/etc/nginx-ui/app.ini /tmp/nginx-ui-app.ini.bak
msg_ok "Backed up Configuration"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "nginx-ui" "0xJacky/nginx-ui" "prebuild" "latest" "/opt/nginx-ui" "nginx-ui-linux-64.tar.gz" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "nginx-ui" "0xJacky/nginx-ui" "prebuild" "latest" "/opt/nginx-ui" "nginx-ui-linux-64.tar.gz"
@@ -45,12 +43,9 @@ function update_script() {
cp /opt/nginx-ui/nginx-ui /usr/local/bin/nginx-ui cp /opt/nginx-ui/nginx-ui /usr/local/bin/nginx-ui
chmod +x /usr/local/bin/nginx-ui chmod +x /usr/local/bin/nginx-ui
rm -rf /opt/nginx-ui rm -rf /opt/nginx-ui
restore_backup
msg_ok "Updated Binary" msg_ok "Updated Binary"
msg_info "Restoring Configuration"
mv /tmp/nginx-ui-app.ini.bak /usr/local/etc/nginx-ui/app.ini
msg_ok "Restored Configuration"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start nginx-ui systemctl start nginx-ui
msg_ok "Started Service" msg_ok "Started Service"
+2 -10
View File
@@ -33,19 +33,11 @@ function update_script() {
systemctl stop ombi systemctl stop ombi
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Creating backup" create_backup /opt/ombi/Ombi.db /opt/ombi/OmbiExternal.db /opt/ombi/OmbiSettings.db /opt/ombi/database.json
[[ -f /opt/ombi/Ombi.db ]] && mv /opt/ombi/Ombi.db /opt
[[ -f /opt/ombi/OmbiExternal.db ]] && mv /opt/ombi/OmbiExternal.db /opt
[[ -f /opt/ombi/OmbiSettings.db ]] && mv /opt/ombi/OmbiSettings.db /opt
[[ -f /opt/ombi/database.json ]] && mv /opt/ombi/database.json /opt
msg_ok "Backup created"
rm -rf /opt/ombi rm -rf /opt/ombi
fetch_and_deploy_gh_release "ombi" "Ombi-app/Ombi" "prebuild" "latest" "/opt/ombi" "linux-x64.tar.gz" fetch_and_deploy_gh_release "ombi" "Ombi-app/Ombi" "prebuild" "latest" "/opt/ombi" "linux-x64.tar.gz"
[[ -f /opt/Ombi.db ]] && mv /opt/Ombi.db /opt/ombi restore_backup
[[ -f /opt/OmbiExternal.db ]] && mv /opt/OmbiExternal.db /opt/ombi
[[ -f /opt/OmbiSettings.db ]] && mv /opt/OmbiSettings.db /opt/ombi
[[ -f /opt/database.json ]] && mv /opt/database.json /opt/ombi
msg_info "Starting Service" msg_info "Starting Service"
systemctl start ombi systemctl start ombi
+2 -7
View File
@@ -33,15 +33,10 @@ function update_script() {
systemctl stop opengist systemctl stop opengist
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Creating backup" create_backup /opt/opengist/config.yml
mv /opt/opengist /opt/opengist-backup
msg_ok "Backup created"
fetch_and_deploy_gh_release "opengist" "thomiceli/opengist" "prebuild" "latest" "/opt/opengist" "opengist*linux-amd64.tar.gz" fetch_and_deploy_gh_release "opengist" "thomiceli/opengist" "prebuild" "latest" "/opt/opengist" "opengist*linux-amd64.tar.gz"
restore_backup
msg_info "Restoring Configuration"
mv /opt/opengist-backup/config.yml /opt/opengist/config.yml
msg_ok "Configuration Restored"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start opengist systemctl start opengist
+2 -4
View File
@@ -36,15 +36,13 @@ function update_script() {
systemctl stop outline systemctl stop outline
msg_ok "Services Stopped" msg_ok "Services Stopped"
msg_info "Creating backup" create_backup /opt/outline/.env
cp /opt/outline/.env /opt
msg_ok "Backup created"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "outline" "outline/outline" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "outline" "outline/outline" "tarball"
restore_backup
msg_info "Updating Outline" msg_info "Updating Outline"
cd /opt/outline cd /opt/outline
mv /opt/.env /opt/outline
export NODE_ENV=development export NODE_ENV=development
export NODE_OPTIONS="--max-old-space-size=3584" export NODE_OPTIONS="--max-old-space-size=3584"
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0 export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
+2 -5
View File
@@ -61,18 +61,15 @@ EOF
systemctl stop overseerr systemctl stop overseerr
msg_ok "Service stopped" msg_ok "Service stopped"
msg_info "Creating backup" create_backup /opt/overseerr/config
mv /opt/overseerr/config /opt/config_backup
msg_ok "Backup created"
fetch_and_deploy_gh_release "overseerr" "sct/overseerr" "tarball" fetch_and_deploy_gh_release "overseerr" "sct/overseerr" "tarball"
rm -rf /opt/overseerr/config
msg_info "Configuring ${APP} (Patience)" msg_info "Configuring ${APP} (Patience)"
cd /opt/overseerr cd /opt/overseerr
$STD yarn install $STD yarn install
$STD yarn build $STD yarn build
mv /opt/config_backup /opt/overseerr/config restore_backup
msg_ok "Configured ${APP}" msg_ok "Configured ${APP}"
msg_info "Starting Service" msg_info "Starting Service"
+2 -7
View File
@@ -35,11 +35,10 @@ function update_script() {
systemctl stop ownfoil systemctl stop ownfoil
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up Data" create_backup /opt/ownfoil/app/config
cp -r /opt/ownfoil/app/config /opt/ownfoil_data_backup
msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "ownfoil" "a1ex4/ownfoil" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "ownfoil" "a1ex4/ownfoil" "tarball"
restore_backup
msg_info "Installing Dependencies" msg_info "Installing Dependencies"
cd /opt/ownfoil cd /opt/ownfoil
@@ -47,10 +46,6 @@ function update_script() {
$STD uv pip install -r requirements.txt $STD uv pip install -r requirements.txt
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
msg_info "Restoring Data"
cp -r /opt/ownfoil_data_backup /opt/ownfoil/app/config
rm -rf /opt/ownfoil_data_backup
msg_ok "Restored Data"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start ownfoil systemctl start ownfoil
+2 -11
View File
@@ -41,15 +41,10 @@ function update_script() {
systemctl stop gerbil systemctl stop gerbil
msg_info "Service stopped" msg_info "Service stopped"
msg_info "Creating backup" create_backup /opt/pangolin/config
tar -czf /opt/pangolin_config_backup.tar.gz -C /opt/pangolin config
if [[ -f /opt/pangolin/config/db/db.sqlite ]]; then
cp -a /opt/pangolin/config/db/db.sqlite \
"/opt/pangolin/config/db/db.sqlite.pre-${PANGOLIN_VERSION}-$(date +%Y%m%d-%H%M%S).bak"
fi
msg_ok "Created backup"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "pangolin" "fosrl/pangolin" "tarball" "$PANGOLIN_VERSION" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "pangolin" "fosrl/pangolin" "tarball" "$PANGOLIN_VERSION"
restore_backup
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "gerbil" "fosrl/gerbil" "singlefile" "latest" "/usr/bin" "gerbil_linux_amd64" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "gerbil" "fosrl/gerbil" "singlefile" "latest" "/usr/bin" "gerbil_linux_amd64"
msg_info "Updating Pangolin" msg_info "Updating Pangolin"
@@ -68,10 +63,6 @@ function update_script() {
cp server/db/mac_models.json ./dist/mac_models.json cp server/db/mac_models.json ./dist/mac_models.json
msg_ok "Updated Pangolin" msg_ok "Updated Pangolin"
msg_info "Restoring config"
tar -xzf /opt/pangolin_config_backup.tar.gz -C /opt/pangolin --overwrite
rm -f /opt/pangolin_config_backup.tar.gz
msg_ok "Restored config"
if ! grep -q '^ExecStartPre=/usr/bin/node dist/migrations.mjs' /etc/systemd/system/pangolin.service 2>/dev/null; then if ! grep -q '^ExecStartPre=/usr/bin/node dist/migrations.mjs' /etc/systemd/system/pangolin.service 2>/dev/null; then
msg_info "Adding migration step to pangolin.service" msg_info "Adding migration step to pangolin.service"
+2 -7
View File
@@ -35,15 +35,10 @@ function update_script() {
systemctl stop paperclip systemctl stop paperclip
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up Configuration" create_backup /opt/paperclip-ai/.env
cp /opt/paperclip-ai/.env /opt/paperclip.env.bak
msg_ok "Backed up Configuration"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "paperclip-ai" "paperclipai/paperclip" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "paperclip-ai" "paperclipai/paperclip" "tarball"
restore_backup
msg_info "Restoring Configuration"
mv /opt/paperclip.env.bak /opt/paperclip-ai/.env
msg_ok "Restored Configuration"
msg_info "Rebuilding Paperclip" msg_info "Rebuilding Paperclip"
cd /opt/paperclip-ai cd /opt/paperclip-ai
+2 -7
View File
@@ -34,16 +34,11 @@ function update_script() {
systemctl stop paperless-ai paperless-rag systemctl stop paperless-ai paperless-rag
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up data" create_backup /opt/paperless-ai/data
cp -r /opt/paperless-ai/data /opt/paperless-ai-data-backup
msg_ok "Backed up data"
fetch_and_deploy_gh_release "paperless-ai" "clusterzx/paperless-ai" "tarball" fetch_and_deploy_gh_release "paperless-ai" "clusterzx/paperless-ai" "tarball"
restore_backup
msg_info "Restoring data"
cp -r /opt/paperless-ai-data-backup/* /opt/paperless-ai/data/
rm -rf /opt/paperless-ai-data-backup
msg_ok "Restored data"
msg_info "Updating Paperless-AI" msg_info "Updating Paperless-AI"
cd /opt/paperless-ai cd /opt/paperless-ai
+3 -9
View File
@@ -35,11 +35,7 @@ function update_script() {
systemctl stop papra systemctl stop papra
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up Configuration" create_backup /opt/papra/apps/papra-server/.env
if [[ -f /opt/papra/apps/papra-server/.env ]]; then
cp /opt/papra/apps/papra-server/.env /opt/papra_env.bak
fi
msg_ok "Backed up Configuration"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "papra" "papra-hq/papra" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "papra" "papra-hq/papra" "tarball"
@@ -48,9 +44,8 @@ function update_script() {
msg_info "Building Application" msg_info "Building Application"
cd /opt/papra cd /opt/papra
if [[ -f /opt/papra_env.bak ]]; then restore_backup
cp /opt/papra_env.bak /opt/papra/apps/papra-server/.env if [[ ! -f /opt/papra/apps/papra-server/.env ]]; then
else
msg_warn ".env missing, regenerating from defaults" msg_warn ".env missing, regenerating from defaults"
LOCAL_IP=$(hostname -I | awk '{print $1}') LOCAL_IP=$(hostname -I | awk '{print $1}')
cat <<EOF >/opt/papra/apps/papra-server/.env cat <<EOF >/opt/papra/apps/papra-server/.env
@@ -74,7 +69,6 @@ EOF
$STD pnpm --filter "@papra/app-client..." run build $STD pnpm --filter "@papra/app-client..." run build
$STD pnpm --filter "@papra/app-server..." run build $STD pnpm --filter "@papra/app-server..." run build
ln -sf /opt/papra/apps/papra-client/dist /opt/papra/apps/papra-server/public ln -sf /opt/papra/apps/papra-client/dist /opt/papra/apps/papra-server/public
rm -f /opt/papra_env.bak
msg_ok "Built Application" msg_ok "Built Application"
msg_info "Starting Service" msg_info "Starting Service"
+3 -2
View File
@@ -68,11 +68,12 @@ function update_script() {
msg_info "Stopping Service" msg_info "Stopping Service"
systemctl stop pocketid systemctl stop pocketid
msg_ok "Stopped Service" msg_ok "Stopped Service"
cp /opt/pocket-id/.env /opt/env
fi fi
create_backup /opt/pocket-id/.env
fetch_and_deploy_gh_release "pocket-id" "pocket-id/pocket-id" "singlefile" "latest" "/opt/pocket-id/" "pocket-id-linux-amd64" fetch_and_deploy_gh_release "pocket-id" "pocket-id/pocket-id" "singlefile" "latest" "/opt/pocket-id/" "pocket-id-linux-amd64"
mv /opt/env /opt/pocket-id/.env restore_backup
msg_info "Starting Service" msg_info "Starting Service"
systemctl start pocketid systemctl start pocketid
+2 -7
View File
@@ -36,18 +36,13 @@ function update_script() {
msg_ok "Updated PowerDNS" msg_ok "Updated PowerDNS"
if check_for_gh_release "poweradmin" "poweradmin/poweradmin"; then if check_for_gh_release "poweradmin" "poweradmin/poweradmin"; then
msg_info "Backing up Configuration" create_backup /opt/poweradmin/config/settings.php /opt/poweradmin/powerdns.db
cp /opt/poweradmin/config/settings.php /opt/poweradmin_settings.php.bak
cp /opt/poweradmin/powerdns.db /opt/poweradmin_powerdns.db.bak
msg_ok "Backed up Configuration"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "poweradmin" "poweradmin/poweradmin" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "poweradmin" "poweradmin/poweradmin" "tarball"
restore_backup
msg_info "Updating Poweradmin" msg_info "Updating Poweradmin"
cp /opt/poweradmin_settings.php.bak /opt/poweradmin/config/settings.php
cp /opt/poweradmin_powerdns.db.bak /opt/poweradmin/powerdns.db
rm -rf /opt/poweradmin/install rm -rf /opt/poweradmin/install
rm -f /opt/poweradmin_settings.php.bak /opt/poweradmin_powerdns.db.bak
chown -R www-data:pdns /opt/poweradmin chown -R www-data:pdns /opt/poweradmin
chmod 775 /opt/poweradmin chmod 775 /opt/poweradmin
chown pdns:pdns /opt/poweradmin/powerdns.db chown pdns:pdns /opt/poweradmin/powerdns.db
+2 -4
View File
@@ -29,16 +29,14 @@ function update_script() {
exit exit
fi fi
if check_for_gh_release "privatebin" "PrivateBin/PrivateBin"; then if check_for_gh_release "privatebin" "PrivateBin/PrivateBin"; then
msg_info "Creating backup" create_backup /opt/privatebin/cfg/conf.php
cp -f /opt/privatebin/cfg/conf.php /tmp/privatebin_conf.bak
msg_ok "Backup created"
rm -rf /opt/privatebin/* rm -rf /opt/privatebin/*
fetch_and_deploy_gh_release "privatebin" "PrivateBin/PrivateBin" "tarball" fetch_and_deploy_gh_release "privatebin" "PrivateBin/PrivateBin" "tarball"
restore_backup
msg_info "Configuring ${APP}" msg_info "Configuring ${APP}"
mkdir -p /opt/privatebin/data mkdir -p /opt/privatebin/data
mv /tmp/privatebin_conf.bak /opt/privatebin/cfg/conf.php
chown -R www-data:www-data /opt/privatebin chown -R www-data:www-data /opt/privatebin
chmod -R 0755 /opt/privatebin/data chmod -R 0755 /opt/privatebin/data
systemctl reload nginx php8.2-fpm systemctl reload nginx php8.2-fpm
+2 -8
View File
@@ -34,16 +34,10 @@ function update_script() {
systemctl stop blackbox-exporter systemctl stop blackbox-exporter
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Creating backup" create_backup /opt/blackbox-exporter/blackbox.yml
mv /opt/blackbox-exporter/blackbox.yml /opt
msg_ok "Backup created"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "blackbox-exporter" "prometheus/blackbox_exporter" "prebuild" "latest" "/opt/blackbox-exporter" "blackbox_exporter-*.linux-amd64.tar.gz" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "blackbox-exporter" "prometheus/blackbox_exporter" "prebuild" "latest" "/opt/blackbox-exporter" "blackbox_exporter-*.linux-amd64.tar.gz"
restore_backup
msg_info "Restoring backup"
cp -r /opt/blackbox.yml /opt/blackbox-exporter
rm -f /opt/blackbox.yml
msg_ok "Backup restored"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start blackbox-exporter systemctl start blackbox-exporter
+3 -2
View File
@@ -36,7 +36,8 @@ function update_script() {
ensure_dependencies git ensure_dependencies git
cp /opt/reactive-resume/.env /opt/reactive-resume.env.bak create_backup /opt/reactive-resume/.env
NODE_VERSION="24" setup_nodejs NODE_VERSION="24" setup_nodejs
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "reactive-resume" "amruthpillai/reactive-resume" "tarball" "latest" "/opt/reactive-resume" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "reactive-resume" "amruthpillai/reactive-resume" "tarball" "latest" "/opt/reactive-resume"
@@ -49,7 +50,7 @@ function update_script() {
export NODE_ENV="production" export NODE_ENV="production"
$STD pnpm install --frozen-lockfile $STD pnpm install --frozen-lockfile
$STD pnpm run build $STD pnpm run build
mv /opt/reactive-resume.env.bak /opt/reactive-resume/.env restore_backup
msg_ok "Updated Reactive Resume" msg_ok "Updated Reactive Resume"
msg_info "Updating Service" msg_info "Updating Service"
+2 -4
View File
@@ -37,14 +37,12 @@ function update_script() {
systemctl stop romm-backend romm-worker romm-scheduler romm-watcher systemctl stop romm-backend romm-worker romm-scheduler romm-watcher
msg_ok "Stopped Services" msg_ok "Stopped Services"
msg_info "Backing up configuration" create_backup /opt/romm/.env
cp /opt/romm/.env /opt/romm/.env.backup
msg_ok "Backed up configuration"
fetch_and_deploy_gh_release "romm" "rommapp/romm" "tarball" "latest" "/opt/romm" fetch_and_deploy_gh_release "romm" "rommapp/romm" "tarball" "latest" "/opt/romm"
restore_backup
msg_info "Updating ROMM" msg_info "Updating ROMM"
cp /opt/romm/.env.backup /opt/romm/.env
cd /opt/romm cd /opt/romm
$STD uv sync --all-extras $STD uv sync --all-extras
cd /opt/romm/backend cd /opt/romm/backend
+2 -10
View File
@@ -35,18 +35,10 @@ function update_script() {
systemctl stop rustypaste systemctl stop rustypaste
msg_ok "Stopped Services" msg_ok "Stopped Services"
msg_info "Creating Backup" create_backup /opt/rustypaste/config.toml /opt/rustypaste/upload
tar -czf "/opt/rustypaste_backup_$(date +%F).tar.gz" /opt/rustypaste/upload 2>/dev/null || true
cp /opt/rustypaste/config.toml /tmp/rustypaste_config.toml.bak
msg_ok "Backup Created"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "rustypaste" "orhun/rustypaste" "prebuild" "latest" "/opt/rustypaste" "*x86_64-unknown-linux-gnu.tar.gz" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "rustypaste" "orhun/rustypaste" "prebuild" "latest" "/opt/rustypaste" "*x86_64-unknown-linux-gnu.tar.gz"
restore_backup
msg_info "Restoring Data"
mv /tmp/rustypaste_config.toml.bak /opt/rustypaste/config.toml
tar -xzf "/opt/rustypaste_backup_$(date +%F).tar.gz" -C /opt/rustypaste/upload 2>/dev/null || true
rm -rf /opt/rustypaste_backup_$(date +%F).tar.gz
msg_ok "Restored Data"
msg_info "Starting Services" msg_info "Starting Services"
systemctl start rustypaste systemctl start rustypaste
+2 -7
View File
@@ -123,9 +123,7 @@ EOF
systemctl stop seerr systemctl stop seerr
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Creating Backup" create_backup /opt/seerr/config
cp -a /opt/seerr/config /opt/seerr_backup
msg_ok "Created Backup"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "seerr" "seerr-team/seerr" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "seerr" "seerr-team/seerr" "tarball"
@@ -145,10 +143,7 @@ EOF
$STD pnpm build $STD pnpm build
msg_ok "Updated Seerr" msg_ok "Updated Seerr"
msg_info "Restoring Backup" restore_backup
rm -rf /opt/seerr/config
mv /opt/seerr_backup /opt/seerr/config
msg_ok "Restored Backup"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start seerr systemctl start seerr
+1 -1
View File
@@ -10,7 +10,7 @@ var_tags="${var_tags:-dev_ops}"
var_cpu="${var_cpu:-2}" var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}" var_ram="${var_ram:-2048}"
var_disk="${var_disk:-4}" var_disk="${var_disk:-4}"
var_os="${var_os:-Ubuntu}" var_os="${var_os:-ubuntu}"
var_version="${var_version:-24.04}" var_version="${var_version:-24.04}"
var_arm64="${var_arm64:-no}" var_arm64="${var_arm64:-no}"
var_unprivileged="${var_unprivileged:-1}" var_unprivileged="${var_unprivileged:-1}"
+2 -10
View File
@@ -35,19 +35,11 @@ function update_script() {
systemctl stop shlink systemctl stop shlink
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up Data" create_backup /opt/shlink/data
cp /opt/shlink/.env /opt/shlink.env.bak
cp -r /opt/shlink/data /opt/shlink_data_backup
msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "shlink" "shlinkio/shlink" "prebuild" "latest" "/opt/shlink" "shlink*_php8.5_dist.zip" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "shlink" "shlinkio/shlink" "prebuild" "latest" "/opt/shlink" "shlink*_php8.5_dist.zip"
restore_backup
msg_info "Restoring Data"
cp /opt/shlink.env.bak /opt/shlink/.env
rm -f /opt/shlink.env.bak
cp -r /opt/shlink_data_backup/. /opt/shlink/data
rm -rf /opt/shlink_data_backup
msg_ok "Restored Data"
msg_info "Updating Application" msg_info "Updating Application"
cd /opt/shlink cd /opt/shlink
+5 -15
View File
@@ -36,14 +36,10 @@ function update_script() {
[[ -f /etc/systemd/system/soularr.service ]] && systemctl stop soularr.timer soularr.service [[ -f /etc/systemd/system/soularr.service ]] && systemctl stop soularr.timer soularr.service
msg_ok "Stopped Service(s)" msg_ok "Stopped Service(s)"
msg_info "Backing up config" create_backup /opt/slskd/config/slskd.yml
cp /opt/slskd/config/slskd.yml /opt/slskd.yml.bak
msg_ok "Backed up config"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "Slskd" "slskd/slskd" "prebuild" "latest" "/opt/slskd" "slskd-*-linux-x64.zip" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "Slskd" "slskd/slskd" "prebuild" "latest" "/opt/slskd" "slskd-*-linux-x64.zip"
restore_backup
msg_info "Restoring config"
mv /opt/slskd.yml.bak /opt/slskd/config/slskd.yml
# Migrate 0.25.0 breaking config key renames # Migrate 0.25.0 breaking config key renames
sed -i 's/^global:/transfers:/' /opt/slskd/config/slskd.yml sed -i 's/^global:/transfers:/' /opt/slskd/config/slskd.yml
@@ -63,13 +59,12 @@ function update_script() {
msg_ok "Stopped Timer and Service" msg_ok "Stopped Timer and Service"
fi fi
msg_info "Backing up Soularr config" create_backup /opt/soularr/config.ini /opt/soularr/run.sh
cp /opt/soularr/config.ini /opt/soularr_config.ini.bak
cp /opt/soularr/run.sh /opt/soularr_run.sh.bak
msg_ok "Backed up Soularr config"
PYTHON_VERSION="3.11" setup_uv PYTHON_VERSION="3.11" setup_uv
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "Soularr" "mrusse/soularr" "tarball" "latest" "/opt/soularr" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "Soularr" "mrusse/soularr" "tarball" "latest" "/opt/soularr"
restore_backup
msg_info "Updating Soularr" msg_info "Updating Soularr"
cd /opt/soularr cd /opt/soularr
$STD uv venv -c venv $STD uv venv -c venv
@@ -78,11 +73,6 @@ function update_script() {
deactivate deactivate
msg_ok "Updated Soularr" msg_ok "Updated Soularr"
msg_info "Restoring Soularr config"
mv /opt/soularr_config.ini.bak /opt/soularr/config.ini
mv /opt/soularr_run.sh.bak /opt/soularr/run.sh
msg_ok "Restored Soularr config"
msg_info "Starting Soularr Timer" msg_info "Starting Soularr Timer"
systemctl restart soularr.timer systemctl restart soularr.timer
msg_ok "Started Soularr Timer" msg_ok "Started Soularr Timer"
+2 -7
View File
@@ -38,11 +38,10 @@ function update_script() {
systemctl stop nginx systemctl stop nginx
msg_ok "Services Stopped" msg_ok "Services Stopped"
msg_info "Creating Backup" create_backup /opt/snipe-it/.env /opt/snipe-it/public/uploads /opt/snipe-it/storage/private_uploads
mv /opt/snipe-it /opt/snipe-it-backup
msg_ok "Created Backup"
fetch_and_deploy_gh_release "snipe-it" "grokability/snipe-it" "tarball" fetch_and_deploy_gh_release "snipe-it" "grokability/snipe-it" "tarball"
restore_backup
[[ "$(php -v 2>/dev/null)" == PHP\ 8.2* ]] && PHP_VERSION="8.3" PHP_FPM="YES" PHP_MODULE="ldap,soap,xsl" setup_php [[ "$(php -v 2>/dev/null)" == PHP\ 8.2* ]] && PHP_VERSION="8.3" PHP_FPM="YES" PHP_MODULE="ldap,soap,xsl" setup_php
sed -i 's/php8.2/php8.3/g' /etc/nginx/conf.d/snipeit.conf sed -i 's/php8.2/php8.3/g' /etc/nginx/conf.d/snipeit.conf
setup_composer setup_composer
@@ -50,9 +49,6 @@ function update_script() {
msg_info "Updating Snipe-IT" msg_info "Updating Snipe-IT"
$STD apt update $STD apt update
$STD apt -y upgrade $STD apt -y upgrade
cp /opt/snipe-it-backup/.env /opt/snipe-it/.env
cp -r /opt/snipe-it-backup/public/uploads/. /opt/snipe-it/public/uploads/
cp -r /opt/snipe-it-backup/storage/private_uploads/. /opt/snipe-it/storage/private_uploads/
cd /opt/snipe-it/ cd /opt/snipe-it/
export COMPOSER_ALLOW_SUPERUSER=1 export COMPOSER_ALLOW_SUPERUSER=1
$STD composer install --no-dev --optimize-autoloader --no-interaction $STD composer install --no-dev --optimize-autoloader --no-interaction
@@ -64,7 +60,6 @@ function update_script() {
$STD php artisan view:clear $STD php artisan view:clear
chown -R www-data: /opt/snipe-it chown -R www-data: /opt/snipe-it
chmod -R 755 /opt/snipe-it chmod -R 755 /opt/snipe-it
rm -rf /opt/snipe-it-backup
msg_ok "Updated Snipe-IT" msg_ok "Updated Snipe-IT"
msg_info "Starting Service" msg_info "Starting Service"
+2 -10
View File
@@ -35,19 +35,11 @@ function update_script() {
systemctl stop caddy systemctl stop caddy
msg_ok "Stopped Services" msg_ok "Stopped Services"
msg_info "Backing up Data" create_backup /opt/solidtime/storage
cp /opt/solidtime/.env /opt/solidtime.env.bak
cp -r /opt/solidtime/storage /opt/solidtime_storage_backup
msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "solidtime" "solidtime-io/solidtime" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "solidtime" "solidtime-io/solidtime" "tarball"
restore_backup
msg_info "Restoring Data"
cp /opt/solidtime.env.bak /opt/solidtime/.env
rm -f /opt/solidtime.env.bak
cp -r /opt/solidtime_storage_backup/. /opt/solidtime/storage
rm -rf /opt/solidtime_storage_backup
msg_ok "Restored Data"
msg_info "Updating Application" msg_info "Updating Application"
cd /opt/solidtime cd /opt/solidtime
+2 -7
View File
@@ -37,12 +37,10 @@ function update_script() {
systemctl stop soulsync systemctl stop soulsync
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up Data" create_backup /opt/soulsync/config /opt/soulsync/data
mv /opt/soulsync/config /opt/soulsync-config.bak
mv /opt/soulsync/data /opt/soulsync-data.bak
msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "soulsync" "Nezreka/SoulSync" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "soulsync" "Nezreka/SoulSync" "tarball"
restore_backup
msg_info "Updating Python Dependencies" msg_info "Updating Python Dependencies"
cd /opt/soulsync cd /opt/soulsync
@@ -56,9 +54,6 @@ function update_script() {
$STD npm run build $STD npm run build
msg_ok "Built WebUI" msg_ok "Built WebUI"
mv /opt/soulsync-config.bak /opt/soulsync/config
mv /opt/soulsync-data.bak /opt/soulsync/data
msg_info "Starting Service" msg_info "Starting Service"
systemctl start soulsync systemctl start soulsync
msg_ok "Started Service" msg_ok "Started Service"
+2 -13
View File
@@ -35,17 +35,10 @@ function update_script() {
systemctl stop sparkyfitness-server nginx systemctl stop sparkyfitness-server nginx
msg_ok "Stopped Services" msg_ok "Stopped Services"
msg_info "Backing up data" create_backup /opt/sparkyfitness/SparkyFitnessServer/uploads
mkdir -p /opt/sparkyfitness_backup
if [[ -d /opt/sparkyfitness/SparkyFitnessServer/uploads ]]; then
cp -r /opt/sparkyfitness/SparkyFitnessServer/uploads /opt/sparkyfitness_backup/
fi
if [[ -d /opt/sparkyfitness/SparkyFitnessServer/backup ]]; then
cp -r /opt/sparkyfitness/SparkyFitnessServer/backup /opt/sparkyfitness_backup/
fi
msg_ok "Backed up data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "sparkyfitness" "CodeWithCJ/SparkyFitness" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "sparkyfitness" "CodeWithCJ/SparkyFitness" "tarball"
restore_backup
PNPM_VERSION="$(jq -r '.packageManager | split("@")[1]' /opt/sparkyfitness/package.json)" PNPM_VERSION="$(jq -r '.packageManager | split("@")[1]' /opt/sparkyfitness/package.json)"
NODE_VERSION="25" NODE_MODULE="pnpm@${PNPM_VERSION}" setup_nodejs NODE_VERSION="25" NODE_MODULE="pnpm@${PNPM_VERSION}" setup_nodejs
@@ -96,10 +89,6 @@ EOF
systemctl daemon-reload systemctl daemon-reload
msg_ok "Refreshed SparkyFitness Service" msg_ok "Refreshed SparkyFitness Service"
msg_info "Restoring data"
cp -r /opt/sparkyfitness_backup/. /opt/sparkyfitness/SparkyFitnessServer/
rm -rf /opt/sparkyfitness_backup
msg_ok "Restored data"
msg_info "Starting Services" msg_info "Starting Services"
$STD systemctl start sparkyfitness-server nginx $STD systemctl start sparkyfitness-server nginx
+2 -4
View File
@@ -45,14 +45,12 @@ function update_script() {
$STD apt --only-upgrade install -y speedtest $STD apt --only-upgrade install -y speedtest
msg_ok "Updated Speedtest CLI" msg_ok "Updated Speedtest CLI"
msg_info "Creating Backup" create_backup /opt/speedtest-tracker/.env
cp -r /opt/speedtest-tracker /opt/speedtest-tracker-backup
msg_ok "Backup Created"
fetch_and_deploy_gh_release "speedtest-tracker" "alexjustesen/speedtest-tracker" "tarball" "latest" "/opt/speedtest-tracker" fetch_and_deploy_gh_release "speedtest-tracker" "alexjustesen/speedtest-tracker" "tarball" "latest" "/opt/speedtest-tracker"
restore_backup
msg_info "Updating Speedtest Tracker" msg_info "Updating Speedtest Tracker"
cp -r /opt/speedtest-tracker-backup/.env /opt/speedtest-tracker/.env
cd /opt/speedtest-tracker cd /opt/speedtest-tracker
export COMPOSER_ALLOW_SUPERUSER=1 export COMPOSER_ALLOW_SUPERUSER=1
$STD composer install --optimize-autoloader --no-dev $STD composer install --optimize-autoloader --no-dev
+2 -8
View File
@@ -35,16 +35,10 @@ function update_script() {
systemctl stop spliit systemctl stop spliit
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up Configuration" create_backup /opt/spliit/.env
rm -f /opt/spliit.env.bak
cp /opt/spliit/.env /opt/spliit.env.bak
msg_ok "Backed up Configuration"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "spliit" "spliit-app/spliit" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "spliit" "spliit-app/spliit" "tarball"
restore_backup
msg_info "Restoring Configuration"
cp /opt/spliit.env.bak /opt/spliit/.env
msg_ok "Restored Configuration"
msg_info "Building Application" msg_info "Building Application"
cd /opt/spliit cd /opt/spliit
+2 -3
View File
@@ -36,12 +36,11 @@ function update_script() {
systemctl stop spoolman systemctl stop spoolman
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Creating Backup" create_backup /opt/spoolman
[ -d /opt/spoolman_bak ] && rm -rf /opt/spoolman_bak
mv /opt/spoolman /opt/spoolman_bak
msg_ok "Created Backup" msg_ok "Created Backup"
fetch_and_deploy_gh_release "spoolman" "Donkie/Spoolman" "prebuild" "latest" "/opt/spoolman" "spoolman.zip" fetch_and_deploy_gh_release "spoolman" "Donkie/Spoolman" "prebuild" "latest" "/opt/spoolman" "spoolman.zip"
restore_backup
msg_info "Updating Spoolman" msg_info "Updating Spoolman"
cd /opt/spoolman cd /opt/spoolman
+2 -7
View File
@@ -35,15 +35,10 @@ function update_script() {
systemctl stop storyteller systemctl stop storyteller
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up Data" create_backup /opt/storyteller/.env
cp /opt/storyteller/.env /opt/storyteller_env.bak
msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gl_release "storyteller" "storyteller-platform/storyteller" "tarball" "latest" "/opt/storyteller" CLEAN_INSTALL=1 fetch_and_deploy_gl_release "storyteller" "storyteller-platform/storyteller" "tarball" "latest" "/opt/storyteller"
restore_backup
msg_info "Restoring Configuration"
mv /opt/storyteller_env.bak /opt/storyteller/.env
msg_ok "Restored Configuration"
msg_info "Rebuilding Storyteller" msg_info "Rebuilding Storyteller"
cd /opt/storyteller cd /opt/storyteller
+2 -6
View File
@@ -43,17 +43,14 @@ function update_script() {
systemctl stop tandoor systemctl stop tandoor
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Creating Backup" create_backup /opt/tandoor/config /opt/tandoor/api /opt/tandoor/mediafiles /opt/tandoor/staticfiles /opt/tandoor/.env
mv /opt/tandoor /opt/tandoor.bak
msg_ok "Backup Created"
NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs
PYTHON_VERSION="3.13" setup_uv PYTHON_VERSION="3.13" setup_uv
fetch_and_deploy_gh_release "tandoor" "TandoorRecipes/recipes" "tarball" "latest" "/opt/tandoor" fetch_and_deploy_gh_release "tandoor" "TandoorRecipes/recipes" "tarball" "latest" "/opt/tandoor"
restore_backup
msg_info "Updating Tandoor" msg_info "Updating Tandoor"
cp -r /opt/tandoor.bak/{config,api,mediafiles,staticfiles} /opt/tandoor/
mv /opt/tandoor.bak/.env /opt/tandoor/.env
cd /opt/tandoor cd /opt/tandoor
$STD uv venv --clear .venv --python=python3 $STD uv venv --clear .venv --python=python3
$STD uv pip install -r requirements.txt --python .venv/bin/python $STD uv pip install -r requirements.txt --python .venv/bin/python
@@ -69,7 +66,6 @@ EOF
cd /opt/tandoor cd /opt/tandoor
$STD /opt/tandoor/.venv/bin/python manage.py migrate $STD /opt/tandoor/.venv/bin/python manage.py migrate
$STD /opt/tandoor/.venv/bin/python manage.py collectstatic --no-input $STD /opt/tandoor/.venv/bin/python manage.py collectstatic --no-input
rm -rf /opt/tandoor.bak
msg_ok "Updated Tandoor" msg_ok "Updated Tandoor"
msg_info "Starting Service" msg_info "Starting Service"
+2 -7
View File
@@ -36,15 +36,10 @@ function update_script() {
systemctl stop teable systemctl stop teable
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up Configuration" create_backup /opt/teable/.env
cp /opt/teable/.env /opt/teable.env.bak
msg_ok "Backed up Configuration"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "teable" "teableio/teable" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "teable" "teableio/teable" "tarball"
restore_backup
msg_info "Restoring Configuration"
mv /opt/teable.env.bak /opt/teable/.env
msg_ok "Restored Configuration"
msg_info "Rebuilding Teable" msg_info "Rebuilding Teable"
cd /opt/teable cd /opt/teable
+2 -8
View File
@@ -34,16 +34,10 @@ function update_script() {
systemctl stop teddycloud systemctl stop teddycloud
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Creating backup" create_backup /opt/teddycloud/certs /opt/teddycloud/config /opt/teddycloud/data
mv /opt/teddycloud /opt/teddycloud_bak
msg_ok "Backup created"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "teddycloud" "toniebox-reverse-engineering/teddycloud" "prebuild" "latest" "/opt/teddycloud" "teddycloud.amd64.release*.zip" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "teddycloud" "toniebox-reverse-engineering/teddycloud" "prebuild" "latest" "/opt/teddycloud" "teddycloud.amd64.release*.zip"
restore_backup
msg_info "Restoring data"
cp -R /opt/teddycloud_bak/certs /opt/teddycloud_bak/config /opt/teddycloud_bak/data /opt/teddycloud
rm -rf /opt/teddycloud_bak
msg_ok "Data restored"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start teddycloud systemctl start teddycloud
+2 -9
View File
@@ -143,12 +143,10 @@ EOF
fi fi
msg_ok "Migrated Configuration" msg_ok "Migrated Configuration"
msg_info "Backing up Data" create_backup /opt/termix/data /opt/termix/uploads
cp -r /opt/termix/data /opt/termix_data_backup
cp -r /opt/termix/uploads /opt/termix_uploads_backup
msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "termix" "Termix-SSH/Termix" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "termix" "Termix-SSH/Termix" "tarball"
restore_backup
msg_info "Recreating Directories" msg_info "Recreating Directories"
mkdir -p /opt/termix/html \ mkdir -p /opt/termix/html \
@@ -177,11 +175,6 @@ EOF
$STD npm cache clean --force $STD npm cache clean --force
msg_ok "Set up Production Dependencies" msg_ok "Set up Production Dependencies"
msg_info "Restoring Data"
cp -r /opt/termix_data_backup /opt/termix/data
cp -r /opt/termix_uploads_backup /opt/termix/uploads
rm -rf /opt/termix_data_backup /opt/termix_uploads_backup
msg_ok "Restored Data"
msg_info "Updating Frontend Files" msg_info "Updating Frontend Files"
rm -rf /opt/termix/html/* rm -rf /opt/termix/html/*
+2 -6
View File
@@ -36,12 +36,10 @@ function update_script() {
systemctl stop tianji systemctl stop tianji
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up data" create_backup /opt/tianji
cp /opt/tianji/src/server/.env /opt/.env
mv /opt/tianji /opt/tianji_bak
msg_ok "Backed up data"
fetch_and_deploy_gh_release "tianji" "msgbyte/tianji" "tarball" fetch_and_deploy_gh_release "tianji" "msgbyte/tianji" "tarball"
restore_backup
msg_info "Updating Tianji" msg_info "Updating Tianji"
cd /opt/tianji cd /opt/tianji
@@ -52,10 +50,8 @@ function update_script() {
mkdir -p ./src/server/public mkdir -p ./src/server/public
cp -r ./geo ./src/server/public cp -r ./geo ./src/server/public
$STD pnpm build:server $STD pnpm build:server
mv /opt/.env /opt/tianji/src/server/.env
cd src/server cd src/server
$STD pnpm db:migrate:apply $STD pnpm db:migrate:apply
rm -rf /opt/tianji_bak
rm -rf /opt/tianji/src/client rm -rf /opt/tianji/src/client
rm -rf /opt/tianji/website rm -rf /opt/tianji/website
rm -rf /opt/tianji/reporter rm -rf /opt/tianji/reporter
+2 -10
View File
@@ -34,11 +34,7 @@ function update_script() {
systemctl stop traccar systemctl stop traccar
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Creating backup" create_backup /opt/traccar/conf/traccar.xml /opt/traccar/data /opt/traccar/media
mv /opt/traccar/conf/traccar.xml /opt
[[ -d /opt/traccar/data ]] && mv /opt/traccar/data /opt
[[ -d /opt/traccar/media ]] && mv /opt/traccar/media /opt
msg_ok "Backup created"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "traccar" "traccar/traccar" "prebuild" "latest" "/opt/traccar" "traccar-linux-64*.zip" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "traccar" "traccar/traccar" "prebuild" "latest" "/opt/traccar" "traccar-linux-64*.zip"
@@ -47,12 +43,8 @@ function update_script() {
$STD ./traccar.run $STD ./traccar.run
msg_ok "App-Update completed" msg_ok "App-Update completed"
msg_info "Restoring data" restore_backup
mv /opt/traccar.xml /opt/traccar/conf
[[ -d /opt/data ]] && mv /opt/data /opt/traccar
[[ -d /opt/media ]] && mv /opt/media /opt/traccar
[ -f README.txt ] || [ -f traccar.run ] && rm -f README.txt traccar.run [ -f README.txt ] || [ -f traccar.run ] && rm -f README.txt traccar.run
msg_ok "Data restored"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start traccar systemctl start traccar
+2 -10
View File
@@ -31,6 +31,7 @@ function update_script() {
fi fi
fetch_and_deploy_gh_release "calibre" "kovidgoyal/calibre" "prebuild" "latest" "/opt/calibre" "calibre-*-x86_64.txz" fetch_and_deploy_gh_release "calibre" "kovidgoyal/calibre" "prebuild" "latest" "/opt/calibre" "calibre-*-x86_64.txz"
restore_backup
ln -sf /opt/calibre/ebook-convert /usr/bin/ebook-convert ln -sf /opt/calibre/ebook-convert /usr/bin/ebook-convert
fetch_and_deploy_gh_release "drawio" "jgraph/drawio-desktop" "binary" "latest" "" "drawio-amd64-*.deb" fetch_and_deploy_gh_release "drawio" "jgraph/drawio-desktop" "binary" "latest" "" "drawio-amd64-*.deb"
fetch_and_deploy_gh_release "pandoc" "jgm/pandoc" "binary" "latest" "" "pandoc-*-amd64.deb" fetch_and_deploy_gh_release "pandoc" "jgm/pandoc" "binary" "latest" "" "pandoc-*-amd64.deb"
@@ -40,10 +41,7 @@ function update_script() {
systemctl stop transmute systemctl stop transmute
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up Data" create_backup /opt/transmute/data
cp /opt/transmute/backend/.env /opt/transmute.env.bak
cp -r /opt/transmute/data /opt/transmute_data_bak
msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "transmute" "transmute-app/transmute" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "transmute" "transmute-app/transmute" "tarball"
@@ -59,12 +57,6 @@ function update_script() {
$STD npm run build $STD npm run build
msg_ok "Rebuilt Frontend" msg_ok "Rebuilt Frontend"
msg_info "Restoring Data"
cp /opt/transmute.env.bak /opt/transmute/backend/.env
cp -r /opt/transmute_data_bak/. /opt/transmute/data/
rm -f /opt/transmute.env.bak
rm -rf /opt/transmute_data_bak
msg_ok "Restored Data"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start transmute systemctl start transmute
+2 -10
View File
@@ -45,19 +45,11 @@ function update_script() {
sleep 1 sleep 1
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up Database" create_backup ${DB_PATH}
mkdir -p /opt/trilium_backup
cp -r "${DB_PATH}" /opt/trilium_backup/
rm -rf /opt/trilium
msg_ok "Backed up Database"
fetch_and_deploy_gh_release "Trilium" "TriliumNext/Trilium" "prebuild" "latest" "/opt/trilium" "TriliumNotes-Server-*linux-x64.tar.xz" fetch_and_deploy_gh_release "Trilium" "TriliumNext/Trilium" "prebuild" "latest" "/opt/trilium" "TriliumNotes-Server-*linux-x64.tar.xz"
restore_backup
msg_info "Restoring Database"
mkdir -p "$(dirname "${DB_RESTORE_PATH}")"
cp -r /opt/trilium_backup/$(basename "${DB_PATH}") "${DB_RESTORE_PATH}"
rm -rf /opt/trilium_backup
msg_ok "Restored Database"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start trilium systemctl start trilium
+2 -5
View File
@@ -35,9 +35,7 @@ function update_script() {
systemctl stop tubearchivist tubearchivist-celery tubearchivist-beat systemctl stop tubearchivist tubearchivist-celery tubearchivist-beat
msg_ok "Stopped Services" msg_ok "Stopped Services"
msg_info "Backing up Data" create_backup /opt/tubearchivist/.env
cp /opt/tubearchivist/.env /opt/tubearchivist_env.bak
msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "tubearchivist" "tubearchivist/tubearchivist" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "tubearchivist" "tubearchivist/tubearchivist" "tarball"
@@ -55,8 +53,7 @@ function update_script() {
fi fi
msg_ok "Rebuilt Tube Archivist" msg_ok "Rebuilt Tube Archivist"
msg_info "Restoring Configuration" restore_backup
mv /opt/tubearchivist_env.bak /opt/tubearchivist/.env
sed -i 's|^TA_APP_DIR=/opt/tubearchivist$|TA_APP_DIR=/opt/tubearchivist/backend|' /opt/tubearchivist/.env sed -i 's|^TA_APP_DIR=/opt/tubearchivist$|TA_APP_DIR=/opt/tubearchivist/backend|' /opt/tubearchivist/.env
sed -i 's|^TA_CACHE_DIR=/opt/tubearchivist/cache$|TA_CACHE_DIR=/cache|' /opt/tubearchivist/.env sed -i 's|^TA_CACHE_DIR=/opt/tubearchivist/cache$|TA_CACHE_DIR=/cache|' /opt/tubearchivist/.env
sed -i 's|^TA_MEDIA_DIR=/opt/tubearchivist/media$|TA_MEDIA_DIR=/youtube|' /opt/tubearchivist/.env sed -i 's|^TA_MEDIA_DIR=/opt/tubearchivist/media$|TA_MEDIA_DIR=/youtube|' /opt/tubearchivist/.env
+1 -6
View File
@@ -39,10 +39,7 @@ function update_script() {
create_backup /opt/twenty/.env \ create_backup /opt/twenty/.env \
/opt/twenty/packages/twenty-server/.local-storage /opt/twenty/packages/twenty-server/.local-storage
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "twenty" "twentyhq/twenty" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "twenty" "twentyhq/twenty" "tarball"
restore_backup
msg_info "Restoring Configuration"
cp /opt/twenty.env.bak /opt/twenty/.env
msg_ok "Restored Configuration"
msg_info "Building Application" msg_info "Building Application"
cd /opt/twenty cd /opt/twenty
@@ -64,8 +61,6 @@ function update_script() {
$STD npx -y typeorm migration:run -d dist/database/typeorm/core/core.datasource $STD npx -y typeorm migration:run -d dist/database/typeorm/core/core.datasource
msg_ok "Ran Database Migrations" msg_ok "Ran Database Migrations"
restore_backup
msg_info "Starting Services" msg_info "Starting Services"
systemctl start twenty-server twenty-worker systemctl start twenty-server twenty-worker
msg_ok "Started Services" msg_ok "Started Services"
+3 -2
View File
@@ -34,9 +34,10 @@ function update_script() {
systemctl stop umami systemctl stop umami
msg_ok "Stopped Service" msg_ok "Stopped Service"
mv /opt/umami/.env /opt/.env.bak create_backup /opt/umami/.env
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "umami" "umami-software/umami" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "umami" "umami-software/umami" "tarball"
mv /opt/.env.bak /opt/umami/.env restore_backup
msg_info "Updating Umami" msg_info "Updating Umami"
cd /opt/umami cd /opt/umami
+2 -8
View File
@@ -38,16 +38,10 @@ function update_script() {
systemctl stop nginx php8.3-fpm systemctl stop nginx php8.3-fpm
msg_ok "Stopped Services" msg_ok "Stopped Services"
msg_info "Creating Backup" create_backup /opt/wallabag/app/config/parameters.yml
cp /opt/wallabag/app/config/parameters.yml /tmp/wallabag_parameters.yml.bak
msg_ok "Created Backup"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "wallabag" "wallabag/wallabag" "prebuild" "latest" "/opt/wallabag" "wallabag-*.tar.gz" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "wallabag" "wallabag/wallabag" "prebuild" "latest" "/opt/wallabag" "wallabag-*.tar.gz"
restore_backup
msg_info "Restoring Configuration"
cp /tmp/wallabag_parameters.yml.bak /opt/wallabag/app/config/parameters.yml
rm -f /tmp/wallabag_parameters.yml.bak
msg_ok "Restored Configuration"
msg_info "Running Migrations" msg_info "Running Migrations"
cd /opt/wallabag cd /opt/wallabag
+2 -7
View File
@@ -30,18 +30,13 @@ function update_script() {
fi fi
if check_for_gh_release "wallos" "ellite/Wallos"; then if check_for_gh_release "wallos" "ellite/Wallos"; then
msg_info "Creating backup" create_backup /opt/wallos/db/wallos.db /opt/wallos/images/uploads/logos
mkdir -p /opt/logos
mv /opt/wallos/db/wallos.db /opt/wallos.db
mv /opt/wallos/images/uploads/logos /opt/logos/
msg_ok "Backup created"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "wallos" "ellite/Wallos" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "wallos" "ellite/Wallos" "tarball"
restore_backup
msg_info "Configuring Wallos" msg_info "Configuring Wallos"
rm -rf /opt/wallos/db/wallos.empty.db rm -rf /opt/wallos/db/wallos.empty.db
mv /opt/wallos.db /opt/wallos/db/wallos.db
mv /opt/logos/* /opt/wallos/images/uploads/logos
if ! grep -q "storetotalyearlycost.php" /opt/wallos.cron; then if ! grep -q "storetotalyearlycost.php" /opt/wallos.cron; then
echo "30 1 * * 1 php /opt/wallos/endpoints/cronjobs/storetotalyearlycost.php >> /var/log/cron/storetotalyearlycost.log 2>&1" >>/opt/wallos.cron echo "30 1 * * 1 php /opt/wallos/endpoints/cronjobs/storetotalyearlycost.php >> /var/log/cron/storetotalyearlycost.log 2>&1" >>/opt/wallos.cron
fi fi
+5 -16
View File
@@ -34,27 +34,16 @@ function update_script() {
systemctl stop apache2 systemctl stop apache2
msg_ok "Services Stopped" msg_ok "Services Stopped"
msg_info "Creating backup" create_backup /opt/wavelog/application/config/config.php \
cp /opt/wavelog/application/config/config.php /opt/config.php /opt/wavelog/application/config/database.php \
cp /opt/wavelog/application/config/database.php /opt/database.php /opt/wavelog/userdata \
cp -r /opt/wavelog/userdata /opt/userdata /opt/wavelog/assets/js/sections/custom.js
if [[ -f /opt/wavelog/assets/js/sections/custom.js ]]; then
cp /opt/wavelog/assets/js/sections/custom.js /opt/custom.js
fi
msg_ok "Backup created"
rm -rf /opt/wavelog
fetch_and_deploy_gh_release "wavelog" "wavelog/wavelog" "tarball" fetch_and_deploy_gh_release "wavelog" "wavelog/wavelog" "tarball"
restore_backup
msg_info "Updating Wavelog" msg_info "Updating Wavelog"
rm -rf /opt/wavelog/install rm -rf /opt/wavelog/install
mv /opt/config.php /opt/wavelog/application/config/config.php
mv /opt/database.php /opt/wavelog/application/config/database.php
cp -r /opt/userdata/* /opt/wavelog/userdata
rm -rf /opt/userdata
if [[ -f /opt/custom.js ]]; then
mv /opt/custom.js /opt/wavelog/assets/js/sections/custom.js
fi
chown -R www-data:www-data /opt/wavelog/ chown -R www-data:www-data /opt/wavelog/
find /opt/wavelog/ -type d -exec chmod 755 {} \; find /opt/wavelog/ -type d -exec chmod 755 {} \;
find /opt/wavelog/ -type f -exec chmod 664 {} \; find /opt/wavelog/ -type f -exec chmod 664 {} \;

Some files were not shown because too many files have changed in this diff Show More