Files
415360b23157caac28899fe0e02f47f0e4532ca2
devstack /unstack.sh

119 lines
2.5 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}
source $TOP_DIR/lib/apache
# ``os_RELEASE``, ``os_UPDATE``, ``os_PACKAGE``, ``os_CODENAME``
GetOSVersion
if [[ "1ドル" == "--all" ]]; then
UNSTACK_ALL=${UNSTACK_ALL:-1}
fi
# ==========
if [[ -d $TOP_DIR/extras.d ]]; then
for i in $TOP_DIR/extras.d/*.sh; do
[[ -r $i ]] && source $i unstack
done
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
# 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_neutron
stop_neutron_third_party
cleanup_neutron
cleanup_tmp