diff options
Diffstat (limited to 'scripts/dcaegen2-collectors-datafile/dfc-containers-clean.sh')
-rwxr-xr-x | scripts/dcaegen2-collectors-datafile/dfc-containers-clean.sh | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/scripts/dcaegen2-collectors-datafile/dfc-containers-clean.sh b/scripts/dcaegen2-collectors-datafile/dfc-containers-clean.sh index 03919343..0e7c34ea 100755 --- a/scripts/dcaegen2-collectors-datafile/dfc-containers-clean.sh +++ b/scripts/dcaegen2-collectors-datafile/dfc-containers-clean.sh @@ -1,11 +1,15 @@ #!/bin/bash - # Kill dfc and all simulator -docker kill dfc_app -docker kill dfc_dr-sim -docker kill dfc_dr-redir-sim -docker kill dfc_mr-sim -docker kill dfc_sftp-server -docker kill dfc_ftpes-server-vsftpd +running_containers=$(docker ps --filter name=dfc_ -q) + + +if [ -z "$running_containers" ] +then + echo "No container requires termination" +else + echo "Stopping and removing containers" + docker stop $running_containers + docker rm $running_containers +fi |