From 9908a277a0c0d25fa7a0a78b41243c87e8ff3f7c Mon Sep 17 00:00:00 2001 From: Mohammad Mahdi Baghbani Pourvahid Date: Wed, 6 Mar 2024 14:47:23 +0000 Subject: [PATCH] remove: -it flag is not needed for ss command --- dev/efss.sh | 4 ++-- dev/federatedgroups.sh | 4 ++-- dev/ocm-test-suite.sh | 4 ++-- dev/sciencemesh.sh | 4 ++-- dev/solid-nextcloud-app.sh | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dev/efss.sh b/dev/efss.sh index de7b217f..5f094e4f 100755 --- a/dev/efss.sh +++ b/dev/efss.sh @@ -21,12 +21,12 @@ export ENV_ROOT=${ENV_ROOT} function waitForPort () { echo waitForPort "${1} ${2}" # the "| cat" after the "| grep" is to prevent the command from exiting with 1 if no match is found by grep. - x=$(docker exec -it "${1}" ss -tulpn | grep -c "${2}" | cat) + x=$(docker exec "${1}" ss -tulpn | grep -c "${2}" | cat) until [ "${x}" -ne 0 ] do echo Waiting for "${1} to open port ${2}, this usually takes about 10 seconds ... ${x}" sleep 1 - x=$(docker exec -it "${1}" ss -tulpn | grep -c "${2}" | cat) + x=$(docker exec "${1}" ss -tulpn | grep -c "${2}" | cat) done echo "${1} port ${2} is open" } diff --git a/dev/federatedgroups.sh b/dev/federatedgroups.sh index ef6acb9f..dc0c8aa2 100755 --- a/dev/federatedgroups.sh +++ b/dev/federatedgroups.sh @@ -21,12 +21,12 @@ export ENV_ROOT=${ENV_ROOT} function waitForPort () { echo waitForPort "${1} ${2}" # the "| cat" after the "| grep" is to prevent the command from exiting with 1 if no match is found by grep. - x=$(docker exec -it "${1}" ss -tulpn | grep -c "${2}" | cat) + x=$(docker exec "${1}" ss -tulpn | grep -c "${2}" | cat) until [ "${x}" -ne 0 ] do echo Waiting for "${1} to open port ${2}, this usually takes about 10 seconds ... ${x}" sleep 1 - x=$(docker exec -it "${1}" ss -tulpn | grep -c "${2}" | cat) + x=$(docker exec "${1}" ss -tulpn | grep -c "${2}" | cat) done echo "${1} port ${2} is open" } diff --git a/dev/ocm-test-suite.sh b/dev/ocm-test-suite.sh index 6cc6ce9f..7e44a229 100755 --- a/dev/ocm-test-suite.sh +++ b/dev/ocm-test-suite.sh @@ -36,12 +36,12 @@ function redirect_to_null_cmd() { function waitForPort () { redirect_to_null_cmd echo waitForPort "${1} ${2}" # the "| cat" after the "| grep" is to prevent the command from exiting with 1 if no match is found by grep. - x=$(docker exec -it "${1}" ss -tulpn | grep -c "${2}" | cat) + x=$(docker exec "${1}" ss -tulpn | grep -c "${2}" | cat) until [ "${x}" -ne 0 ] do redirect_to_null_cmd echo Waiting for "${1} to open port ${2}, this usually takes about 10 seconds ... ${x}" sleep 1 - x=$(docker exec -it "${1}" ss -tulpn | grep -c "${2}" | cat) + x=$(docker exec "${1}" ss -tulpn | grep -c "${2}" | cat) done redirect_to_null_cmd echo "${1} port ${2} is open" } diff --git a/dev/sciencemesh.sh b/dev/sciencemesh.sh index 51286f11..2b7c1cb8 100755 --- a/dev/sciencemesh.sh +++ b/dev/sciencemesh.sh @@ -21,12 +21,12 @@ export ENV_ROOT=${ENV_ROOT} function waitForPort () { echo waitForPort "${1} ${2}" # the "| cat" after the "| grep" is to prevent the command from exiting with 1 if no match is found by grep. - x=$(docker exec -it "${1}" ss -tulpn | grep -c "${2}" | cat) + x=$(docker exec "${1}" ss -tulpn | grep -c "${2}" | cat) until [ "${x}" -ne 0 ] do echo Waiting for "${1} to open port ${2}, this usually takes about 10 seconds ... ${x}" sleep 1 - x=$(docker exec -it "${1}" ss -tulpn | grep -c "${2}" | cat) + x=$(docker exec "${1}" ss -tulpn | grep -c "${2}" | cat) done echo "${1} port ${2} is open" } diff --git a/dev/solid-nextcloud-app.sh b/dev/solid-nextcloud-app.sh index c92719e8..411d1773 100755 --- a/dev/solid-nextcloud-app.sh +++ b/dev/solid-nextcloud-app.sh @@ -21,12 +21,12 @@ export ENV_ROOT=${ENV_ROOT} function waitForPort () { echo waitForPort "${1} ${2}" # the "| cat" after the "| grep" is to prevent the command from exiting with 1 if no match is found by grep. - x=$(docker exec -it "${1}" ss -tulpn | grep -c "${2}" | cat) + x=$(docker exec "${1}" ss -tulpn | grep -c "${2}" | cat) until [ "${x}" -ne 0 ] do echo Waiting for "${1} to open port ${2}, this usually takes about 10 seconds ... ${x}" sleep 1 - x=$(docker exec -it "${1}" ss -tulpn | grep -c "${2}" | cat) + x=$(docker exec "${1}" ss -tulpn | grep -c "${2}" | cat) done echo "${1} port ${2} is open" }