Fix folder not present

This commit is contained in:
DragoQC 2025-12-04 21:08:28 -05:00
parent 7f8266081d
commit d28a3051e7

View File

@ -1,7 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/DragoQC/ProxmoxVE/main/misc/build.func) source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
#source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
# Copyright (c) 2021-2025 community-scripts ORG # Copyright (c) 2021-2025 community-scripts ORG
# Author: DragoQC # Author: DragoQC
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
@ -38,16 +36,12 @@ function update_script() {
msg_info "Creating Backup" msg_info "Creating Backup"
mkdir -p /opt/discopanel_backup_last mkdir -p /opt/discopanel_backup_last
backup_items=( cp -r /opt/discopanel/data/discopanel.db \
"/opt/discopanel/data/discopanel.db" /opt/discopanel/data/.recovery_key \
"/opt/discopanel/data/.recovery_key" /opt/discopanel_backup_last/
"/opt/discopanel/data/servers" if [[ -d /opt/discopanel/data/servers ]]; then
) cp -r /opt/discopanel/data/servers /opt/discopanel_backup_last/
for item in "${backup_items[@]}"; do
if [[ -e "$item" ]]; then
cp -r "$item" /opt/discopanel_backup_last/
fi fi
done
msg_ok "Created Backup" msg_ok "Created Backup"
rm -rf /opt/discopanel rm -rf /opt/discopanel