The supported arguments are the credentials (admin:admin) and the url to the server root (http://localhost:4502). You should see a nice pink status line with the information on how many bundles are active, resolved and installed as well as an error code of zero if the server is up and a -1 if the server is still starting up.
curl -s -u $1 $2/system/console > /dev/null
if [ $? != 0 ]; then
echo admin console on $2 not running
exit -1
fi
. ./ticktick.sh
DATA=`curl -s -u $1 $2/system/console/bundles/.json`
tickParse "$DATA"
#echo ``status``
#echo current status total bundles: ``s[0]``, installed bundles: ``s[1]``, installed fragments ``s[2]``, bundles resolved ``s[3]``, bundles installed ``s[4]``
if [ ``s[4]`` = 0 ]; then
echo ``status``: server fully up
exit 0
else
echo -e "33[2A33[35m"
echo -n ``status``: server still activating bundles
echo -e "33[K33[0m"
exit -1
fi
No comments:
Post a Comment
If you have any doubts or questions, please let us know.