Problem starting the service

I was wondering with the things that the following command
chef-client -r “recipe[java],recipe[apache_23112015]” is not starting the apache service and on the other hand after executing the above command and running sudo chef-client starting the service on a docker machine.

Service start script is as follows.

function start()
apache_running=$(ps -ef | grep java | grep -v grep | awk '{ printf 2" " }') if [ -z "{apache_running}" ] ; then
echo "Apache is not running"
echo "Starting Apache Tomcat"
cd /opt/apache-tomcat-7.0.64/bin/
sudo ./
return 0;
return 0;