cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
vijji123
Level 6

can any one explain how to run a shell script file in Install Anywhere

Hi ,

I am Vijaya,

I am new to IA, can any body tell me how to run .sh file in Install Any where using execute target file action.

i added one .sh file using add file action and trying to execute that script using execute target file action. my .sh file contains general commands.

here is my .sh file

cd "$CTL_RUNTIME_DIR$"
cd "$L{Installer.esignserver.dir.is}"
cd "$L{Installer.esignserver.dir.admin}"
./stopsys.sh


i am able to run these commands using execute script/batch file action but i was failing while using execute target file action.

can anybody help me this regard.

Thanks,
Vijaya
Labels (1)
0 Kudos
(3) Replies
pv7721
Level 20

If I were you I would use the Execute Command in order to run the following command:
sh -c "$CTL_RUNTIME_DIR$$/$$DOLLAR$L{Installer.esignserver.dir.is}$/$$DOLLAR$L{Installer.esignserver.dir.admin}$/$stopsys.sh"


I think your issue was that in IA environment the everything between two $ is interpreted as an IA variable. So in order to have a $ in IA you have to write it as $DOLLAR$
0 Kudos
vijji123
Level 6

Hi ,

Thanks for your reply,

Actually i have one .sh file named getpid.sh and contains the following code

OS=`uname -a | awk '{print $1}' -`
echo "OS Type is:${OS}"
if [[ "${OS}" = "Linux" || "${OS}" = "SunOS" || "${OS}" = "HP-UX" ]]; then
USER_NAME=$USER
else
USER_NAME=$USERNAME
fi
set -A KILLPROCESS `ps -fu $USER_NAME | grep honcho `
if [ "${KILLPROCESS
  • }" != "" ]; then
    if [ ${USER_NAME} = ${KILLPROCESS[0]} ]; then
    if [ "${KILLPROCESS[7]}" != "grep" ]; then
    echo "CTL_RUNTIME_DIR is:" $CTL_RUNTIME_DIR
    $CTL_RUNTIME_DIR/is/admin/stopsys.sh
    fi
    fi
    fi


    i want to call this getpid.sh file from IA environment using execute target action or execute script or batch action.

    if u can explain me the procedure how to call this shell script file from IA environment, it will be more helpful to me.


    over all my requirement is i need to call a shell script file from IA environment.
    that shell script is getting executed successfully on the box where i am going to running the installer.but it is failing with the installer.


    Thanks,
    Vijji123
  • 0 Kudos
    pv7721
    Level 20

    The simplest thing would be to add the script as an installed file to the project, then you can use the Execute Target action in order to execute it.
    0 Kudos