From 9685a2d2a26c857cde999ea40be92c84e2a9fe10 Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Wed, 4 Jun 2025 06:40:36 +0200 Subject: [PATCH] Update gitea-mirror.sh --- ct/gitea-mirror.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ct/gitea-mirror.sh b/ct/gitea-mirror.sh index ab42d77e..a55ebc5e 100644 --- a/ct/gitea-mirror.sh +++ b/ct/gitea-mirror.sh @@ -52,8 +52,10 @@ function update_script() { msg_info "Updating and rebuilding ${APP} to v${RELEASE}" cd /opt/gitea-mirror - $STD bun install + $STD bun run setup $STD bun run build + APP_VERSION=$(grep -o '"version": *"[^"]*"' package.json | cut -d'"' -f4) + sudo sed -i.bak "s|^Environment=npm_package_version=.*|Environment=npm_package_version=${APP_VERSION}|" /etc/systemd/system/gitea-mirror.service msg_ok "Updated and rebuilt ${APP} to v${RELEASE}" msg_info "Restoring Data" @@ -61,6 +63,7 @@ function update_script() { msg_ok "Restored Data" msg_info "Starting Service" + systemctl daemon-reload systemctl start gitea-mirror msg_ok "Service Started" else