LogicalDoc startup shutdown script

Save the following scripts as /etc/init.d/logicaldoc . It will automatically be read and run at boot time. Check the log files if it does not start properly.

Make a link to it from /etc/rc3.d such as:

ln -s ../init.d/logicaldoc S71LogicalDoc

cd /etc/rc5.d
sudo ln -s ../init.d/tomcat S71tomcat
sudo ln -s ../init.d/apache S72apache

----------------------------  /etc/init.d/logicaldoc  ------------------------
#!/bin/bash
#
# logicaldoc        
#
# chkconfig: 
# description: 	Start up the LogicalDOC Tomcat servlet engine.

# Source function library.
. /etc/init.d/functions

RETVAL=$?
CATALINA_HOME="/LogicalDOC/tomcat"

case "$1" in
 start)
        if [ -f $CATALINA_HOME/bin/startup.sh ];
          then
	    echo $"Starting Tomcat"
            $CATALINA_HOME/bin/startup.sh
        fi
	;;
 stop)
        if [ -f $CATALINA_HOME/bin/shutdown.sh ];
          then
	    echo $"Stopping Tomcat"
            $CATALINA_HOME/bin/shutdown.sh
        fi
 	;;
 *)
 	echo $"Usage: $0 {start|stop}"
	exit 1
	;;
esac

exit $RETVAL
-------------------  end of /etc/init.d/logicaldoc  ---------------

 

Advertisements

One thought on “LogicalDoc startup shutdown script

  1. PS: Do not forget to open ports in iptables for tomcat. It you install on stand alone server it is advisable to run on port 80 and 443

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s