From e78a3c09459510c766bea283ccc73edfd153f84f Mon Sep 17 00:00:00 2001 From: DragoQC Date: Thu, 4 Dec 2025 19:22:12 -0500 Subject: [PATCH 01/11] Fix remove one space --- ct/discopanel.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/discopanel.sh b/ct/discopanel.sh index 179002485..700605f6a 100644 --- a/ct/discopanel.sh +++ b/ct/discopanel.sh @@ -44,7 +44,7 @@ function update_script() { rm -rf /opt/discopanel - CLEAN_INSTALL= 1 fetch_and_deploy_gh_release "discopanel" "nickheyer/discopanel" "tarball" "latest" "/opt/discopanel" + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "discopanel" "nickheyer/discopanel" "tarball" "latest" "/opt/discopanel" msg_info "Setting up DiscoPanel" cd /opt/discopanel/web/discopanel $STD npm install From dbafdc7117eb64df5d6a3c578681366bfecbed66 Mon Sep 17 00:00:00 2001 From: DragoQC Date: Thu, 4 Dec 2025 19:36:10 -0500 Subject: [PATCH 02/11] Fix crash update without server folder --- ct/discopanel.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ct/discopanel.sh b/ct/discopanel.sh index 700605f6a..e5b8f8213 100644 --- a/ct/discopanel.sh +++ b/ct/discopanel.sh @@ -38,8 +38,10 @@ function update_script() { 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/ + if [[ -d /opt/discopanel/data/servers ]]; then + cp -r /opt/discopanel/data/servers /opt/discopanel_backup_last/ + fi msg_ok "Created Backup" rm -rf /opt/discopanel From bec1e1b7378f7067bd2237e3fe2559b595e6bdb2 Mon Sep 17 00:00:00 2001 From: DragoQC Date: Thu, 4 Dec 2025 19:38:02 -0500 Subject: [PATCH 03/11] Transform in loop --- ct/discopanel.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/ct/discopanel.sh b/ct/discopanel.sh index e5b8f8213..f9d192269 100644 --- a/ct/discopanel.sh +++ b/ct/discopanel.sh @@ -36,12 +36,16 @@ function update_script() { msg_info "Creating Backup" mkdir -p /opt/discopanel_backup_last - cp -r /opt/discopanel/data/discopanel.db \ - /opt/discopanel/data/.recovery_key \ - /opt/discopanel_backup_last/ - if [[ -d /opt/discopanel/data/servers ]]; then - cp -r /opt/discopanel/data/servers /opt/discopanel_backup_last/ - fi + backup_items=( + "/opt/discopanel/data/discopanel.db" + "/opt/discopanel/data/.recovery_key" + "/opt/discopanel/data/servers" + ) + for item in "${backup_items[@]}"; do + if [[ -e "$item" ]]; then + cp -r "$item" /opt/discopanel_backup_last/ + fi + done msg_ok "Created Backup" rm -rf /opt/discopanel From 7f8266081d9b9dd6641b70375a02898ff08031da Mon Sep 17 00:00:00 2001 From: DragoQC Date: Thu, 4 Dec 2025 19:57:49 -0500 Subject: [PATCH 04/11] Temp for dev --- ct/discopanel.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ct/discopanel.sh b/ct/discopanel.sh index f9d192269..158fa9003 100644 --- a/ct/discopanel.sh +++ b/ct/discopanel.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +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) # Copyright (c) 2021-2025 community-scripts ORG # Author: DragoQC # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE From d28a3051e7823220feda62041d99a9e7d97a1f2f Mon Sep 17 00:00:00 2001 From: DragoQC Date: Thu, 4 Dec 2025 21:08:28 -0500 Subject: [PATCH 05/11] Fix folder not present --- ct/discopanel.sh | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/ct/discopanel.sh b/ct/discopanel.sh index 158fa9003..e5b8f8213 100644 --- a/ct/discopanel.sh +++ b/ct/discopanel.sh @@ -1,7 +1,5 @@ #!/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 # Author: DragoQC # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE @@ -38,16 +36,12 @@ function update_script() { msg_info "Creating Backup" mkdir -p /opt/discopanel_backup_last - backup_items=( - "/opt/discopanel/data/discopanel.db" - "/opt/discopanel/data/.recovery_key" - "/opt/discopanel/data/servers" - ) - for item in "${backup_items[@]}"; do - if [[ -e "$item" ]]; then - cp -r "$item" /opt/discopanel_backup_last/ - fi - done + cp -r /opt/discopanel/data/discopanel.db \ + /opt/discopanel/data/.recovery_key \ + /opt/discopanel_backup_last/ + if [[ -d /opt/discopanel/data/servers ]]; then + cp -r /opt/discopanel/data/servers /opt/discopanel_backup_last/ + fi msg_ok "Created Backup" rm -rf /opt/discopanel From ee79d84af7d384881b1dd7013775d6da777f4f82 Mon Sep 17 00:00:00 2001 From: DragoQC Date: Thu, 4 Dec 2025 21:59:39 -0500 Subject: [PATCH 06/11] Fixed data folder not existing --- ct/discopanel.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/discopanel.sh b/ct/discopanel.sh index e5b8f8213..b66f7c2f8 100644 --- a/ct/discopanel.sh +++ b/ct/discopanel.sh @@ -56,6 +56,7 @@ function update_script() { msg_ok "Setup DiscoPanel" msg_info "Restoring Data" + mkdir -p /opt/discopanel/data cp -r /opt/discopanel_backup_last/* /opt/discopanel/data/ msg_ok "Restored Data" From 2cb658bf733a5baf12c9b23e88b6720093f524d9 Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Fri, 5 Dec 2025 07:23:01 +0100 Subject: [PATCH 07/11] Remove redundant removal of /opt/discopanel --- ct/discopanel.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ct/discopanel.sh b/ct/discopanel.sh index b66f7c2f8..93d40002a 100644 --- a/ct/discopanel.sh +++ b/ct/discopanel.sh @@ -44,8 +44,6 @@ function update_script() { fi msg_ok "Created Backup" - rm -rf /opt/discopanel - CLEAN_INSTALL=1 fetch_and_deploy_gh_release "discopanel" "nickheyer/discopanel" "tarball" "latest" "/opt/discopanel" msg_info "Setting up DiscoPanel" cd /opt/discopanel/web/discopanel @@ -56,7 +54,7 @@ function update_script() { msg_ok "Setup DiscoPanel" msg_info "Restoring Data" - mkdir -p /opt/discopanel/data + mkdir -p /opt/discopanel/data cp -r /opt/discopanel_backup_last/* /opt/discopanel/data/ msg_ok "Restored Data" From 918a5c9dcb3651475bce97376c5f88e8a625e8b6 Mon Sep 17 00:00:00 2001 From: DragoQC Date: Fri, 5 Dec 2025 12:44:29 -0500 Subject: [PATCH 09/11] Fix discopanel.sh Copy now works and multiple udpate supported Used cp -a with . instead of * --- ct/discopanel.sh | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/ct/discopanel.sh b/ct/discopanel.sh index 93d40002a..3084f3afa 100644 --- a/ct/discopanel.sh +++ b/ct/discopanel.sh @@ -55,7 +55,7 @@ function update_script() { msg_info "Restoring Data" mkdir -p /opt/discopanel/data - cp -r /opt/discopanel_backup_last/* /opt/discopanel/data/ + cp -a /opt/discopanel_backup_last/. /opt/discopanel/data/ msg_ok "Restored Data" msg_info "Starting Service" @@ -65,12 +65,3 @@ function update_script() { fi exit } - -start -build_container -description - -msg_ok "Completed Successfully!\n" -echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" -echo -e "${INFO}${YW} Access it using the following URL:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080${CL}" From c458ee3795adb6a48be55a260eb91835808efc92 Mon Sep 17 00:00:00 2001 From: DragoQC Date: Fri, 5 Dec 2025 12:46:45 -0500 Subject: [PATCH 10/11] Added back end messages --- ct/discopanel.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ct/discopanel.sh b/ct/discopanel.sh index 3084f3afa..cf388b0f0 100644 --- a/ct/discopanel.sh +++ b/ct/discopanel.sh @@ -65,3 +65,12 @@ function update_script() { fi exit } + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Access it using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080${CL}" From a028f3d7b09bcd6551ba4e6556811a4cdd1ed754 Mon Sep 17 00:00:00 2001 From: DragoQC Date: Fri, 5 Dec 2025 13:04:55 -0500 Subject: [PATCH 11/11] added removing backup data after restore Renamed to discopanel_backup_temp --- ct/discopanel.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ct/discopanel.sh b/ct/discopanel.sh index cf388b0f0..54835980d 100644 --- a/ct/discopanel.sh +++ b/ct/discopanel.sh @@ -35,12 +35,12 @@ function update_script() { msg_ok "Stopped Service" msg_info "Creating Backup" - mkdir -p /opt/discopanel_backup_last + mkdir -p /opt/discopanel_backup_temp cp -r /opt/discopanel/data/discopanel.db \ /opt/discopanel/data/.recovery_key \ - /opt/discopanel_backup_last/ + /opt/discopanel_backup_temp/ if [[ -d /opt/discopanel/data/servers ]]; then - cp -r /opt/discopanel/data/servers /opt/discopanel_backup_last/ + cp -r /opt/discopanel/data/servers /opt/discopanel_backup_temp/ fi msg_ok "Created Backup" @@ -55,7 +55,8 @@ function update_script() { msg_info "Restoring Data" mkdir -p /opt/discopanel/data - cp -a /opt/discopanel_backup_last/. /opt/discopanel/data/ + cp -a /opt/discopanel_backup_temp/. /opt/discopanel/data/ + rm -rf /opt/discopanel_backup_temp msg_ok "Restored Data" msg_info "Starting Service"