-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathunsavi.sh
More file actions
executable file
·34 lines (28 loc) · 949 Bytes
/
unsavi.sh
File metadata and controls
executable file
·34 lines (28 loc) · 949 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env bash
#
# Stops that which is started by ``savi.sh`` (mostly)
# mysql and rabbit are left running as OpenStack code refreshes
# do not require them to be restarted.
#
# Stop all processes by setting UNSAVI_ALL or specifying ``--all``
# on the command line
# Keep track of the current devstack directory.
TOP_DIR=$(cd $(dirname "$0") && pwd)
# Import common functions
source $TOP_DIR/functions
# Load local configuration
source $TOP_DIR/savirc
# Determine what system we are running on. This provides ``os_VENDOR``,
# ``os_RELEASE``, ``os_UPDATE``, ``os_PACKAGE``, ``os_CODENAME``
GetOSVersion
if [[ "$1" == "--all" ]]; then
UNSAVI_ALL=${UNSAVI_ALL:-1}
fi
# Shut down devstack's screen to get the bulk of OpenStack services in one shot
SCREEN=$(which screen)
if [[ -n "$SCREEN" ]]; then
SESSION=$(screen -ls | awk '/[0-9].savi/ { print $1 }')
if [[ -n "$SESSION" ]]; then
screen -X -S $SESSION quit
fi
fi