improve Identation of the file and added proper Header info.

This commit is contained in:
trifonnt 2009-10-14 09:58:53 +00:00
parent 0858087435
commit 5afcf50f8a
1 changed files with 101 additions and 93 deletions

View File

@ -1,22 +1,24 @@
#!/bin/bash
#
# FileName: adempiere.init
# Description: adempiere erp software startup and shutdown
# Vendor: K.K. Alice
# Created: 05. April 2004
# Author: S. Christians
# Updated: Carlos Ruiz - globalqss - version for Debian tested in Knoppix
#!/bin/bash -e
#
### BEGIN INIT INFO
# Provides: adempiere adempiere-3.5
# Required-Start: postgresql
# Required-Stop: postgresql
# Default-Start: 2 3 4 5
# Default-Stop: 1
# Short-Description: ADempiere 3.5 server
# Description: Provides ADempiere ERP-CRM Server startup and shutdown script. Requires PostgreSQL server.
# FileTarget: /etc/init.d/adempiere
# FileOwner: root.root
# FilePerms: 0755
#
# chkconfig: 2345 97 06
# $Id: adempiere,v 1.1 2006/03/16 05:00:28 cruiz Exp $
### END INIT INFO
# initialization
# adjust these variables to your environment
EXECDIR=/home/adempiere/Adempiere
EXECDIR=/opt/adempiere/Adempiere
ADEMPIEREUSER=adempiere
# Instead of using ENVFILE you can set JAVA_HOME, ADEMPIERE_HOME and add JAVA_HOME/bin to PATH
# in this case you can comment the source lines for ENVFILE below
@ -40,7 +42,7 @@ getadempierestatus() {
start () {
getadempierestatus
if [ $ADEMPIERESTATUS -eq 0 ] ; then
echo "adempiere is already running"
echo "ADempiere is already running"
return 1
fi
echo -n "Starting ADempiere ERP: "
@ -80,7 +82,7 @@ start () {
stop () {
getadempierestatus
if [ $ADEMPIERESTATUS -ne 0 ] ; then
echo "adempiere is already stopped"
echo "ADempiere is already stopped"
return 1
fi
echo -n "Stopping ADempiere ERP: "
@ -133,11 +135,11 @@ rhstatus () {
getadempierestatus
if [ $ADEMPIERESTATUS -eq 0 ] ; then
echo
echo "adempiere is running:"
echo "ADempiere is running:"
ps ax | grep -v grep | grep $EXECDIR | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/'
echo
else
echo "adempiere is stopped"
echo "ADempiere is stopped"
fi
}
@ -145,21 +147,27 @@ case "$1" in
start)
start
;;
stop)
stop
;;
reload)
restart
;;
restart)
restart
;;
condrestart)
condrestart
;;
status)
rhstatus
;;
*)
echo $"Usage: $0 {start|stop|reload|restart|condrestart|status}"
exit 1