Commit 6280255f authored by anonym's avatar anonym
Browse files

Kill Vidalia before we restart Tor.

Otherwise Vidalia will be running and showing errors while we make
sure that Tor bootstraps, which could take a while.
parent f4844327
...@@ -18,6 +18,12 @@ clear_tor_log() { ...@@ -18,6 +18,12 @@ clear_tor_log() {
rm -f /var/log/tor/log rm -f /var/log/tor/log
} }
vidalia_was_running=no
if pgrep "\<vidalia\>" >/dev/null 2>&1; then
vidalia_was_running=yes
killall -SIGKILL vidalia
fi
clear_tor_log clear_tor_log
systemctl restart tor@default.service systemctl restart tor@default.service
...@@ -54,8 +60,7 @@ maybe_restart_tor() { ...@@ -54,8 +60,7 @@ maybe_restart_tor() {
try_for 270 maybe_restart_tor try_for 270 maybe_restart_tor
if pgrep "\<vidalia\>" >/dev/null; then if [ "${vidalia_was_running}" = yes ]; then
killall -SIGKILL vidalia
# Since Tor just restarted we wait for a while until the # Since Tor just restarted we wait for a while until the
# ControlPort hopefully is up. # ControlPort hopefully is up.
counter=0 counter=0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment