put conatiner name to array in cleanup-containers
The brace in string variable will not be expanded in some case. Put conatiner name into array. Change-Id: I2fb16e7352bd579f207efce0fb9b2565a1e7236d Closes-Bug: #1502467
This commit is contained in:
parent
3a56ce1826
commit
1e86af763b
@ -6,7 +6,7 @@ if [[ $(pgrep qemu) ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
containers_to_kill="
|
||||
containers_to_kill=(
|
||||
glance_{api,registry,data} \
|
||||
haproxy \
|
||||
heat_{api{,_cfn},engine} \
|
||||
@ -22,12 +22,13 @@ containers_to_kill="
|
||||
openvswitch_{vswitchd,db} \
|
||||
rabbitmq{,_data} \
|
||||
rsyslog \
|
||||
swift_{account_{auditor,reaper,replicator,server},container_{auditor,expirer,replicator,server,updater},proxy_server,rsyncd}"
|
||||
swift_{account_{auditor,reaper,replicator,server},container_{auditor,expirer,replicator,server,updater},proxy_server,rsyncd}
|
||||
)
|
||||
|
||||
echo "Stopping containers..."
|
||||
(docker stop -t 2 ${containers_to_kill} 2>&1) > /dev/null
|
||||
(docker stop -t 2 ${containers_to_kill[@]} 2>&1) > /dev/null
|
||||
|
||||
echo "Removing containers..."
|
||||
(docker rm -v -f ${containers_to_kill} 2>&1) > /dev/null
|
||||
(docker rm -v -f ${containers_to_kill[@]} 2>&1) > /dev/null
|
||||
|
||||
echo "All cleaned up!"
|
||||
|
Loading…
Reference in New Issue
Block a user