fix regular copy instead of tar

Use setup_node
Remove installing dependencies not needed
This commit is contained in:
DragoQC 2025-11-28 16:35:09 -05:00
parent 590049938c
commit 2b7d992632
2 changed files with 8 additions and 7 deletions

View File

@ -35,7 +35,11 @@ function update_script() {
msg_ok "Stopped Service"
msg_info "Creating Backup"
tar -czf "/opt/discopanel_backup_last.tar.gz" -C "/opt/discopanel/data" discopanel.db .recovery_key servers
mkdir -p /opt/discopanel_backup_last
cp -r /opt/discopanel/data/discopanel.db \
/opt/discopanel/data/.recovery_key \
/opt/discopanel/data/servers \
/opt/discopanel_backup_last/
msg_ok "Created Backup"
rm -rf /opt/discopanel
@ -53,7 +57,7 @@ function update_script() {
msg_ok "Builded backend"
msg_info "Restoring Data"
tar -xzf "/opt/discopanel_backup_last.tar.gz" -C "/opt/discopanel/data"
cp -r /opt/discopanel_backup_last/* /opt/discopanel/data/
msg_ok "Restored Data"
msg_info "Starting Service"

View File

@ -14,11 +14,6 @@ setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt install -y \
npm
msg_ok "Installed Dependencies"
msg_info "Installing Docker"
DOCKER_CONFIG_PATH='/etc/docker/daemon.json'
mkdir -p $(dirname $DOCKER_CONFIG_PATH)
@ -31,6 +26,8 @@ msg_info "Installing DiscoPanel"
fetch_and_deploy_gh_release "discopanel" "nickheyer/discopanel" "tarball" "latest" "/opt/discopanel"
msg_ok "Installed DiscoPanel"
setup_nodejs
msg_info "Building DiscoPanel frontend"
cd /opt/discopanel/web/discopanel
$STD npm install