16 lines
392 B
Bash
16 lines
392 B
Bash
#!/bin/bash
|
|
|
|
# Ensure the environment variables are loaded
|
|
source /etc/environment
|
|
|
|
# Perform the health check by pinging the xbnet interface
|
|
# - If the xbnet0 interface is successfully created, we should be able to ping the assigned IP
|
|
ping -c 1 "$XBEE0_NET_SRC_IP" > /dev/null 2>&1
|
|
|
|
# Return the appropriate status based on ping success
|
|
if [ $? -eq 0 ]; then
|
|
exit 0
|
|
else
|
|
exit 1
|
|
fi
|