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