Skip to content

Commit 2c15be3

Browse files
committed
Merge pull request #94 from github/improve-ghe-host-check
Allow ghe-host-check to be run from within the bin directory
2 parents d2dfff6 + a148b23 commit 2c15be3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/ghe-host-check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ if [ $rc -ne 0 ]; then
3838
case $rc in
3939
255)
4040
if echo "$output" | grep -i "port 22: connection refused" >/dev/null; then
41-
exec "$0" "$hostname:122"
41+
exec "bin/$(basename $0)" "$hostname:122"
4242
fi
4343

4444
echo "$output" 1>&2
@@ -51,7 +51,7 @@ if [ $rc -ne 0 ]; then
5151
;;
5252
1)
5353
if [ "${port:-22}" -eq 22 ] && echo "$output" | grep "use port 122" >/dev/null; then
54-
exec "$0" "$hostname:122"
54+
exec "bin/$(basename $0)" "$hostname:122"
5555
else
5656
echo "$output" 1>&2
5757
fi

0 commit comments

Comments
 (0)