3 # $FreeBSD: ports/security/tor-devel/files/tor.in,v 1.1 2006/02/17 22:21:25 mnag Exp $
5 # (rc.subr written by Peter Thoenen for Net/FreeBSD)
7 # REQUIRE: NETWORKING SERVERS USR
10 # Add the following lines to /etc/rc.conf to enable tor
12 # tor_enable (bool): Set to "NO" by default
13 # Set it to "YES" to enable tor
14 # tor_conf (str): Points to your tor conf file
15 # Default: /usr/local/etc/tor/torrc
16 # tor_user (str): Tor Daemon user. Default _tor
17 # tor_groupr (str): Tor Daemon group. Default _tor
25 load_rc_config
${name}
28 : ${tor_conf="/usr/local/etc/tor/torrc"}
31 : ${tor_pidfile="/var/run/tor/tor.pid"}
32 : ${tor_logfile="/var/log/tor"}
33 : ${tor_datadir="/var/run/tor"}
35 required_files
=${tor_conf}
36 required_dirs
=${tor_datadir}
37 command="/usr/local/bin/${name}"
38 command_args
="-f ${tor_conf} --pidfile ${tor_pidfile} --runasdaemon 1 --datadirectory ${tor_datadir} --user ${tor_user} --group ${tor_group}"