mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-08-13 08:06:12 +02:00
fix: gitea-mirror
This commit is contained in:
+5
-4
@@ -87,6 +87,8 @@ EOF
|
|||||||
msg_ok "Old Enviroment fixed"
|
msg_ok "Old Enviroment fixed"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
ensure_dependencies git
|
||||||
|
|
||||||
if check_for_gh_release "gitea-mirror" "RayLabsHQ/gitea-mirror"; then
|
if check_for_gh_release "gitea-mirror" "RayLabsHQ/gitea-mirror"; then
|
||||||
msg_info "Stopping Services"
|
msg_info "Stopping Services"
|
||||||
systemctl stop gitea-mirror
|
systemctl stop gitea-mirror
|
||||||
@@ -94,7 +96,7 @@ EOF
|
|||||||
|
|
||||||
msg_info "Backup Data"
|
msg_info "Backup Data"
|
||||||
mkdir -p /opt/gitea-mirror-backup/data
|
mkdir -p /opt/gitea-mirror-backup/data
|
||||||
cp /opt/gitea-mirror/data/* /opt/gitea-mirror-backup/data/
|
cp -r /opt/gitea-mirror/data/* /opt/gitea-mirror-backup/data/
|
||||||
msg_ok "Backup Data"
|
msg_ok "Backup Data"
|
||||||
|
|
||||||
msg_info "Installing Bun"
|
msg_info "Installing Bun"
|
||||||
@@ -111,12 +113,11 @@ EOF
|
|||||||
$STD bun run setup
|
$STD bun run setup
|
||||||
$STD bun run build
|
$STD bun run build
|
||||||
APP_VERSION=$(grep -o '"version": *"[^"]*"' package.json | cut -d'"' -f4)
|
APP_VERSION=$(grep -o '"version": *"[^"]*"' package.json | cut -d'"' -f4)
|
||||||
|
sed -i.bak "s|^npm_package_version=.*|npm_package_version=${APP_VERSION}|" /opt/gitea-mirror.env
|
||||||
sudo sed -i.bak "s|^npm_package_version=.*|npm_package_version=${APP_VERSION}|" /opt/gitea-mirror.env
|
|
||||||
msg_ok "Updated and rebuilt ${APP}"
|
msg_ok "Updated and rebuilt ${APP}"
|
||||||
|
|
||||||
msg_info "Restoring Data"
|
msg_info "Restoring Data"
|
||||||
cp /opt/gitea-mirror-backup/data/* /opt/gitea-mirror/data
|
cp -r /opt/gitea-mirror-backup/data/* /opt/gitea-mirror/data
|
||||||
msg_ok "Restored Data"
|
msg_ok "Restored Data"
|
||||||
|
|
||||||
msg_info "Starting Service"
|
msg_info "Starting Service"
|
||||||
|
|||||||
Reference in New Issue
Block a user