Posts

Showing posts from July, 2015

Service Script for LifeRay on Ubuntu

Liferay developer need write script to start and stop liferay as service. In my projects production and test server management i need this, and after spending few times  i got this. Here below i share my experience. The script code given below. #!/bin/bash # # tomcat     This shell script takes care of starting and stopping Tomcat # # chkconfig: - 80 20 # ### BEGIN INIT INFO # Provides: tomcat # Required-Start: $network $syslog # Required-Stop: $network $syslog # Default-Start: # Default-Stop: # Short-Description: start and stop tomcat ### END INIT INFO #TOMCAT_HOME="/home/tariq/projects/projects/bundles/tomcat-7.0.42" TOMCAT_HOME="Home of your liferay tomcat" SHUTDOWN_WAIT=45 tomcat_pid() { #filter running process, here you can add extra filter criteria by adding | grep #criteria text     echo `ps aux | grep org.apache.catalina.startup.Bootstrap | grep -v grep | awk '{ print $2 }'` } start() {     pid=$(...