File tree 1 file changed +2
-27
lines changed
backend/infra/srv/scripts
1 file changed +2
-27
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -e
3
3
4
- # Default values
5
- DEFAULT_HOST=" localhost"
6
- DEFAULT_PORT=" 8080"
7
- DEFAULT_SERVICE=" srv.service"
4
+ SERVICE_NAME=" srv.service"
8
5
9
6
# Function to check if service is running
10
7
check_service () {
@@ -20,32 +17,10 @@ check_service() {
20
17
return 0
21
18
}
22
19
23
- # Function to check web endpoint
24
- check_web () {
25
- local host=$1
26
- local port=$2
27
- local url=" http://${host} :${port} /"
28
-
29
- echo " Checking web endpoint at $url ..."
30
- if ! curl -s -f --connect-timeout 5 " $url " > /dev/null; then
31
- echo " ERROR: Web service is not responding at $url "
32
- return 1
33
- fi
34
- echo " Web endpoint at $url is accessible"
35
- return 0
36
- }
37
-
38
- # Main function
39
20
main () {
40
- local host=${1:- $DEFAULT_HOST }
41
- local port=${2:- $DEFAULT_PORT }
42
- local service=${3:- $DEFAULT_SERVICE }
43
-
44
- echo " Starting validation with host=$host , port=$port , service=$service "
21
+ local service=${3:- $SERVICE_NAME }
45
22
46
- # Run checks
47
23
check_service " $service " || exit 1
48
- # check_web "$host" "$port" || exit 1
49
24
50
25
echo " All validations passed successfully"
51
26
exit 0
You can’t perform that action at this time.
0 commit comments