Auto-uploading the same script to a large amount of sites

Status
Not open for further replies.

Matt

New member
Jun 24, 2006
388
2
0
Hi guys..

I'm looking for a way to upload the same script on 116 websites... this would take too long manually ... is there a way I can do this easily?

Feel free to PM me if you have a script that does this, or just message here if you know how to do it ;)

If anyone has a way of doing this, I'll love you ;)
 


If it's on your server why are you uploading it? Just put it somewhere and do something like ...
for x in $(ls /home/ ); do cp (filename) $x/www/; done ?

Or if you want to get really fancy use softlinks so you only have to update one file.
for x in $(ls /home/ ); do ln -s (filename) $x/www/; done ?

Of course all that depends on the locations of your webdirs and your files and what you want at the end, but still.
 
Ok, I forgot to mention ... although it's on my server.. I'm clueless about things like this.

What you just said is the equivalent of someone writing 2 paragraphs in Japanese to me.

Would you mind breaking it down (dumbing it down) for me please?

Thanks a lot.
 
Is the server linux or windows?
Where are your sites located on the server? Most of the time they're in, for instance /home/(some user)/public_html/ but sometimes they're in /var/www/ Where is the file currently located? where do you want it?
 
well, assuming you have root access to your dedicated server, upload the file somewhere to that site, log in, become root ( or just log in as root, I don't know the way their server works ).

find the file you uploaded, copy it to /root/ ( just to keep the next steps clear )
type something like this:
for x in $(ls -d /home/* ); do cp /root/your_filename_here $x/public_html/;done

You might get an error message or two, you can probably ignore them. Your file should be in each of those public_html dirs. You can check this by

ls -ls /home/*/public_html/your_filename_here
 
Ty, I'll contact ThePlanet tech guys and make verify your stuff :)

Thanks man.
 
Status
Not open for further replies.