From fd13dff335f032ad305d426b5edd42911b7e570e Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Mon, 31 Aug 2026 08:49:37 +0200 Subject: [PATCH] Refactor: OpenGist (#16861) --- ct/opengist.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/ct/opengist.sh b/ct/opengist.sh index 8f470ef1e..b0bcf2136 100644 --- a/ct/opengist.sh +++ b/ct/opengist.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main" +_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func" +source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func") # Copyright (c) 2021-2026 community-scripts ORG # Author: Jonathan (jd-apprentice) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE @@ -33,15 +35,11 @@ function update_script() { systemctl stop opengist msg_ok "Stopped Service" - msg_info "Creating backup" - mv /opt/opengist /opt/opengist-backup - msg_ok "Backup created" + create_backup /opt/opengist/config.yml - fetch_and_deploy_gh_release "opengist" "thomiceli/opengist" "prebuild" "latest" "/opt/opengist" "opengist*linux-$(arch_resolve).tar.gz" + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "opengist" "thomiceli/opengist" "prebuild" "latest" "/opt/opengist" "opengist*linux-$(arch_resolve).tar.gz" - msg_info "Restoring Configuration" - mv /opt/opengist-backup/config.yml /opt/opengist/config.yml - msg_ok "Configuration Restored" + restore_backup msg_info "Starting Service" systemctl start opengist