mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-08-11 08:40:59 +02:00
daemonization: make sure the firewall subproc sends to syslog too.
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import re, errno
|
||||
import compat.ssubprocess as ssubprocess
|
||||
import helpers
|
||||
import helpers, ssyslog
|
||||
from helpers import *
|
||||
|
||||
|
||||
@ -216,7 +216,7 @@ def restore_etc_hosts(port):
|
||||
# exit. In case that fails, it's not the end of the world; future runs will
|
||||
# supercede it in the transproxy list, at least, so the leftover rules
|
||||
# are hopefully harmless.
|
||||
def main(port):
|
||||
def main(port, syslog):
|
||||
assert(port > 0)
|
||||
assert(port <= 65535)
|
||||
|
||||
@ -235,6 +235,10 @@ def main(port):
|
||||
# can read from it.
|
||||
os.dup2(1, 0)
|
||||
|
||||
if syslog:
|
||||
ssyslog.start_syslog()
|
||||
ssyslog.stderr_to_syslog()
|
||||
|
||||
debug1('firewall manager ready.\n')
|
||||
sys.stdout.write('READY\n')
|
||||
sys.stdout.flush()
|
||||
|
Reference in New Issue
Block a user