I have written a bash script that periodically checks a directory for newly added .ear files and copies them to the respective JBoss server's deploy directory.Before copying, it checks if JBoss is running, and stops it if it is.After copying the file,it removes the older .ear files if any,and starts JBoss.
I am trying to have this script executed via a web page. i.e provide a link to the users, clicking on which, the entire process gets executed.So far I am not able to get the desired result, though manually executing it works.
I'm getting the following error in http logs:
warn] [client 127.0.0.1] Timeout waiting for output from CGI script /var/www/cgi-bin/auto.sh, referer: http://localhost/
Would appreciate if someone could shed some light on how to go about it.