mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[PR #4596] [MERGED] chore: improve health check script #4862
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#4862
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/4596
Author: @progprnv
Created: 12/6/2024
Status: ✅ Merged
Merged: 2/6/2025
Merged by: @jamesgeorge007
Base:
patch← Head:main📝 Commits (1)
2f1d297Improved code for Update healthcheck.sh📊 Changes
1 file changed (+6 additions, -7 deletions)
View changed files
📝
healthcheck.sh(+6 -7)📄 Description
What's changed
curlCheckfunction.curlCheck. Now, the main script decides whether to exit based on those returned statuses.Notes to reviewers
curlCheckfunction now usesreturn 1instead ofexit 1, allowing better control over script flow.Improved code:
curlCheck() {
if ! curl -s --head "$1" | head -n 1 | grep -q "HTTP/1.[01] [23].."; then
echo "URL request failed!"
return 1
else
echo "URL request succeeded!"
return 0
fi
}
if [ "$ENABLE_SUBPATH_BASED_ACCESS" = "true" ]; then
curlCheck "http://localhost:80/backend/ping" || exit 1
else
curlCheck "http://localhost:3000" || exit 1
curlCheck "http://localhost:3100" || exit 1
curlCheck "http://localhost:3170/ping" || exit 1
fi
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.