Skip to content

Commit

Permalink
remove: -it flag is not needed for ss command
Browse files Browse the repository at this point in the history
  • Loading branch information
MahdiBaghbani committed Mar 6, 2024
1 parent b5c0422 commit 9908a27
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions dev/efss.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
4 changes: 2 additions & 2 deletions dev/federatedgroups.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
4 changes: 2 additions & 2 deletions dev/ocm-test-suite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
4 changes: 2 additions & 2 deletions dev/sciencemesh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
4 changes: 2 additions & 2 deletions dev/solid-nextcloud-app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down

0 comments on commit 9908a27

Please sign in to comment.