Append command to screenrc after we update it
If a group is specified we modify the command to run under "sg". This currently isn't reflected in screenrc so rejoining fails Change-Id: I5c18ba664a6ae9ba9aaa4439a9086bc85085cd75 Closes-Bug: #1444267
This commit is contained in:
parent
1235581559
commit
b28b27082c
@ -1235,9 +1235,6 @@ function screen_process {
|
|||||||
SERVICE_DIR=${SERVICE_DIR:-${DEST}/status}
|
SERVICE_DIR=${SERVICE_DIR:-${DEST}/status}
|
||||||
USE_SCREEN=$(trueorfalse True USE_SCREEN)
|
USE_SCREEN=$(trueorfalse True USE_SCREEN)
|
||||||
|
|
||||||
# Append the process to the screen rc file
|
|
||||||
screen_rc "$name" "$command"
|
|
||||||
|
|
||||||
screen -S $SCREEN_NAME -X screen -t $name
|
screen -S $SCREEN_NAME -X screen -t $name
|
||||||
|
|
||||||
local real_logfile="${LOGDIR}/${name}.log.${CURRENT_LOG_TIME}"
|
local real_logfile="${LOGDIR}/${name}.log.${CURRENT_LOG_TIME}"
|
||||||
@ -1277,6 +1274,10 @@ function screen_process {
|
|||||||
if [[ -n "$group" ]]; then
|
if [[ -n "$group" ]]; then
|
||||||
command="sg $group '$command'"
|
command="sg $group '$command'"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Append the process to the screen rc file
|
||||||
|
screen_rc "$name" "$command"
|
||||||
|
|
||||||
screen -S $SCREEN_NAME -p $name -X stuff "$command & echo \$! >$SERVICE_DIR/$SCREEN_NAME/${name}.pid; fg || echo \"$name failed to start\" | tee \"$SERVICE_DIR/$SCREEN_NAME/${name}.failure\"$NL"
|
screen -S $SCREEN_NAME -p $name -X stuff "$command & echo \$! >$SERVICE_DIR/$SCREEN_NAME/${name}.pid; fg || echo \"$name failed to start\" | tee \"$SERVICE_DIR/$SCREEN_NAME/${name}.failure\"$NL"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user