fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fab-user] Escaping sudo command for config file search and replace


From: Rudiger Wolf
Subject: [Fab-user] Escaping sudo command for config file search and replace
Date: Wed, 01 Dec 2010 22:32:04 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Lightning/1.0b2 Thunderbird/3.1.6

Hi

I have a config file with

LogFile="/some/directory/access.log"

Which I want to change to

LogFile="/other/place/access.log"


The following works at the command line on the server

sed -i 's/\(^LogFile=\)\(..*$\)/LogFile=\"\/other\/place\/access.log\"/'
/tmp/awstats.model.conf

How do I escape this so that I can use sudo() function in a fabfile?

Once I get that working I want to use %(envvar)s to change the path.

Any tips on the escaping of this command?

Thanks
Rudiger





reply via email to

[Prev in Thread] Current Thread [Next in Thread]