You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by wi...@apache.org on 2020/08/25 08:59:05 UTC
[incubator-streampipes-installer] branch dev updated:
[STREAMPIPES-196] add warning to down --volumes, some minors
This is an automated email from the ASF dual-hosted git repository.
wiener pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes-installer.git
The following commit(s) were added to refs/heads/dev by this push:
new ac041d9 [STREAMPIPES-196] add warning to down --volumes, some minors
ac041d9 is described below
commit ac041d9db88a6b46ed4b99e1836b9fb380474369
Author: Patrick Wiener <wi...@fzi.de>
AuthorDate: Tue Aug 25 10:58:52 2020 +0200
[STREAMPIPES-196] add warning to down --volumes, some minors
---
cli/bin/commands/clean | 4 ++--
cli/bin/commands/down | 24 +++++++++++++++++++++---
2 files changed, 23 insertions(+), 5 deletions(-)
diff --git a/cli/bin/commands/clean b/cli/bin/commands/clean
index 63b58e9..ac7978c 100755
--- a/cli/bin/commands/clean
+++ b/cli/bin/commands/clean
@@ -78,7 +78,7 @@ continue_check(){
if [ "$clean_volumes" = true ]; then
cat << EOF
- $(warning "This will remove:")
+$(warning "This will remove:")
- StreamPipes docker network
- all unused StreamPipes data volumes
- all dangling StreamPipes images
@@ -86,7 +86,7 @@ continue_check(){
EOF
else
cat << EOF
- $(warning "This will remove:")
+$(warning "This will remove:")
- StreamPipes docker network
- all dangling StreamPipes images
diff --git a/cli/bin/commands/down b/cli/bin/commands/down
index f4f4474..0121ced 100755
--- a/cli/bin/commands/down
+++ b/cli/bin/commands/down
@@ -45,15 +45,33 @@ while [[ "$#" -gt 0 ]]; do
esac
done
+continue_check(){
+ cat << EOF
+$(warning "This option will remove:")
+ - all StreamPipes data volumes
+
+EOF
+
+ read -p "Are you sure you want to continue? [y/N]: " input
+
+ if [[ "$input" != "y" && "$input" != "Y" && "$input" != "yes" && "$input" != "Yes" && "$input" != "YES" ]]; then
+ exit 1
+ fi
+}
+
if is_streampipes_running; then
- get_curr_environment
- concatenate_compose_files
- info "Stop environment: $curr_environment"
if [ "$clean_volumes" = true ]; then
+ continue_check
+ get_curr_environment
+ concatenate_compose_files
+ info "Stop environment: $curr_environment"
info "Removing StreamPipes containers and named volumes"
run "$docker_compose_files down -v"
else
+ get_curr_environment
+ concatenate_compose_files
+ info "Stop environment: $curr_environment"
info "Removing StreamPipes containers"
run "$docker_compose_files down"
fi