1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-04 01:48:54 +00:00

security/arti: Daemonize port and add config file

This commit is contained in:
Carlo Strub 2021-11-07 00:30:32 +01:00
parent b78f8280ca
commit 5e3dc13a56
No known key found for this signature in database
GPG Key ID: 1C7A2F39D966052B
3 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,36 @@
#!/bin/sh
# $FreeBSD$
#
# PROVIDE: arti
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add these lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# arti_enable (bool): Set to NO by default.
# Set it to YES to enable arti.
# arti_config (path): Set to %%PREFIX%%/etc/arti/arti.cf
# by default.
# arti_user (str): Arti daemon user. Default: %%USER%%
# arti_pidfile (str): Arti pid file. Default: /var/run/arti/arti.pid
. /etc/rc.subr
name=arti
rcvar=arti_enable
load_rc_config $name
: ${arti_enable:="NO"}
: ${arti_config="%%PREFIX%%/etc/arti/arti.toml"}
: ${arti_pidfile="/var/run/arti/arti.pid"}
command=/usr/sbin/daemon
arti=%%PREFIX%%/bin/${name}
command_args="-c -f -o /var/log/arti/arti.log -P $arti_pidfile $arti proxy -c $arti_config"
run_rc_command "$1"

View File

@ -0,0 +1,11 @@
--- crates/arti/src/arti_defaults.toml.orig 2021-11-06 21:39:35 UTC
+++ crates/arti/src/arti_defaults.toml
@@ -38,7 +38,7 @@ trace_filter = "debug"
#
# The state directory is not yet used.
[storage]
-cache_dir = "${APP_CACHE}"
+cache_dir = "/var/db/arti"
state_dir = "${APP_LOCAL_DATA}"
# Replacement values for consensus parameters. This is an advanced option

6
security/arti/pkg-plist Normal file
View File

@ -0,0 +1,6 @@
bin/arti
@sample %%ETCDIR%%/arti.toml.sample
etc/rc.d/arti
@dir /var/db/arti
@dir /var/log/arti
@dir /var/run/arti