LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Script to Hit 'Enter' key multiple times in bash script. (https://www.linuxquestions.org/questions/ubuntu-63/script-to-hit-enter-key-multiple-times-in-bash-script-4175417385/)

nithinmp 07-18-2012 08:27 AM

Script to Hit 'Enter' key multiple times in bash script.
 
hi,
I am trying to install jira on ubuntu 10.04 64 bit through terminal using .bin file.
during installation i want to hit "enter" key multiple times to finish installation.i need the bash script to do it successfully.

following are the messages i am getting during installion:

This will install JIRA 5.1 on your computer.
OK [o, Enter], Cancel [c]

Choose the appropriate installation or upgrade option.
Please choose one of the following:
Express Install (use default settings) [1], Custom Install (recommended for advanced users) [2, Enter], Upgrade an existing JIRA installation [3]


Where should JIRA 5.1 be installed?
[/opt/atlassian/jira]

Default location for JIRA data
[/var/atlassian/application-data/jira]


Configure which ports JIRA will use.
JIRA requires two TCP ports that are not being used by any other
applications on this machine. The HTTP port is where you will access JIRA
through your browser. The Control port is used to Startup and Shutdown JIRA.
Use default ports (HTTP: 8080, Control: 8005) - Recommended [1, Enter], Set custom value for HTTP and Control ports [2]


JIRA can be run in the background.
You may choose to run JIRA as a service, which means it will start
automatically whenever the computer restarts.
Install JIRA as Service?
Yes [y, Enter], No [n]


Please help me...with bash scripts

acid_kewpie 07-18-2012 08:31 AM

no need.... https://confluence.atlassian.com/dis...edInstallation

nithinmp 07-19-2012 01:04 AM

Quote:

Originally Posted by acid_kewpie (Post 4731648)

thanks for your reply acid kewpie....:)

but i am installing jira for first time..then how can i perform unattended installation as per you link?

acid_kewpie 07-19-2012 03:10 AM

just install it normally, get the properties file and uninstall it.

nithinmp 07-19-2012 04:53 AM

Quote:

Originally Posted by acid_kewpie (Post 4732389)
just install it normally, get the properties file and uninstall it.

thank you acid kewpie for helping me...i dont want to do it directly,because i am trying to deploy jira in a virtual machine using vFabric app director
i found the solution...my script is as follows:


VAR=$(expect -c "
expect \"This will install JIRA 5.1 on your computer.\"
send \"\r\"
expect \"Choose the appropriate installation or upgrade option.\"
send \"\r\"
expect \"Where should JIRA 5.1 be installed?\"
send \"\r\"
expect \"Choose the appropriate installation or upgrade option.\"
send \"\r\"
expect \"Default location for JIRA data\"
send \"\r\"
expect \"Configure which ports JIRA will use.\"
send \"\r\"
expect \"JIRA can be run in the background.\"
send \"\r\"


")

sudo echo "$VAR" | ./atlassian-jira-5.1-x64.bin

acid_kewpie 07-19-2012 05:25 AM

you don't understand what I said do you? You're doing this a dozen, a hundred times, and clearly you've already installed it once. You just save that properties file from the test install and replicate it as many times as you want. Expect is definitely NOT the way to do this.

nithinmp 07-19-2012 06:58 AM

Quote:

Originally Posted by acid_kewpie (Post 4732516)
you don't understand what I said do you? You're doing this a dozen, a hundred times, and clearly you've already installed it once. You just save that properties file from the test install and replicate it as many times as you want. Expect is definitely NOT the way to do this.

Then please quote me a solution ..please..

acid_kewpie 07-19-2012 07:01 AM

as per the link...


install jira on a test rig

get the response.varfile

copy the file along with the jira installer to wherever it's going to be install en mass

run the installer referencing the file.


All times are GMT -5. The time now is 10:32 AM.