Step 8 – Automatic Start/Stop Mandriva/Mandrake 10.x
Version française du document : http://www.apachefrance.com/Forums/index.php?showtopic=3606
Source Links :
urpmi tanukiwrapper-3.1.2-1jpp.i386.rpm
We Get :
A-1 copy script file from /usr/share/tanukiwrapper-3.1.2/bin/testwrapper TWICE to obtain two renaming files like this:
A-2 copy script file from /usr/share/tanukiwrapper-3.1.2/bin/testwrapper TWICE to obtain two renaming files like this:
replace....
wrapper.java.classpath.2=../lib/wrapper.jar
By ...
wrapper.java.classpath.2=/usr/share/java/tanukiwrapper.jar
# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1=../lib
# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1=/usr/lib
WRAPPER_HOME=/usr/share/tanukiwrapper-3.1.2 ; export WRAPPER_HOME
DAISY_HOME=/usr/share/daisy ; export DAISY_HOME
OPENJMS_HOME=/usr/share/daisy/openjms ; export OPENJMS_HOME
DAISY_DATADIR=/var/local/daisydata ; export DAISY_DATADIR
MERLIN_HOME=$DAISY_HOME/repository-server/merlin ; export MERLIN_HOME
-> replace
PIDDIR=*.*
-> by
PIDDIR= »/var/run »
Scripts files must include few lines with a strict syntax and as minimum # chkconfig & # description:
As example : we have Tomcat5 S80 K20 and We want that dsy_openjms.sh & dsy_repo.sh Start Before & Stop After (Apache Start and Stop after Tomcat5)
Add at the second line position in files
# description: Daisy OpenJMS Service
# chkconfig: 2345 76 24
# processname: dsy_openjms
# pidfile: /var/run/dsy_openjms.pid
Add at the second line position in files
# description: Daisy Repository Server Service
# chkconfig: 2345 78 22
# processname: dsy_repo
# pidfile: /var/run/dsy_repo.pid
Move to /usr/share/daisy/openjms/bin
Move to /usr/share/daisy/repository-server/bin
Start (respect order)
./dsy_openjms start
./dsy_repo start
Stop (respect order)
./dsy_repo stop
./dsy_openjms stop
ln -s /usr/share/daisy/openjms/bin/dsy_openjms /etc/init.d/dsy_openjms
ln -s /usr/share/daisy/repository-server/bin/dsy_repo /etc/init.d/dsy_repo
Test LN as changing current directory to /etc/init.d And executing scripts (respect order)
chkconfig --add dsy_openjms
chkconfig --add dsy_repo
“chkconfig” replace on Mandriva (update-rc.d dsy_openjms start 76 2 3 4 5 . stop 24 0 1 6 .) and ( update-rc.d dsy_repo start 78 2 3 4 5 . stop 22 0 1 6 .) on others Linux systems
Okay, you shutdown then you start your Mandriva Machine to test ..
There is a little trick to fix that i didn't found .. in Console Manager as dsy-xx are stopped or started, i don't get the status displayed ..
| Name | Value |
|---|---|
| Category | Install & config |