Skip to content

Commit 0317583

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Skip screen if not present"
2 parents 0c48554 + eeaf266 commit 0317583

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

unstack.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@ if [[ "$1" == "--all" ]]; then
2525
fi
2626

2727
# Shut down devstack's screen to get the bulk of OpenStack services in one shot
28-
SESSION=$(screen -ls | grep "[0-9].stack" | awk '{ print $1 }')
29-
if [[ -n "$SESSION" ]]; then
30-
screen -X -S $SESSION quit
28+
SCREEN=$(which screen)
29+
if [[ -n "$SCREEN" ]]; then
30+
SESSION=$(screen -ls | awk '/[0-9].stack/ { print $1 }')
31+
if [[ -n "$SESSION" ]]; then
32+
screen -X -S $SESSION quit
33+
fi
3134
fi
3235

3336
# Swift runs daemons

0 commit comments

Comments
 (0)