fix(gitea): Set PATH at startup and fix SCRIPT_TYPE

- Export PATH at top of startup script for git binary
- Export HOME=/data for proper environment
- Set SCRIPT_TYPE=sh in app.ini (no bash in Alpine)
- Bump to r5

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
CyberMind-FR 2026-01-24 11:32:34 +01:00
parent 9eed3a50d1
commit 5a2ef2d6ff
2 changed files with 6 additions and 1 deletions

View File

@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=secubox-app-gitea
PKG_VERSION:=1.0.0
PKG_RELEASE:=4
PKG_RELEASE:=5
PKG_ARCH:=all
PKG_MAINTAINER:=CyberMind Studio <contact@cybermind.fr>

View File

@ -234,7 +234,9 @@ create_startup_script() {
#!/bin/sh
set -e
export PATH="/usr/local/bin:/usr/bin:/bin:/sbin:/usr/sbin"
export GITEA_WORK_DIR=/data
export HOME=/data
export USER=git
# Install packages if needed (check if su-exec exists)
@ -315,6 +317,7 @@ PATH = /data/gitea.db
[repository]
ROOT = /data/git/repositories
SCRIPT_TYPE = sh
[security]
INSTALL_LOCK = true
@ -338,6 +341,8 @@ fi
# Start Gitea
echo "Starting Gitea..."
cd /data
export PATH="/usr/local/bin:/usr/bin:/bin:/sbin:/usr/sbin"
export HOME=/data
exec su-exec git /usr/local/bin/gitea web --config /data/custom/conf/app.ini
STARTUP
chmod +x "$rootfs/opt/start-gitea.sh"