Browse code

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

Sean Dague authored on 2016/10/07 19:57:03
Showing 2 changed files
... ...
@@ -495,6 +495,13 @@ EOF
495 495
     reload_apache_server
496 496
 }
497 497
 
498
+# Follow TLS proxy
499
+function follow_tls_proxy {
500
+    sudo touch /var/log/$APACHE_NAME/tls-proxy_error.log
501
+    tail_log tls-error /var/log/$APACHE_NAME/tls-proxy_error.log
502
+    sudo touch /var/log/$APACHE_NAME/tls-proxy_access.log
503
+    tail_log tls-proxy /var/log/$APACHE_NAME/tls-proxy_access.log
504
+}
498 505
 
499 506
 # Cleanup Functions
500 507
 # =================
... ...
@@ -993,6 +993,10 @@ if [[ "$USE_SCREEN" == "True" ]]; then
993 993
     fi
994 994
     screen -r $SCREEN_NAME -X hardstatus alwayslastline "$SCREEN_HARDSTATUS"
995 995
     screen -r $SCREEN_NAME -X setenv PROMPT_COMMAND /bin/true
996
+
997
+    if is_service_enabled tls-proxy; then
998
+        follow_tls_proxy
999
+    fi
996 1000
 fi
997 1001
 
998 1002
 # Clear ``screenrc`` file