git: 5e3dc13a560f - main - security/arti: Daemonize port and add config file
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 06 Nov 2021 23:31:03 UTC
The branch main has been updated by cs: URL: https://cgit.FreeBSD.org/ports/commit/?id=5e3dc13a560fa10fadbeb6134b9fa843f5badaf9 commit 5e3dc13a560fa10fadbeb6134b9fa843f5badaf9 Author: Carlo Strub <cs@FreeBSD.org> AuthorDate: 2021-11-06 23:30:32 +0000 Commit: Carlo Strub <cs@FreeBSD.org> CommitDate: 2021-11-06 23:30:32 +0000 security/arti: Daemonize port and add config file --- security/arti/files/arti.in | 36 ++++++++++++++++++++++ .../patch-crates_arti_src_arti__defaults.toml | 11 +++++++ security/arti/pkg-plist | 6 ++++ 3 files changed, 53 insertions(+) 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