This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- Re: can any one explain how to run a shell script file in Install Anywhere
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 29, 2009
06:43 AM
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
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
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 29, 2009
07:46 AM
If I were you I would use the Execute Command in order to run the following command:
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$
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$
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 04, 2009
09:55 AM
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
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
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
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 04, 2009
10:08 AM
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.
![](/skins/images/CC38E504FC9E1309DC48ACFEB4925670/responsive_peak/images/icon_anonymous_message.png)