Bug #17189
Tails Additional Software.OpenVPN Script.
Start date:
2019-10-25
Due date:
% Done:
50%
Starter:
Affected tool:
Deliverable for:
Description
Hello friends again, I worked with on my custom build of Tails, & i not get correct restart-tor after tun/tap is opened in OpenVPN script connection. How to check or test to tor_is_bootstrapped & so that Tor is a 100% guaranteed restart, while OpenVPN is hold this connection, into up-script security.
When I started OpenVPN connection,sometimes i get normal connect TOR via OpenVPN, sometimes i get this error:
<code class="text">
Job for tor@default.service canceled.
Fri Oct 25 09:09:50 2019 us=692671 WARNING: Failed running command (--up/--down): external program exited with error status: 1
Fri Oct 25 09:09:50 2019 us=692847 Exiting due to fatal error
</code>
And I get try to modify restart-tor script into usr/sbin/ Like That:
<code class="text">
#!/bin/sh
set -e
# Import try_for()
. /usr/local/lib/tails-shell-library/common.sh
# Import tor_bootstrap_progress()
. /usr/local/lib/tails-shell-library/tor.sh
# Import log()
. /usr/local/lib/tails-shell-library/log.sh
_LOG_TAG="$(basename $0)"
systemctl restart tor@default.service #Just try to restart Tor_Service_after_tun/tap_connection_is ready
while [ $(try_for 270 '[ "$(tor_bootstrap_progress)" -eq 100 ]') != true ];do sleep 1; done
sleep 10
if try_for 270 '[ "$(tor_bootstrap_progress)" -eq 100 ]'; then
log "Tor has successfully bootstrapped."
else
systemctl kill -f tor@default.service
systemctl try-restart -f tor@default.service
if try_for 270 '[ "$(tor_bootstrap_progress)" -eq 100 ]'; then
log "Tor has successfully bootstrapped."
else
log "Tor failed to bootstrap"
exit 1
fi
fi
</code>
But sometimes Tor is not has_bootstrapped 100% successfully in time.
My OpenVPN Script.
Files
Subtasks