Created
May 23, 2012 05:40
-
-
Save haiderfaraz/2773431 to your computer and use it in GitHub Desktop.
Service Script for LifeRay on Ubuntu 12.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# LifeRay Startup Service script v1.0 by Faraz Haider 6 May 2012 | |
# acts as startup service script for LifeRay Portal. | |
# USAGE: start|stop|status|logs | |
# | |
case "$1" in | |
start) | |
echo "Starting LifeRay Web Portal." | |
export JAVA_HOME=/opt/j2sdk/jdk1.7.0_03 | |
export JRE_HOME=/opt/j2sdk/jdk1.7.0_03/jre | |
/opt/webportal/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/bin/startup.sh | |
;; | |
stop) | |
echo "Stopping LifeRay Web Portal." | |
export JAVA_HOME=/opt/j2sdk/jdk1.7.0_03 | |
export JRE_HOME=/opt/j2sdk/jdk1.7.0_03/jre | |
/opt/webportal/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/bin/shutdown.sh | |
;; | |
logs) | |
echo "See the logs of the LifeRay Web Portal." | |
tail -f /opt/webportal/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/logs/catalina.out | |
;; | |
status) | |
# Check to see if the process is running | |
ps aux|grep -i liferay | |
;; | |
*) | |
echo “LifeRay Web Portal Service” | |
echo $”Usage: $0 {start|stop|status|logs}” | |
exit 1 | |
esac | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you!
According to https://wiki.debian.org/LSBInitScripts you shoud provide