Commit eaf6bd80 authored by Nolan's avatar Nolan

Unbuffered output for python daemons.

This way you can tail their log files...
parent 4aa5d8cb
......@@ -7,7 +7,7 @@ done
update-ca-certificates
if ! ps ax | grep -q "fake_vagrant_sshd[.]py"; then
python3 /usr/local/sbin/fake_vagrant_sshd.py &>/var/log/fake_vagrant_sshd.log &
python3 -u /usr/local/sbin/fake_vagrant_sshd.py &>/var/log/fake_vagrant_sshd.log &
fi
exit 0
......@@ -2,10 +2,6 @@
import socket, sys, threading
import paramiko
#Python doesn't switch to unbuffered if stdout/err are redirected?
import functools
print = functools.partial(print, flush=True)
class Server(paramiko.ServerInterface):
def check_channel_request(self, kind, chanid):
if kind == 'session':
......
......@@ -9,7 +9,7 @@ if [ -f /run/intercept.pid ]; then
kill -9 `cat /run/intercept.pid`
rm /run/intercept.pid
fi
python3 /usr/local/sbin/intercept.py --all-qtypes --tcp -u 10.0.2.3 \
python3 -u /usr/local/sbin/intercept.py --all-qtypes --tcp -u 10.0.2.3 \
-f '*.boundery.me:30.0.0.150' \
-f 'boundery.me.:30.0.1.9' -f 'www.boundery.me.:30.0.1.9' \
-i 'acme-v02.api.letsencrypt.org. 60 IN A 30.0.0.1' \
......
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