mirror of
https://github.com/aliasvault/aliasvault.git
synced 2026-05-19 05:47:43 -04:00
Change curl to nc to check tcp port (#111)
This commit is contained in:
15
.github/workflows/docker-compose-build.yml
vendored
15
.github/workflows/docker-compose-build.yml
vendored
@@ -50,11 +50,10 @@ jobs:
|
||||
fi
|
||||
- name: Test if localhost:2525 (SmtpService) responds
|
||||
run: |
|
||||
# Test if the service on localhost:2525 responds
|
||||
response=$(curl -s --connect-timeout 5 localhost:2525)
|
||||
if [ -z "$response" ]; then
|
||||
echo "SmtpService did not respond on port 2525. Check if the SmtpService service is running."
|
||||
exit 1
|
||||
else
|
||||
echo "SmtpService responded on port 2525"
|
||||
fi
|
||||
# Test if the service on localhost:2525 responds
|
||||
if nc -zv localhost 2525 2>&1 | grep -q 'succeeded'; then
|
||||
echo "SmtpService did not respond on port 2525. Check if the SmtpService service is running."
|
||||
exit 1
|
||||
else
|
||||
echo "SmtpService responded on port 2525"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user