Skip to content

Instantly share code, notes, and snippets.

@derms
Created March 13, 2019 15:40
Show Gist options
  • Save derms/384dcba5b0c3ac69144b32b6447fa0c5 to your computer and use it in GitHub Desktop.
Save derms/384dcba5b0c3ac69144b32b6447fa0c5 to your computer and use it in GitHub Desktop.
Test if ML server is already configred
echo "Testing if already configured"
ADMIN_STATUS_CODE=`curl -I http://localhost:8001/admin/v1/init 2>/dev/null | head -n 1 | cut -d$' ' -f2`
if [ "$ADMIN_STATUS_CODE" == "401" ]; then
echo "Server is already configured."
exit 0
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment