mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-01-19 12:28:28 +01:00
move sdnotify after setting up firewall rules
This commit is contained in:
parent
be90cc8abd
commit
6b48301b86
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user