LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 07-18-2012, 08:27 AM   #1
nithinmp
LQ Newbie
 
Registered: Jul 2012
Posts: 4

Rep: Reputation: Disabled
Post 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
 
Old 07-18-2012, 08:31 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
no need.... https://confluence.atlassian.com/dis...edInstallation
 
Old 07-19-2012, 01:04 AM   #3
nithinmp
LQ Newbie
 
Registered: Jul 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Post

Quote:
Originally Posted by acid_kewpie View Post
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?
 
Old 07-19-2012, 03:10 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
just install it normally, get the properties file and uninstall it.
 
Old 07-19-2012, 04:53 AM   #5
nithinmp
LQ Newbie
 
Registered: Jul 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Smile

Quote:
Originally Posted by acid_kewpie View Post
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
 
Old 07-19-2012, 05:25 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
 
Old 07-19-2012, 06:58 AM   #7
nithinmp
LQ Newbie
 
Registered: Jul 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Post

Quote:
Originally Posted by acid_kewpie View Post
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..
 
Old 07-19-2012, 07:01 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.

Last edited by acid_kewpie; 07-19-2012 at 07:03 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to send enter key to script? rabbit2345 Programming 13 03-09-2009 04:48 PM
script to execute a command multiple times snr8fl3 Programming 5 11-17-2008 12:49 PM
BASH: cannot enter special-named dir from script Roger Krowiak Programming 3 08-24-2006 06:19 AM
bash: run a script at most 3 times simultanously paterijk Programming 4 08-18-2005 02:49 PM
Testing for enter in bash script bwysocki Programming 8 06-16-2005 09:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 05:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration