search for: sed_cmd

Displaying 1 result from an estimated 1 matches for "sed_cmd".

Did you mean: se_cmd
2010 Oct 26
0
[PATCH node] add collectd.py
.../bin/python +# +# Configures the collectd daemon. + +import os +import sys +from ovirtfunctions import * +from subprocess import Popen, PIPE, STDOUT + +collectd_conf="/etc/collectd.conf" + +def ovirt_collectd(server, port): + if os.path.exists(collectd_conf + ".in"): + sed_cmd = "sed -e \"s/@COLLECTD_SERVER@/%s/\" \ + -e \"s/@COLLECTD_PORT@/%s/\" %s.in \ + > %s" % (server, port, collectd_conf, collectd_conf) + sed = subprocess.Popen(sed_cmd, shell=True, stdout=PIPE, stderr=STDOUT) + sed.poll() +...