Update comments to reflect current USE_SCREEN usage
In a couple of places the tracking of USE_SCREEN has drifted from the comments. Correct that. Change-Id: I63bdd5ca4de49bf653f5bc8f8e0e5efe67ef605c
This commit is contained in:
@@ -1352,6 +1352,7 @@ function is_running {
|
||||
# If the command includes shell metachatacters (;<>*) it must be run using a shell
|
||||
# If an optional group is provided sg will be used to run the
|
||||
# command as that group.
|
||||
# Uses globals ``USE_SCREEN``
|
||||
# run_process service "command-line" [group]
|
||||
function run_process {
|
||||
local service=$1
|
||||
@@ -1370,7 +1371,7 @@ function run_process {
|
||||
|
||||
# Helper to launch a process in a named screen
|
||||
# Uses globals ``CURRENT_LOG_TIME``, ```LOGDIR``, ``SCREEN_LOGDIR``, `SCREEN_NAME``,
|
||||
# ``SERVICE_DIR``, ``USE_SCREEN``, ``SCREEN_IS_LOGGING``
|
||||
# ``SERVICE_DIR``, ``SCREEN_IS_LOGGING``
|
||||
# screen_process name "command-line" [group]
|
||||
# Run a command in a shell in a screen window, if an optional group
|
||||
# is provided, use sg to set the group of the command.
|
||||
@@ -1381,7 +1382,6 @@ function screen_process {
|
||||
|
||||
SCREEN_NAME=${SCREEN_NAME:-stack}
|
||||
SERVICE_DIR=${SERVICE_DIR:-${DEST}/status}
|
||||
USE_SCREEN=$(trueorfalse True USE_SCREEN)
|
||||
|
||||
screen -S $SCREEN_NAME -X screen -t $name
|
||||
|
||||
@@ -1465,14 +1465,13 @@ function screen_rc {
|
||||
# If a PID is available use it, kill the whole process group via TERM
|
||||
# If screen is being used kill the screen window; this will catch processes
|
||||
# that did not leave a PID behind
|
||||
# Uses globals ``SCREEN_NAME``, ``SERVICE_DIR``, ``USE_SCREEN``
|
||||
# Uses globals ``SCREEN_NAME``, ``SERVICE_DIR``
|
||||
# screen_stop_service service
|
||||
function screen_stop_service {
|
||||
local service=$1
|
||||
|
||||
SCREEN_NAME=${SCREEN_NAME:-stack}
|
||||
SERVICE_DIR=${SERVICE_DIR:-${DEST}/status}
|
||||
USE_SCREEN=$(trueorfalse True USE_SCREEN)
|
||||
|
||||
if is_service_enabled $service; then
|
||||
# Clean up the screen window
|
||||
@@ -1490,7 +1489,6 @@ function stop_process {
|
||||
local service=$1
|
||||
|
||||
SERVICE_DIR=${SERVICE_DIR:-${DEST}/status}
|
||||
USE_SCREEN=$(trueorfalse True USE_SCREEN)
|
||||
|
||||
if is_service_enabled $service; then
|
||||
# Kill via pid if we have one available
|
||||
@@ -1552,11 +1550,11 @@ function service_check {
|
||||
}
|
||||
|
||||
# Tail a log file in a screen if USE_SCREEN is true.
|
||||
# Uses globals ``USE_SCREEN``
|
||||
function tail_log {
|
||||
local name=$1
|
||||
local logfile=$2
|
||||
|
||||
USE_SCREEN=$(trueorfalse True USE_SCREEN)
|
||||
if [[ "$USE_SCREEN" = "True" ]]; then
|
||||
screen_process "$name" "sudo tail -f $logfile"
|
||||
fi
|
||||
|
||||
2
stackrc
2
stackrc
@@ -101,7 +101,7 @@ HORIZON_APACHE_ROOT="/dashboard"
|
||||
# ctrl-c, up-arrow, enter to restart the service. Starting services
|
||||
# this way is slightly unreliable, and a bit slower, so this can
|
||||
# be disabled for automated testing by setting this value to False.
|
||||
USE_SCREEN=True
|
||||
USE_SCREEN=$(trueorfalse True USE_SCREEN)
|
||||
|
||||
# When using screen, should we keep a log file on disk? You might
|
||||
# want this False if you have a long-running setup where verbose logs
|
||||
|
||||
Reference in New Issue
Block a user