#! /bin/sh # /etc/init.d/compiere # # 15012003 by Jaume Teixi . # # not suitable for production environments # use only at your own risk # set -e export COMPIERE_HOME=/ora/Compiere2 if [ ! -f $COMPIERE_HOME/utils/RUN_Server2.sh -o ! -d $ORACLE_HOME ] then echo -n "No dbstart encountered... Is there still an Oracle Installation ?" exit 0 fi case "$1" in start) echo -n `date` "Compiere Server2 Starting up... " source $COMPIERE_HOME/utils/myEnvironment.sh su -c "$COMPIERE_HOME/utils/RUN_Server2.sh > /var/log/compiere.log &" echo -n "" touch /var/lock/compiere ;; stop) echo -n `date` "Stoping Compiere Server2... " source $COMPIERE_HOME/utils/myEnvironment.sh su -c "killall $JAVA_HOME/bin/java" su -c "killall $COMPIERE_HOME/utils/RUN_Server2.sh" rm -rf /var/lock/compiere ;; restart) echo -n `date` "REStarting Compiere Server2" echo -n "" $0 stop $0 start echo -n ;; *) echo "Usage: /etc/init.d/$NAME {start|stop|restart}" exit 1 ;; esac exit 0