diff options
author | rjharmon <42002+rjharmon@users.noreply.github.com> | 2020-03-22 09:47:32 -0700 |
---|---|---|
committer | Brian May <brian@linuxpenguins.xyz> | 2020-03-24 16:15:41 +1100 |
commit | 9b10df21b69160cdac769b74d2c9f44b6571c459 (patch) | |
tree | 0d994751b29b5d9a0b75a2d5751778e46668e9dd | |
parent | accb4ecc977a3a65d32ad4fb97c19f4d17be9177 (diff) |
Arrange systemd notification to clarify the meaning
* this spot in the lifecycle is precisely when we know that the
remote server is running AND that the local firewall-control
daemon is started.
-rw-r--r-- | sshuttle/client.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sshuttle/client.py b/sshuttle/client.py index 5e4009e..1f930ae 100644 --- a/sshuttle/client.py +++ b/sshuttle/client.py @@ -518,11 +518,14 @@ def _main(tcp_listener, udp_listener, fw, ssh_cmd, remotename, # set --auto-nets, we might as well wait for the message first, then # ignore its contents. mux.got_routes = None - fw.start() - sdnotify.send(sdnotify.ready(), sdnotify.status('Connected')) + serverready() mux.got_routes = onroutes + def serverready(): + fw.start() + sdnotify.send(sdnotify.ready(), sdnotify.status('Connected')) + def onhostlist(hostlist): debug2('got host list: %r\n' % hostlist) for line in hostlist.strip().split(): |