Skip to content

Commit 3fc7985

Browse files
authored
Merge pull request #517 from StackStorm/fix/port
Search for complete port, not partial
2 parents ea7701f + 620e7e3 commit 3fc7985

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

scripts/includes/common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ function port_status() {
7474
#
7575
# Sample output:
7676
# 0.0.0.0:25000 7506/sshd
77-
ret=$(sudo netstat -tunlp --inet | awk -v port=:$1 '$4 ~ port && $6 ~ /LISTEN/ { print $4 " " $7 }' || echo 'Unbound');
77+
ret=$(sudo netstat -tunlp --inet | awk -v port=":$1$" '$4 ~ port && $6 ~ /LISTEN/ { print $4 " " $7 }' || echo 'Unbound');
7878
echo "$ret";
7979
}
8080

scripts/st2bootstrap-deb.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ function port_status() {
191191
#
192192
# Sample output:
193193
# 0.0.0.0:25000 7506/sshd
194-
ret=$(sudo netstat -tunlp --inet | awk -v port=:$1 '$4 ~ port && $6 ~ /LISTEN/ { print $4 " " $7 }' || echo 'Unbound');
194+
ret=$(sudo netstat -tunlp --inet | awk -v port=":$1$" '$4 ~ port && $6 ~ /LISTEN/ { print $4 " " $7 }' || echo 'Unbound');
195195
echo "$ret";
196196
}
197197

scripts/st2bootstrap-el6.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ function port_status() {
186186
#
187187
# Sample output:
188188
# 0.0.0.0:25000 7506/sshd
189-
ret=$(sudo netstat -tunlp --inet | awk -v port=:$1 '$4 ~ port && $6 ~ /LISTEN/ { print $4 " " $7 }' || echo 'Unbound');
189+
ret=$(sudo netstat -tunlp --inet | awk -v port=":$1$" '$4 ~ port && $6 ~ /LISTEN/ { print $4 " " $7 }' || echo 'Unbound');
190190
echo "$ret";
191191
}
192192

scripts/st2bootstrap-el7.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ function port_status() {
186186
#
187187
# Sample output:
188188
# 0.0.0.0:25000 7506/sshd
189-
ret=$(sudo netstat -tunlp --inet | awk -v port=:$1 '$4 ~ port && $6 ~ /LISTEN/ { print $4 " " $7 }' || echo 'Unbound');
189+
ret=$(sudo netstat -tunlp --inet | awk -v port=":$1$" '$4 ~ port && $6 ~ /LISTEN/ { print $4 " " $7 }' || echo 'Unbound');
190190
echo "$ret";
191191
}
192192

0 commit comments

Comments
 (0)