I am struggling with this script which I have to create to startup app database at reboot. Now the problem is before running the command to start the database I am suppose to set some environment variable for the system.
This is the file which contains all the env variable and manually I run using this command
# less tux.env
TUXDIR=/u01/Tuxedo/tuxedo10gR3; export TUXDIR
JAVA_HOME=/u01/peoplesoft/jre; export JAVA_HOME
PATH=$TUXDIR/bin:$JAVA_HOME/bin:$PATH; export PATH
COBCPY=:$TUXDIR/cobinclude; export COBCPY
COBOPT="-C ANS85 -C ALIGN=8 -C NOIBMCOMP -C TRUNC=ANSI -C OSEXT=cbl"; export COBOPT
SHLIB_PATH=$TUXDIR/lib:$JVMLIBS:$SHLIB_PATH; export SHLIB_PATH
LIBPATH=$TUXDIR/lib:$JVMLIBS:$LIBPATH; export LIBPATH
LD_LIBRARY_PATH=$TUXDIR/lib:$JVMLIBS:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH
WEBJAVADIR=$TUXDIR/udataobj/webgui/java; export WEBJAVADIR
and after this the startup command
# psadmin -p start -d fin91dmo
But If I want to automate my work adding this in a script as shown below
# less app.sh
psadmin -p start -d fin91dmo
psadmin -c boot -d fin91dmo
Now every time I run this script it says
psadmin command not found
which means path variable are not getting set I believe.
Am I doing any thing wrong as I am not so good with scripts.
Is there any way I can automate this process?