Skip to content

Commit eeaf266

Browse files
author
Dean Troyer
committed
Skip screen if not present
Change-Id: I018249c415fa91ca6461a8f9d236767aa57a8fbd
1 parent 20cfd67 commit eeaf266

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)