On 01/12/10 22:32, Rudiger Wolf wrote:
> Hi
> 
> I have a config file with
> 
> LogFile="/some/directory/access.log"
> 
> Which I want to change to
> 
> LogFile="/other/place/access.log"
> 
> 

This is what I ended up getting working

#update parameter so that awstats knows where to find the log it's
supposed to be analysing
linenumber=sudo('sed -n "/^LogFile=/="/tmp/awstats.model.conf',pty=True)
   if len(linenumber)>0:
      logfilepath='%(www_path)s/%(wpdomain)s/log' % env
      sudo('cat  /tmp/awstats.model.conf | sed %sd | sed
\'%si\LogFile=\"%s\"\' > /tmp/awstats.model.conf.tmp'%
(linenumber,linenumber,logfilepath) ,pty=True)
      sudo('mv /tmp/awstats.model.conf.tmp
/tmp/awstats.imodel.conf',pty=True)

_______________________________________________
Fab-user mailing list
Fab-user@nongnu.org
http://lists.nongnu.org/mailman/listinfo/fab-user

Reply via email to