svn commit: r569006 - in head/www/authelia: . files
Yuri Victorovich
yuri at FreeBSD.org
Tue Mar 23 02:44:19 UTC 2021
Author: yuri
Date: Tue Mar 23 02:44:18 2021
New Revision: 569006
URL: https://svnweb.freebsd.org/changeset/ports/569006
Log:
www/authelia: Add the rc script
Added:
head/www/authelia/files/
head/www/authelia/files/authelia.in (contents, props changed)
Modified:
head/www/authelia/Makefile
Modified: head/www/authelia/Makefile
==============================================================================
--- head/www/authelia/Makefile Tue Mar 23 01:47:23 2021 (r569005)
+++ head/www/authelia/Makefile Tue Mar 23 02:44:18 2021 (r569006)
@@ -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
@@ -86,6 +86,10 @@ GH_TUPLE= \
valyala:bytebufferpool:v1.0.0:valyala_bytebufferpool/vendor/github.com/valyala/bytebufferpool \
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
Added: head/www/authelia/files/authelia.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/authelia/files/authelia.in Tue Mar 23 02:44:18 2021 (r569006)
@@ -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"
More information about the svn-ports-head
mailing list