Files
2d9a4e4e37ab2e7cedd169aeaa9918620b673281
devstack /unstack.sh

103 lines
2.3 KiB
Bash
Raw Normal View History

# **unstack.sh**
# mysql and rabbit are left running as OpenStack code refreshes
# do not require them to be restarted.
#
# Keep track of the current devstack directory.
TOP_DIR=$(cd $(dirname "0ドル") && pwd)
# Import common functions
source $TOP_DIR/functions
source $TOP_DIR/lib/database
source $TOP_DIR/stackrc
DATA_DIR=${DATA_DIR:-${DEST}/data}
# Get project function libraries
# ``os_RELEASE``, ``os_UPDATE``, ``os_PACKAGE``, ``os_CODENAME``
GetOSVersion
if [[ "1ドル" == "--all" ]]; then
UNSTACK_ALL=${UNSTACK_ALL:-1}
fi
source $TOP_DIR/openrc
SCREEN=$(which screen)
if [[ -n "$SCREEN" ]]; then
SESSION=$(screen -ls | awk '/[0-9].stack/ { print 1ドル }')
if [[ -n "$SESSION" ]]; then
screen -X -S $SESSION quit
fi
# Swift runs daemons
if is_service_enabled swift; then
# Apache has the WSGI processes
if is_service_enabled horizon; then
if is_service_enabled tls-proxy; then
killall stud
fi
if is_service_enabled baremetal && [[ "$BM_USE_FAKE_ENV" = "True" ]]; then
cleanup_fake_baremetal_env
fi
if [[ -n "$UNSTACK_ALL" ]]; then
# Stop MySQL server
if is_service_enabled mysql; then
stop_service mysql
fi
stop_service postgresql
fi
if is_service_enabled rabbit; then
stop_service rabbitmq-server
fi
stop_quantum
stop_quantum_third_party