Update the tomcat tutorial

34 views
Skip to first unread message

manager...@googlemail.com

unread,
Sep 17, 2013, 4:01:47 AM9/17/13
to kwa...@googlegroups.com
i modified the curl commands for start, stop and status

start
DEPLOY_STATE=`curl --silent --basic --user %{TOMCAT_USER}:%{TOMCAT_PASSWORD} http://%{kwatee_server_name}:8080/manager/text/start?path=/mdk`; if [[ "$DEPLOY_STATE" == OK* ]]; then echo "[kwatee_running]" ; else echo "[kwatee_error]" ; fi;

stop
DEPLOY_STATE=`curl --silent --basic --user %{TOMCAT_USER}:%{TOMCAT_PASSWORD} http://%{kwatee_server_name}:8080/manager/text/stop?path=/mdk`; if [[ "$DEPLOY_STATE" == OK* ]]; then echo "[kwatee_stopped]" ; else echo "[kwatee_error]" ; fi;

status
DEPLOY_STATE=`curl --silent --basic --user %{TOMCAT_USER}:%{TOMCAT_PASSWORD} http://%{kwatee_server_name}:8080/manager/text/list?path=/mdk|grep mdk`; if [[ "$DEPLOY_STATE" == *running* ]]; then echo "[kwatee_running]" ; else if [[ "$DEPLOY_STATE" == *stopped* ]]; then echo "[kwatee_stopped]"; else echo "[kwatee_error]" ; fi; fi;

now kwatee reports the correct icons, for starting, stopping and the state

Mac

unread,
Sep 19, 2013, 6:23:27 AM9/19/13
to kwa...@googlegroups.com
Thanks for the great suggestion!

Your commands can be made slightly more generic by substituting '{kwatee_package_name}' for 'mdk'

We will include a sample servlet_control script using this with our next release. This way, one can simply overlay the script to a package and then
invoke sh servlet_control start, sh servlet_control stop, and servlet_control status
in deployment or executable commands.

Once again, thanks for the contributrion.

Mac
Reply all
Reply to author
Forward
0 new messages