Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
firecat53 committed Sep 28, 2014
1 parent faf9a92 commit 588945f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions transmission/pia_transmission_monitor
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def port_check(conf):
return False


def service_start_stop(name, status):
def service_start_stop(name, status, conf):
"""Stop or start a command
Args: name - the full command string to run
Expand Down Expand Up @@ -164,18 +164,18 @@ def restart_vpn(conf):
after openvpn restarts.
"""
service_start_stop(conf.transmission_command, "stop")
service_start_stop(conf.transmission_command, "stop", conf)
sleep(5)
control = False
while control is False:
# Continue restarting openvpn until we have a good IP address
service_start_stop(conf.openvpn_command, "stop")
service_start_stop(conf.openvpn_command, "stop", conf)
sleep(5)
service_start_stop(conf.openvpn_command, "start")
service_start_stop(conf.openvpn_command, "start", conf)
sleep(10)
control = bind_addr_update(conf)
if control is True:
service_start_stop(conf.transmission_command, "start")
service_start_stop(conf.transmission_command, "start", conf)
sleep(5)


Expand Down

0 comments on commit 588945f

Please sign in to comment.