Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Aug 2014 16:48:15 +0200
From:      Zoran Kolic <zkolic@sbb.rs>
To:        freebsd-stable@freebsd.org
Subject:   Re: tor starting problem
Message-ID:  <20140804144815.GA954@faust.sbb.rs>
In-Reply-To: <mailman.41.1407153601.79068.freebsd-stable@freebsd.org>
References:  <mailman.41.1407153601.79068.freebsd-stable@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> Again, we need error messages.  Saying "it doesn't work" is not
> useful for troubleshooting.

No error message. No error. The boot process just misses tor sh file
in /usr/local/etc/rc.d.
Here is the script itself. Cannot say if it is correct or not.

#!/bin/sh
#
# $FreeBSD: security/tor/files/tor.in 324351 2013-08-07 12:54:37Z bf $
#
# PROVIDE: tor
# REQUIRE: NETWORKING SERVERS USR
# BEFORE: LOGIN
#
# Add the following lines to /etc/rc.conf to enable tor.
# All these options will overide any settings in your local torrc as
# they are command line options.
#
# tor_enable (bool):	Set it to "YES" to enable tor. Default: NO
# tor_conf (str):	Points to your torrc file.
#			Default: /usr/local/etc/tor/torrc
# tor_user (str):	Tor daemon user. Default: _tor
# tor_datadir (str):	Tor datadir.  Default: /var/db/tor
# tor_logfile (str):	Tor log file.  Default: /var/log/tor
# tor_loglevel (str):	Tor log severity level.  Default: notice
#

. /etc/rc.subr

name="tor"
rcvar=tor_enable

load_rc_config ${name}

: ${tor_enable="NO"}
: ${tor_conf="/usr/local/etc/tor/torrc"}
: ${tor_user="_tor"}
: ${tor_pidfile="/var/run/tor/tor.pid"}
: ${tor_logfile="/var/log/tor"}
: ${tor_loglevel="notice"}
: ${tor_datadir="/var/db/tor"}

required_files=${tor_conf}
required_dirs=${tor_datadir}
pidfile=${tor_pidfile}
command="/usr/local/bin/${name}"
command_args="-f ${tor_conf} --PidFile ${tor_pidfile} --RunAsDaemon 1 --DataDirectory ${tor_datadir} --+Log ${tor_loglevel}\ file\ ${tor_logfile}"
extra_commands="log"
log_cmd="${name}_log"

tor_log() {
	cat ${tor_logfile}
}

run_rc_command "$1"

Best regards

                                 Zoran




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140804144815.GA954>