diff --git a/www/authelia/Makefile b/www/authelia/Makefile index aa5d2320b0f51..fbc079f79bf93 100644 --- a/www/authelia/Makefile +++ b/www/authelia/Makefile @@ -3,7 +3,7 @@ PORTNAME= authelia DISTVERSIONPREFIX= v DISTVERSION= 4.27.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= www MASTER_SITES= https://github.com/authelia/authelia/releases/download/v${DISTVERSION}/:public_html DISTFILES= authelia-public_html${EXTRACT_SUFX}:public_html # html root directory needs to be built in a special way @@ -87,6 +87,10 @@ GH_TUPLE= \ valyala:fasthttp:v1.22.0:valyala_fasthttp/vendor/github.com/valyala/fasthttp GO_TARGET= ./cmd/${PORTNAME} +USER= root # 'nobody' doesn't work well because authelia attempts to remove files, etc. +SUB_LIST= USER=${USER} +USE_RC_SUBR= ${PORTNAME} + post-extract: # extract -public-html @${RM} -r ${WRKSRC}/internal/server/public_html @${MV} ${WRKDIR}/public_html ${WRKSRC}/internal/server diff --git a/www/authelia/files/authelia.in b/www/authelia/files/authelia.in new file mode 100644 index 0000000000000..a7102a2802d95 --- /dev/null +++ b/www/authelia/files/authelia.in @@ -0,0 +1,27 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: authelia +# REQUIRE: DAEMON NETWORKING +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable authelia: +# authelia_enable : set to "YES" to enable the daemon, default is "NO" + +. /etc/rc.subr + +name=authelia +rcvar=authelia_enable + +load_rc_config $name + +authelia_enable=${authelia_enable:-"NO"} + +logfile="/var/log/${name}.log" + +procname=%%PREFIX%%/bin/authelia +command="/usr/sbin/daemon" +command_args="-u %%USER%% -o ${logfile} -t ${name} %%PREFIX%%/bin/authelia --config %%PREFIX%%/etc/authelia.yml" + +run_rc_command "$1"