devstack/rejoin-stack.sh
Jiajun Liu 8e58c0736f make rejoin-stack.sh keep the same service tags
Currently rejoin-stack.sh can not keep the same screen service tags
as the first you deploy openstack due to that the stack-screenrc lack
proper command to configure screen's hardstatus. just delete the old
stack-screenrc so that function screen_rc can write proper initialize
command into stack-screenrc.

fix bug 1182597

Change-Id: I4cb4c6ded93a5c7b0bd39d65a754ddf86553463d
2013-07-17 06:41:50 +00:00

25 lines
638 B
Bash
Executable File

#! /usr/bin/env bash
# This script rejoins an existing screen, or re-creates a
# screen session from a previous run of stack.sh.
TOP_DIR=`dirname $0`
# Import common functions in case the localrc (loaded via stackrc)
# uses them.
source $TOP_DIR/functions
source $TOP_DIR/stackrc
# if screenrc exists, run screen
if [[ -e $TOP_DIR/stack-screenrc ]]; then
if screen -ls | egrep -q "[0-9].stack"; then
echo "Attaching to already started screen session.."
exec screen -r stack
fi
exec screen -c $TOP_DIR/stack-screenrc
fi
echo "Couldn't find $TOP_DIR/stack-screenrc file; have you run stack.sh yet?"
exit 1