From 621aaebc8eaad0923403f3f7ae3204b75ed32159 Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Mon, 2 Jun 2025 09:27:09 +0200 Subject: [PATCH] Update gitea-mirror.sh --- ct/gitea-mirror.sh | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/ct/gitea-mirror.sh b/ct/gitea-mirror.sh index 5a14d31b..96983d93 100644 --- a/ct/gitea-mirror.sh +++ b/ct/gitea-mirror.sh @@ -6,7 +6,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV # Source: https://github.com/arunavo4/gitea-mirror APP="gitea-mirror" -var_tags="${var_tags:-arr;dashboard}" +var_tags="${var_tags:-mirror;gitea}" var_cpu="${var_cpu:-2}" var_ram="${var_ram:-1024}" var_disk="${var_disk:-5}" @@ -31,13 +31,13 @@ function update_script() { RELEASE=$(curl -fsSL https://api.github.com/repos/arunavo4/gitea-mirror/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then - msg_info "Stopping Services (Patience)" + msg_info "Stopping Services" systemctl stop gitea-mirror msg_ok "Services Stopped" msg_info "Backup Data" - mkdir -p /opt/homarr-data-backup - cp /opt/homarr/.env /opt/homarr-data-backup/.env + mkdir -p /opt/gitea-mirror-backup/data + cp /opt/gitea-mirror/data/* /opt/gitea-mirror-backup/data/ msg_ok "Backup Data" msg_info "Installing Bun" @@ -48,13 +48,20 @@ function update_script() { msg_ok "Installed Bun" msg_info "Updating and rebuilding ${APP} to v${RELEASE} (Patience)" - apt install -y git - rm -rf /opt/homarr + rm -rf /opt/gitea-mirror fetch_and_deploy_gh_release "arunavo4/gitea-mirror" cd /opt/gitea-mirror bun install bun run build bun run manage-db init + + msg_info "Restoring Data" + cp /opt/gitea-mirror-backup/data/* /opt/gitea-mirror/data + msg_ok "Restored Data" + + msg_info "Starting Services" + systemctl start gitea-mirror + msg_ok "Services Started" else msg_ok "No update required. ${APP} is already at v${RELEASE}" fi