git: a2448a0110a3 - main - www/gitea: Fix startup script

From: Emanuel Haupt <ehaupt_at_FreeBSD.org>
Date: Fri, 18 Oct 2024 07:16:52 UTC
The branch main has been updated by ehaupt:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a2448a0110a37c4dffa7a7fbf9086795b6ba9c90

commit a2448a0110a37c4dffa7a7fbf9086795b6ba9c90
Author:     Emanuel Haupt <ehaupt@FreeBSD.org>
AuthorDate: 2024-10-18 07:15:16 +0000
Commit:     Emanuel Haupt <ehaupt@FreeBSD.org>
CommitDate: 2024-10-18 07:16:10 +0000

    www/gitea: Fix startup script
    
    Fix startup script. Current version fails to start.
    
    Approved by:    blanket (fix trivial things policy)
---
 www/gitea/Makefile       | 1 +
 www/gitea/files/gitea.in | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/www/gitea/Makefile b/www/gitea/Makefile
index 9d61421b0223..0ed8bb4eb040 100644
--- a/www/gitea/Makefile
+++ b/www/gitea/Makefile
@@ -1,6 +1,7 @@
 PORTNAME=	gitea
 DISTVERSIONPREFIX=	v
 DISTVERSION=	1.22.3
+PORTREVISION=	1
 CATEGORIES=	www
 MASTER_SITES=	https://github.com/go-gitea/gitea/releases/download/${DISTVERSIONPREFIX}${DISTVERSION}/ \
 		https://dl.gitea.io/gitea/${DISTVERSION}/
diff --git a/www/gitea/files/gitea.in b/www/gitea/files/gitea.in
index 3b1814b25fb9..566a4b46ef93 100644
--- a/www/gitea/files/gitea.in
+++ b/www/gitea/files/gitea.in
@@ -52,7 +52,7 @@ gitea_start() {
 
 gitea_prestart() {
 	if checkyesno gitea_configcheck_enable; then
-		if su ${gitea_user} -c "%%PREFIX%%/sbin/${name} doctor check >/dev/null"; then
+		if su -m ${gitea_user} -c "%%PREFIX%%/sbin/${name} doctor check >/dev/null"; then
 		else
 			echo "cannot start ${name} because of configuration errors. Run" >&2
 			echo "    su -m git -c '${name} doctor check'" >&2