Skip to content

Commit 94e6160

Browse files
Add check to ensure port 80 not in use in bootstrap script
1 parent c8999f8 commit 94e6160

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

letsencrypt-auto

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@ else
1919
SUDO=
2020
fi
2121

22-
for arg in "$@" ; do
22+
if timeout 1 sh -c 'cat < /dev/null > /dev/tcp/127.0.0.1/80' >/dev/null 2>&1 ; then
23+
echo "Looks like port 80 is already taken. This might interfere with letsencrypt's setup"
24+
echo "Please stop any servers that you might be running on port 80 before resuming this setup"
25+
exit
26+
fi
27+
28+
for arg in "$@" ; do
2329
# This first clause is redundant with the third, but hedging on portability
2430
if [ "$arg" = "-v" ] || [ "$arg" = "--verbose" ] || echo "$arg" | grep -E -- "-v+$" ; then
2531
VERBOSE=1

0 commit comments

Comments
 (0)