From f06455e1b55b5419b6546a0d85ebfa734bf3c6b4 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Fri, 7 Oct 2016 06:57:03 -0400 Subject: [PATCH] Add a screen session for tls logs When tls is enabled, we aren't bringing the logs to the forefront, which makes it hard to debug when things go wrong. This does that. Change-Id: I7c6c7e324e16da6b9bfa44f4bad17401ca4ed7e3 --- lib/tls | 7 +++++++ stack.sh | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/lib/tls b/lib/tls index 6697dc875e..40f3e81438 100644 --- a/lib/tls +++ b/lib/tls @@ -495,6 +495,13 @@ EOF reload_apache_server } +# Follow TLS proxy +function follow_tls_proxy { + sudo touch /var/log/$APACHE_NAME/tls-proxy_error.log + tail_log tls-error /var/log/$APACHE_NAME/tls-proxy_error.log + sudo touch /var/log/$APACHE_NAME/tls-proxy_access.log + tail_log tls-proxy /var/log/$APACHE_NAME/tls-proxy_access.log +} # Cleanup Functions # ================= diff --git a/stack.sh b/stack.sh index 9aa770f2b9..5170d1b8a4 100755 --- a/stack.sh +++ b/stack.sh @@ -993,6 +993,10 @@ if [[ "$USE_SCREEN" == "True" ]]; then fi screen -r $SCREEN_NAME -X hardstatus alwayslastline "$SCREEN_HARDSTATUS" screen -r $SCREEN_NAME -X setenv PROMPT_COMMAND /bin/true + + if is_service_enabled tls-proxy; then + follow_tls_proxy + fi fi # Clear ``screenrc`` file