Skip to content

Commit

Permalink
usr/lib/anon-shared-helper-scripts/te_pe_tb_check: not only check if …
Browse files Browse the repository at this point in the history
…Tor bootstrap reached 100%, but also if a Tor circuit has actually been established
  • Loading branch information
Patrick Schleizer committed Oct 8, 2015
1 parent 08c0000 commit 18807e4
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion usr/lib/anon-shared-helper-scripts/te_pe_tb_check
Expand Up @@ -129,7 +129,18 @@ $FUNCNAME: This is neither a gateway nor a workstation. Please report this bug!"
fi

if [ "$tor_bootstrap_percent" = "100" ]; then
## Ok.
true "Ok."
else
## Echo message, so sdwdate can integrate it into its log.
echo "$MSG"

## Exit 2, so sdwdate will wait until this has been fixed.
exit "2"
fi

local MSG="Tor circuit $tor_circuit_established_word. $tor_bootstrap_percent % done. Tor reports: $tor_bootstrap_status"

if [ "$tor_circuit_established" = "1" ]; then
## Exit 0, so sdwdate will continue.
exit "0"
else
Expand Down

0 comments on commit 18807e4

Please sign in to comment.