commit 48a7bc02896131e39d30fa65f02d5fceec64cfd9 Author: George Kadianakis desnacked@riseup.net Date: Tue Feb 24 12:22:48 2015 +0000
Use guardfraction.conf for CONSENSUS_SOURCE too.
Patch by weasel. --- guardfraction_cron.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/guardfraction_cron.sh b/guardfraction_cron.sh index cba8552..08e0d70 100755 --- a/guardfraction_cron.sh +++ b/guardfraction_cron.sh @@ -14,7 +14,7 @@ STATE_DIR="" # defaults to $GUARDFRACTION_SRC/var GUARDFRACTION_OUTPUT_FILE="" # defaults to :$STATE_DIR/guardfraction.output
WGET_PREFIX="" # one option might be "torify" -CONSENSUS_SOURCE="http://128.31.0.39:9131/tor/status-vote/current/consensus" +CONSENSUS_SOURCE=""
DAYS_WORTH=90
@@ -25,6 +25,12 @@ VERBOSE=${VERBOSE:-0}
##################################################################
+if [ -z "$CONSENSUS_SOURCE" ]; then + echo >&2 "No CONSENSUS_SOURCE set. Please set CONSENSUS_SOURCE in ~/.guardfraction.conf." + echo >&2 " e.g. CONSENSUS_SOURCE=http://128.31.0.39:9131/tor/status-vote/current/consensus" + exit 1 +fi + [ "$VERBOSE" -gt 1 ] && set -x
STATE_DIR="${STATE_DIR:-$GUARDFRACTION_SRC/var}"
tor-commits@lists.torproject.org