From 63067cbb7aad02ece38079dceb3c0d681e6fe182 Mon Sep 17 00:00:00 2001 From: Kevin Baensch Date: Fri, 18 Nov 2022 12:21:33 +0100 Subject: [PATCH] myssh: Add warning for custom client script --- script/myssh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/script/myssh b/script/myssh index 562bdcb..d8b1c2b 100755 --- a/script/myssh +++ b/script/myssh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -if [ -z $SQL_CLI_TEMPLATE ] +if [ -z "$SQL_CLI_TEMPLATE" ] then if [ $(uname -s) = "Linux" ] then @@ -8,6 +8,13 @@ then else SQL_CLI_TEMPLATE='open \"mysql://$MYSQL_USERNAME:$MYSQL_PASSWORD@localhost:3306\" -a \"Sequel Ace\"' fi +else + echo -e "Warning, custom client string:\n$SQL_CLI_TEMPLATE" + read -r -p "Continue [Y/n] " CONTINUE + if [[ ! $CONTINUE =~ "^[Yy]" ]] + then + exit + fi fi [ -z $SQL_PROXY_HOST ] && SQL_PROXY_HOST="localhost"