Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 Jan 2026 05:24:37 +0000
From:      Santhosh Raju <fox@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 738863053475 - main - www/opengist: Fix user creation and usage.
Message-ID:  <697d9215.3fe3d.5f399fff@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by fox:

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

commit 738863053475c824a2d919c9f6b2da77ca553026
Author:     Santhosh Raju <fox@FreeBSD.org>
AuthorDate: 2026-01-31 05:17:57 +0000
Commit:     Santhosh Raju <fox@FreeBSD.org>
CommitDate: 2026-01-31 05:17:57 +0000

    www/opengist: Fix user creation and usage.
    
    PR:             292747
    Reported by:    Swee <meow@swee.codes>
---
 www/opengist/Makefile          |  6 ++++--
 www/opengist/files/opengist.in | 12 ++++--------
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/www/opengist/Makefile b/www/opengist/Makefile
index 1a9bb3d10c02..774ef5113162 100644
--- a/www/opengist/Makefile
+++ b/www/opengist/Makefile
@@ -31,8 +31,8 @@ GO_TARGET=	.
 GO_BUILDFLAGS=	-tags fs_embed \
 		-ldflags="-X github.com/thomiceli/opengist/internal/config.OpengistVersion=v${DISTVERSION}"
 
-GROUP=		opengist
-USER=		opengist
+GROUPS=		opengist
+USERS=		opengist
 
 post-extract:
 	@${RLN} ${WRKDIR}/node_modules ${WRKSRC}/node_modules
@@ -54,7 +54,9 @@ post-install:
 	${INSTALL_DATA} ${WRKSRC}/config.yml \
 		${STAGEDIR}${PREFIX}/etc/${PORTNAME}/config.yml.sample
 	${MKDIR} ${STAGEDIR}/var/db/${PORTNAME}
+	${CHOWN} opengist:opengist ${STAGEDIR}/var/db/${PORTNAME}
 	${MKDIR} ${STAGEDIR}/var/run/${PORTNAME}
+	${CHOWN} opengist:opengist ${STAGEDIR}/var/run/${PORTNAME}
 	${MKDIR} ${STAGEDIR}${WWWDIR}/assets
 	cd ${WRKSRC} && \
 		${INSTALL_DATA} public/assets/* \
diff --git a/www/opengist/files/opengist.in b/www/opengist/files/opengist.in
index 8249f946c892..be31988b3d7a 100644
--- a/www/opengist/files/opengist.in
+++ b/www/opengist/files/opengist.in
@@ -52,7 +52,6 @@ fi
 pidfile=/var/run/opengist/${name}.pid
 procname="%%PREFIX%%/bin/${name}"
 
-start_cmd="${name}_start"
 start_precmd="${name}_precmd"
 
 opengist_precmd()
@@ -63,13 +62,10 @@ opengist_precmd()
 	fi
 }
 
-opengist_start() {
-	echo "Starting opengist."
-	/usr/sbin/daemon -f ${opengist_syslog_output_flags} -p ${pidfile} \
-		/usr/bin/env -i \
-		"PATH=%%PREFIX%%/bin:${PATH}" \
-		${procname} -c ${opengist_config_file}
-}
+command="/usr/sbin/daemon"
+command_args="-f ${opengist_syslog_output_flags} -p ${pidfile} \
+    /usr/bin/env -i \"PATH=%%PREFIX%%/bin:${PATH}\" \
+    ${procname} -c ${opengist_config_file}"
 
 cd ${opengist_home}
 


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?697d9215.3fe3d.5f399fff>