|
| 1 | +#!/bin/bash |
| 2 | +# NEON AI (TM) SOFTWARE, Software Development Kit & Application Development System |
| 3 | +# All trademark and other rights reserved by their respective owners |
| 4 | +# Copyright 2008-2025 Neongecko.com Inc. |
| 5 | +# BSD-3 |
| 6 | +# Redistribution and use in source and binary forms, with or without |
| 7 | +# modification, are permitted provided that the following conditions are met: |
| 8 | +# 1. Redistributions of source code must retain the above copyright notice, |
| 9 | +# this list of conditions and the following disclaimer. |
| 10 | +# 2. Redistributions in binary form must reproduce the above copyright notice, |
| 11 | +# this list of conditions and the following disclaimer in the documentation |
| 12 | +# and/or other materials provided with the distribution. |
| 13 | +# 3. Neither the name of the copyright holder nor the names of its |
| 14 | +# contributors may be used to endorse or promote products derived from this |
| 15 | +# software without specific prior written permission. |
| 16 | +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 17 | +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, |
| 18 | +# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 19 | +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR |
| 20 | +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
| 21 | +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 22 | +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, |
| 23 | +# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
| 24 | +# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
| 25 | +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| 26 | +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | + |
| 28 | +port=8000 |
| 29 | +# Perform the health check using curl |
| 30 | +resp_content=$(curl -s http://localhost:${port}/status) |
| 31 | +if [ "${resp_content}" == "Ready" ]; then |
| 32 | + exit 0 # Success |
| 33 | +else |
| 34 | + echo "Health check failed with response: ${resp_content}" >&2 |
| 35 | + exit 1 # Failure |
| 36 | +fi |
0 commit comments