diff --git a/security/arti/files/arti.in b/security/arti/files/arti.in new file mode 100644 index 000000000000..cc9c0cbd4e12 --- /dev/null +++ b/security/arti/files/arti.in @@ -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" diff --git a/security/arti/files/patch-crates_arti_src_arti__defaults.toml b/security/arti/files/patch-crates_arti_src_arti__defaults.toml new file mode 100644 index 000000000000..29a9e1a5b8c4 --- /dev/null +++ b/security/arti/files/patch-crates_arti_src_arti__defaults.toml @@ -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 diff --git a/security/arti/pkg-plist b/security/arti/pkg-plist new file mode 100644 index 000000000000..4b60435fac87 --- /dev/null +++ b/security/arti/pkg-plist @@ -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