Files
home-assistant-addons/vhclient/rootfs/etc/s6-overlay/scripts/vhclient-connected
Hans Karlinius 3822e8e9f2 test
2024-12-03 11:37:17 +01:00

11 lines
325 B
Plaintext
Executable File

#!/usr/bin/with-contenv bashio
bashio::log.info "Waiting a bit for vhclient ..."
sleep 5s
server_connection=$(/usr/bin/vhclient -t "GET CLIENT STATE" | awk '/<connection/{print}')
bashio::log.info "Server: ${server_connection}"
if [ -z $server_connection]; then
bashio::log.error "Failed to connect to server"
exit 1
fi