This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Statistics collection daemon.".
The branch, master has been updated via 54e10690b6ddb3177d069a976002256cac719145 (commit) via 59bf99cacc92b218d6f912cb922810ee5e8cd3af (commit) via 4ee18324cf332ab2c1788902111fe82a900653b8 (commit) from 57c395f74f93d116c2db689002b2459205fa2ffd (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 54e10690b6ddb3177d069a976002256cac719145 Author: Michael Tremer michael.tremer@ipfire.org Date: Tue Nov 17 09:51:13 2009 +0100
Documentation updates.
commit 59bf99cacc92b218d6f912cb922810ee5e8cd3af Author: Michael Tremer michael.tremer@ipfire.org Date: Tue Nov 17 09:48:50 2009 +0100
Add ability to run as a daemon.
commit 4ee18324cf332ab2c1788902111fe82a900653b8 Author: Michael Tremer michael.tremer@ipfire.org Date: Tue Nov 17 09:21:38 2009 +0100
colletcyd: Some code cleanup and commenting.
No functional changes.
-----------------------------------------------------------------------
Summary of changes: INSTALL | 6 ++++++ collectyd | 14 ++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 INSTALL
Difference in files: diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..e4f9e6b --- /dev/null +++ b/INSTALL @@ -0,0 +1,6 @@ + +Requirements: + * Python 2.6 or any later version. + * Python-daemon (a python module for handling daemons). + * Python-rrdtool (a python module for handling round-robin databases). + diff --git a/collectyd b/collectyd index 3fa6938..a67dc36 100755 --- a/collectyd +++ b/collectyd @@ -3,27 +3,33 @@ import os import sys
+import daemon import optparse
-from collecty import Collecty +import collecty
-c = Collecty() +c = collecty.Collecty()
# Parse command line options op = optparse.OptionParser(usage="usage: %prog [options] <configfile1> ... <configfileN>") op.add_option("-d", "--daemon", action="store_true", default=False, help="Run as a daemon in background.") - (options, configfiles) = op.parse_args()
if configfiles: for file in configfiles: c.read_config(file) else: + # Load default config file c.read_config("/etc/collecty/collecty.conf")
if not c.instances: print >>sys.stderr, "Error: No instances were configured." sys.exit(1)
-c.run() +if options.daemon: + with daemon.DaemonContext(stdout=sys.stdout, stderr=sys.stderr): + c.run() +else: + c.run() +
hooks/post-receive -- Statistics collection daemon.