summaryrefslogtreecommitdiff
path: root/devel/athens
diff options
context:
space:
mode:
Diffstat (limited to 'devel/athens')
-rw-r--r--devel/athens/Makefile4
-rw-r--r--devel/athens/files/athens.in15
2 files changed, 13 insertions, 6 deletions
diff --git a/devel/athens/Makefile b/devel/athens/Makefile
index 15669abb7384..ec42ee0d84b8 100644
--- a/devel/athens/Makefile
+++ b/devel/athens/Makefile
@@ -1,7 +1,7 @@
PORTNAME= athens
DISTVERSIONPREFIX= v
DISTVERSION= 0.16.1
-PORTREVISION= 1
+PORTREVISION= 3
CATEGORIES= devel
MAINTAINER= bofh@FreeBSD.org
@@ -11,7 +11,7 @@ WWW= https://github.com/gomods/athens
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
-USES= go:1.23,modules
+USES= go:modules
USE_RC_SUBR= ${PORTNAME}
GO_MODULE= github.com/gomods/${PORTNAME}
diff --git a/devel/athens/files/athens.in b/devel/athens/files/athens.in
index f9857d8fd2ef..7d1e07cf164c 100644
--- a/devel/athens/files/athens.in
+++ b/devel/athens/files/athens.in
@@ -25,20 +25,27 @@
name=athens
rcvar=athens_enable
+load_rc_config $name
+
: ${athens_enable:="NO"}
: ${athens_config:="%%ETCDIR%%/athens.toml"}
: ${athens_user:=%%ATHENS_USER%%}
: ${athens_group:=%%ATHENS_GROUP%%}
-: ${athens_pidfile:="/var/run/athens.pid"}
athens_command="%%PREFIX%%/bin/athens -config_file ${athens_config}"
+pidfile="/var/run/${name}/${name}.pid"
command="/usr/sbin/daemon"
-command_args="-p ${athens_pidfile} -u ${athens_user} -S ${athens_command}"
+command_args="-P ${pidfile} -S ${athens_command}"
PATH="${PATH}:%%PREFIX%%/bin"
-load_rc_config $name
-
required_files="${athens_config}"
+start_precmd="athens_precmd"
+
+athens_precmd()
+{
+ /usr/bin/install -d -m 700 -o "${athens_user}" -g "${athens_group}" /var/run/athens
+}
+
run_rc_command "$1"