Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-11-2008, 05:33 AM   #1
Registered: Jul 2007
Location: Barcelona
Posts: 115

Rep: Reputation: 16
script to edit all vhost at once. (cp a file into all of them)


I have 20 plones on a plone farm(varnish, apache2, zope & zeo), and some virtual hosts on the same server.

Now I would like to put a robots.txt on all of them, have anybody done a script which I can reuse or modify to accomplish my needs?

I guess that the script should do the next steps:

-check vhosts enabled (guess from apache2ctl -S and some awk)
-look for each root path (don't know get it from each vhost file, they are on different lines)
-check the file (robots.txt) does not exist (if -e)
-cp the file(robots.txt) to the root of each vhost. (cp)



Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trying to edit a file via Command line or script seefor Linux - General 4 10-21-2008 01:39 PM
Force Script (Bash) to Edit File? carlosinfl Linux - General 3 10-02-2008 11:57 AM
Is it possible to allow just one PHP script to edit a file? fuzzyworm Programming 4 08-25-2008 07:47 AM
Shell script to edit a file kaash_m31 Linux - Newbie 2 06-02-2008 06:43 AM
script edit file.. johnyy Linux - Software 4 01-22-2004 06:50 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:06 PM.

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