From bf36e8e4cf89a9de75746ce3e2ae1c98c3948993 Mon Sep 17 00:00:00 2001 From: Darragh O'Reilly Date: Mon, 9 Dec 2013 13:16:16 +0000 Subject: [PATCH] Make rejoin-stack.sh resume file logging if enabled This patch ensures that screen will resume logging to files after rejoin-stack.sh when SCREEN_LOGDIR is set. Change-Id: I4c3eae0df7755b700dd8acf4bf14b7e383372ca3 Closes-bug: 1192568 --- functions | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/functions b/functions index 5ff4a9b7ca..5fa265bd7d 100644 --- a/functions +++ b/functions @@ -1156,6 +1156,11 @@ function screen_rc { NL=`echo -ne '\015'` echo "screen -t $1 bash" >> $SCREENRC echo "stuff \"$2$NL\"" >> $SCREENRC + + if [[ -n ${SCREEN_LOGDIR} ]]; then + echo "logfile ${SCREEN_LOGDIR}/screen-${1}.${CURRENT_LOG_TIME}.log" >>$SCREENRC + echo "log on" >>$SCREENRC + fi fi }