mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-07-04 21:22:14 +02:00
Refactor configuration restoration to use restore_backup
Removed manual configuration restoration and replaced it with a backup restore function.
This commit is contained in:
+1
-5
@@ -41,10 +41,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
|
||||||
@@ -66,7 +63,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
|
||||||
|
|||||||
Reference in New Issue
Block a user