@@ -1352,6 +1352,7 @@ function is_running {
13521352# If the command includes shell metachatacters (;<>*) it must be run using a shell
13531353# If an optional group is provided sg will be used to run the
13541354# command as that group.
1355+ # Uses globals ``USE_SCREEN``
13551356# run_process service "command-line" [group]
13561357function run_process {
13571358 local service=$1
@@ -1370,7 +1371,7 @@ function run_process {
13701371
13711372# Helper to launch a process in a named screen
13721373# Uses globals ``CURRENT_LOG_TIME``, ```LOGDIR``, ``SCREEN_LOGDIR``, `SCREEN_NAME``,
1373- # ``SERVICE_DIR``, ``USE_SCREEN``, `` SCREEN_IS_LOGGING``
1374+ # ``SERVICE_DIR``, ``SCREEN_IS_LOGGING``
13741375# screen_process name "command-line" [group]
13751376# Run a command in a shell in a screen window, if an optional group
13761377# is provided, use sg to set the group of the command.
@@ -1381,7 +1382,6 @@ function screen_process {
13811382
13821383 SCREEN_NAME=${SCREEN_NAME:- stack}
13831384 SERVICE_DIR=${SERVICE_DIR:- ${DEST} / status}
1384- USE_SCREEN=$( trueorfalse True USE_SCREEN)
13851385
13861386 screen -S $SCREEN_NAME -X screen -t $name
13871387
@@ -1465,14 +1465,13 @@ function screen_rc {
14651465# If a PID is available use it, kill the whole process group via TERM
14661466# If screen is being used kill the screen window; this will catch processes
14671467# that did not leave a PID behind
1468- # Uses globals ``SCREEN_NAME``, ``SERVICE_DIR``, ``USE_SCREEN``
1468+ # Uses globals ``SCREEN_NAME``, ``SERVICE_DIR``
14691469# screen_stop_service service
14701470function screen_stop_service {
14711471 local service=$1
14721472
14731473 SCREEN_NAME=${SCREEN_NAME:- stack}
14741474 SERVICE_DIR=${SERVICE_DIR:- ${DEST} / status}
1475- USE_SCREEN=$( trueorfalse True USE_SCREEN)
14761475
14771476 if is_service_enabled $service ; then
14781477 # Clean up the screen window
@@ -1490,7 +1489,6 @@ function stop_process {
14901489 local service=$1
14911490
14921491 SERVICE_DIR=${SERVICE_DIR:- ${DEST} / status}
1493- USE_SCREEN=$( trueorfalse True USE_SCREEN)
14941492
14951493 if is_service_enabled $service ; then
14961494 # Kill via pid if we have one available
@@ -1552,11 +1550,11 @@ function service_check {
15521550}
15531551
15541552# Tail a log file in a screen if USE_SCREEN is true.
1553+ # Uses globals ``USE_SCREEN``
15551554function tail_log {
15561555 local name=$1
15571556 local logfile=$2
15581557
1559- USE_SCREEN=$( trueorfalse True USE_SCREEN)
15601558 if [[ " $USE_SCREEN " = " True" ]]; then
15611559 screen_process " $name " " sudo tail -f $logfile "
15621560 fi
0 commit comments