Is there a way to host a script on a server? Specifically, the end user would pop in a terminal command or script that fetches text (a formatted script) from a server and runs that code on the local system.
I want to do this because I have a script that is constantly evolving and it would be nice to edit a source file on a server for updates without having to push out a new script every time.
I think it's worth mentioning this would be done behind a firewall.
Yes you can use wget to fetch the script from a server to the local system as long as your firewall will allow the local system to http:// (port 80) browse to the server in question.
This User Gave Thanks to Chubler_XL For This Post:
How about you pass an 'execution' script to the users, which does similar things like Chubler_XL suggested.
But basicly, it will just download your real script and execute it.
Yes depending on how frequently you expect it to change. One could use a daily/hourly cron job to check for updates, or always fetch it and execute as you go.
I would be careful if the script is executed as root as it would be very easy for someone to attach and insert their own script into your system. Perhaps using https:// with a proper certificate would be wise.
This User Gave Thanks to Chubler_XL For This Post:
This said, you could also package it according to your package manager.
As in, TUI (Text User Interface) is actualy a bash based project, and since my linux is fedora, i have it packated as an rpm.
But regardless if its a script or not, if it needs updating on a frequent basis, a package might be more apropriate.
Yes you can use wget to fetch the script from a server to the local system as long as your firewall will allow the local system to http:// (port 80) browse to the server in question.
Thanks Sea and Chubler. So, wget would be cool but it would require everybody to procure wget, so I would like to stay within the normal scope of bash on OSX. I was thinking about using SSH and either a scp or rsync to grab the file.
With that being said. I was hoping to get your input on this:
Route 1: Distribute a script that simply ssh's into the server, pulls the script down to /tmp, executes, and removes from /tmp when finished.
Route 2: Distribute the up-to-date version of the script, use diff to check the local version with the server version, if there is a difference overwrite the local version with server version, execute.
Hi,
I am trying to correct the following script to get total EBS usage from Amazon cloud. Can someone please help in correcting it. It appears that its not working properly.
t=0; for i in `ec2-describe-volumes | grep VOLUME | grep standard | awk '{print $3}'`; do t=`expr $t + $i`; done;... (2 Replies)
Hi All
I am having VxVm on two Solaris hosts. host1 is using disk group dgHR. right now this server went down due to hardware fault. Not I need to import this dgHR into host2 server. Please let me know the procedure for the same. (1 Reply)
Hi,
I am new to the expect scripting.
I have this expect script as below :
spawn ssh remote_server -l id
set pass "12345"
set opt "s"
expect "Password:" {send "$pass\r" ; }
expect "*ENTER*" {send "Enter\r"; exp_continue }
expect "Please select option :" {send... (2 Replies)
I do a ssh to remote host(A1) from local host(L1). I then ssh to another remote(A2) from A1.
When I do a who -m from A2, I see the "connected from" as "A1".
=> who -m
userid pts/2 2010-03-27 08:47 (A1)
I want to identify who is the local host who initiated the connection to... (3 Replies)
I want to write a script which would run from one host say A and connect to other remote host B and then run rest of commands in that host. I tried connecting from A host to B with SSH but after connecting to host B it just getting me inside Host B command prompt. Rest of the script is not running... (6 Replies)
Tim Bass
Thu, 15 Nov 2007 23:55:07 +0000
*I predict we may experience less*debates*on the use of the term “event cloud”*related to*CEP in the future, now that both IBM and Google* have made announcements about “cloud computing” and “computing cloud”, IBM Turning Data Centers Into ‘Computing... (0 Replies)
The problem I am facing now is that the QNX host could not ping the SCO host and vice versa. They are in the same domain, ie, 172.20.3.xx. As I am very new to Unix, I guess I must have missed out some important steps. Pls help... Thanx alot (2 Replies)