diff options
Diffstat (limited to 'services')
-rw-r--r-- | services/Makefile | 1 | ||||
-rwxr-xr-x | services/test-server.py | 8 |
2 files changed, 6 insertions, 3 deletions
diff --git a/services/Makefile b/services/Makefile index 61e0f529..37931f47 100644 --- a/services/Makefile +++ b/services/Makefile @@ -1,5 +1,6 @@ help:;@cat Makefile export authorized_keys_file := authorized_keys +export debug_log := true export services_file := services.txt export host_key_file := test.key export services_home := /opt/services diff --git a/services/test-server.py b/services/test-server.py index ce8fbaa4..7838e0af 100755 --- a/services/test-server.py +++ b/services/test-server.py @@ -3,6 +3,7 @@ from os import environ as env authorized_keys_file = env.get('authorized_keys_file', '/dev/null') +debug_log = env.get('debug_log', 'false') services_file = env.get('services_file', '/dev/null') host_key_file = env.get('host_key_file', '/dev/null') host_key_pub_file = host_key_file + '.pub' @@ -22,9 +23,10 @@ from twisted.internet.reactor import listenTCP, run from twisted.python.components import registerAdapter from zope.interface import implements -from twisted.python.log import startLogging -from sys import stderr -startLogging(stderr) +if debug_log == 'true': + from twisted.python.log import startLogging + from sys import stderr + startLogging(stderr) class MyRealm: |