LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

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


Hello,

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)


Thanks.
 
  


Reply


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:25 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration