Standardize CT update backup handling (#15937)

This commit is contained in:
CanbiZ (MickLesk)
2026-07-21 12:52:51 +02:00
committed by GitHub
parent d8efbd04d8
commit bd3e3bd5f9
76 changed files with 215 additions and 626 deletions
+2 -7
View File
@@ -36,17 +36,12 @@ function update_script() {
systemctl stop caddy php${PHP_VER}-fpm
msg_ok "Stopped Service"
msg_info "Backing up Data"
cp -r /opt/webtrees/data /opt/webtrees_data_backup
msg_ok "Backed up Data"
create_backup /opt/webtrees/data
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "webtrees" "fisharebest/webtrees" "prebuild" "latest" "/opt/webtrees" "webtrees-*.zip"
msg_info "Restoring Data"
cp -r /opt/webtrees_data_backup/. /opt/webtrees/data
rm -rf /opt/webtrees_data_backup
restore_backup
chown -R www-data:www-data /opt/webtrees
msg_ok "Restored Data"
msg_info "Starting Service"
systemctl start caddy php${PHP_VER}-fpm