LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to automate an installation script suppressing user interaction (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-automate-an-installation-script-suppressing-user-interaction-787353/)

aditi 02-06-2010 12:09 AM

how to automate an installation script suppressing user interaction
 
Hello All,

Im new to linux and this is my first post...

Im working on ubuntu and i need to install glassfish on my machine often. I want to write a script which can automate this installation and the post installation work so that I can run this script when i leave office and have everything done by the time I reach office the next day.

But after running the installation command there will be a license agreement which i need to accept by typing "A" at the console. Now How I can automate this so that the scipt can take this from a txt file? Please help.....


mv /home/liferay-portal-glassfish-linux-5.2.3.jar /opt/argon/
cd /opt/argon
java -Xmx256m -jar liferay-portal-glassfish-linux-5.2.3.jar

<Here The console expects to type "A" accepting the lisence agreement>

cd glassfish
chmod -R +x lib/ant/bin
......
....
....
...

carltm 02-06-2010 05:56 AM

This can be done using a program named expect. It takes some
time to learn, but it is worth it.


All times are GMT -5. The time now is 01:09 AM.