Hi all,
I have a very simple script which sshes into each server (cat each server in myhosts file) and runs a command "install.sh"
install.sh then starts an install which asks for user input. The input always the same for all servers and in the same order, eg what is the server ip?, tcp port?, install?
Question - How do I store the user input into a text file (so that they can modify the variables), and also can be used by testscript.sh to insert the info. Currently, everytime the install.sh runs, I have to type in the info manually.
text file for input would look like the following:
----------------------
serverip=10.0.0.1
port=2000
install=Y
etc
----------------------
testscript.sh script thus far
Any help would be much appreciated, and hopefully useful for others
Regards
Stevio
I have a very simple script which sshes into each server (cat each server in myhosts file) and runs a command "install.sh"
install.sh then starts an install which asks for user input. The input always the same for all servers and in the same order, eg what is the server ip?, tcp port?, install?
Question - How do I store the user input into a text file (so that they can modify the variables), and also can be used by testscript.sh to insert the info. Currently, everytime the install.sh runs, I have to type in the info manually.
text file for input would look like the following:
----------------------
serverip=10.0.0.1
port=2000
install=Y
etc
----------------------
testscript.sh script thus far
Code:
for host in `cat myhosts`
do
echo running test install to $host
scp -pr /tmp/install.sh root@$myhost:/
ssh $myhost /tmp/install.sh
done
Any help would be much appreciated, and hopefully useful for others
Regards
Stevio