Commit 6b48301b authored by Becz Tamás's avatar Becz Tamás Committed by Brian May

move sdnotify after setting up firewall rules

parent be90cc8a
......@@ -8,7 +8,6 @@ import os
import sshuttle.ssnet as ssnet
import sshuttle.ssh as ssh
import sshuttle.ssyslog as ssyslog
import sshuttle.sdnotify as sdnotify
import sys
import platform
from sshuttle.ssnet import SockWrapper, Handler, Proxy, Mux, MuxWrapper
......@@ -533,9 +532,6 @@ def _main(tcp_listener, udp_listener, fw, ssh_cmd, remotename,
debug1('seed_hosts: %r\n' % seed_hosts)
mux.send(0, ssnet.CMD_HOST_REQ, str.encode('\n'.join(seed_hosts)))
sdnotify.send(sdnotify.ready(),
sdnotify.status('Connected to %s.' % remotename))
while 1:
rv = serverproc.poll()
if rv:
......
......@@ -7,6 +7,7 @@ import sys
import os
import platform
import traceback
import sshuttle.sdnotify as sdnotify
from sshuttle.helpers import debug1, debug2, Fatal
from sshuttle.methods import get_auto_method, get_method
......@@ -219,6 +220,8 @@ def main(method_name, syslog):
user)
stdout.write('STARTED\n')
sdnotify.send(sdnotify.ready(),
sdnotify.status('Connected'))
try:
stdout.flush()
......
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