git: cde75d64188c - main - security/tor: Allow to set additional flags from rc.conf
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 15 Jan 2025 17:14:44 UTC
The branch main has been updated by yuri:
URL: https://cgit.FreeBSD.org/ports/commit/?id=cde75d64188caadcb2cc7f16217085484f1fca57
commit cde75d64188caadcb2cc7f16217085484f1fca57
Author: Eygene Ryabinkin <rea@freebsd.org>
AuthorDate: 2025-01-15 15:41:04 +0000
Commit: Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2025-01-15 15:41:04 +0000
security/tor: Allow to set additional flags from rc.conf
tor_flags is added to tor's config.
---
security/tor/Makefile | 1 +
security/tor/files/tor.in | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/security/tor/Makefile b/security/tor/Makefile
index 36ac1a1b85cb..052e6a760d28 100644
--- a/security/tor/Makefile
+++ b/security/tor/Makefile
@@ -1,5 +1,6 @@
PORTNAME= tor
DISTVERSION= 0.4.8.13
+PORTREVISION= 1
CATEGORIES= security net
MASTER_SITES= TOR
diff --git a/security/tor/files/tor.in b/security/tor/files/tor.in
index 0e1c8f3cae02..9088d42842ae 100644
--- a/security/tor/files/tor.in
+++ b/security/tor/files/tor.in
@@ -12,6 +12,7 @@
# tor_instances (str): List of instances. Default: ""
# tor_conf (str): Points to your torrc file.
# Default: %%PREFIX%%/etc/tor/torrc
+# tor_flags (str): Additional flags. Common to all instances.
# tor_user (str): Tor daemon user. Default: %%USER%%
# tor_group (str): Tor group. Default: %%GROUP%%
# tor_pidfile (str): Tor pid file. Default: /var/run/tor/tor.pid
@@ -36,6 +37,7 @@ load_rc_config ${name}
: ${tor_enable="NO"}
: ${tor_instances=""}
: ${tor_conf="%%PREFIX%%/etc/tor/torrc"}
+: ${tor_flags=""}
: ${tor_user="%%USER%%"}
: ${tor_group="%%GROUP%%"}
: ${tor_pidfile="/var/run/tor/tor.pid"}
@@ -109,7 +111,7 @@ required_files=${tor_conf}
required_dirs=${tor_datadir}
pidfile=${tor_pidfile}
command="%%PREFIX%%/bin/${name}"
-command_args="-f ${tor_conf} --PidFile ${tor_pidfile} --RunAsDaemon 1 --DataDirectory ${tor_datadir}"
+command_args="-f ${tor_conf} --PidFile ${tor_pidfile} --RunAsDaemon 1 --DataDirectory ${tor_datadir} ${tor_flags}"
extra_commands="reload"
# clear user setting in conf file: it should be done through the command line