diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-16 22:54:09 +0300 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-16 22:54:09 +0300 |
commit | de55f6afbf1eb4bf858ff61e07c6fa475269bea1 (patch) | |
tree | 75c9f1da6613a9d233ae21942068f4b12d03488f | |
parent | fed3994cdbcbd58852f82ced1cf5f0d34eed83d5 (diff) |
Fix error in stop script
-rwxr-xr-x | tests/objectstore/stop-swift-ceph.sh | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/tests/objectstore/stop-swift-ceph.sh b/tests/objectstore/stop-swift-ceph.sh index fcf5fdfdcd7..400db8925e9 100755 --- a/tests/objectstore/stop-swift-ceph.sh +++ b/tests/objectstore/stop-swift-ceph.sh @@ -23,16 +23,18 @@ if [ -z "$thisFolder" ]; then thisFolder="." fi; -# stopping and removing docker containers -for container in `cat $thisFolder/dockerContainerCeph.$EXECUTOR_NUMBER.swift`; do - if [ -n "$DEBUG" ]; then - docker logs $container - fi - echo "Stopping and removing docker container $container" - # kills running container and removes it - docker rm -f $container -done; +if [ -e $thisFolder/dockerContainerCeph.$EXECUTOR_NUMBER.swift ]; then + # stopping and removing docker containers + for container in `cat $thisFolder/dockerContainerCeph.$EXECUTOR_NUMBER.swift`; do + if [ -n "$DEBUG" ]; then + docker logs $container + fi + echo "Stopping and removing docker container $container" + # kills running container and removes it + docker rm -f $container + done; +fi; # cleanup -rm $thisFolder/swift.config.php -rm $thisFolder/dockerContainerCeph.$EXECUTOR_NUMBER.swift
\ No newline at end of file +rm -rf $thisFolder/swift.config.php +rm -rf $thisFolder/dockerContainerCeph.$EXECUTOR_NUMBER.swift |