From 81b79d0e360ba4c7e1039e16c9f1b19be711b40b Mon Sep 17 00:00:00 2001 From: David Rousselie Date: Mon, 6 Feb 2006 20:42:33 +0100 Subject: [PATCH] Record process pid in a file darcs-hash:20060206194233-86b55-2575e8b5a9bca31f46e81f19a648846eddabb210.gz --- jmc.py | 3 +++ jmc.xml | 1 + tests/jmc-test.xml | 1 + 3 files changed, 5 insertions(+) diff --git a/jmc.py b/jmc.py index 8c15dbe..575470c 100755 --- a/jmc.py +++ b/jmc.py @@ -47,6 +47,9 @@ def main(config_file = "jmc.xml", isDebug = 0): str(sys.exc_value) sys.exit(1) + pidfile = open(config.get_content("config/pidfile"), "w") + pidfile.write(str(os.getpid())) + pidfile.close() mailconnection.default_encoding = config.get_content("config/mail_default_encoding") print "creating component..." mailcomp = MailComponent(config.get_content("config/jabber/service"), \ diff --git a/jmc.xml b/jmc.xml index 7a3f58d..c1d1d10 100644 --- a/jmc.xml +++ b/jmc.xml @@ -14,6 +14,7 @@ DBM /var/spool/jabber + /var/run/jabber/jmc.pid 5 iso-8859-1 diff --git a/tests/jmc-test.xml b/tests/jmc-test.xml index 875c883..c90e6a9 100644 --- a/tests/jmc-test.xml +++ b/tests/jmc-test.xml @@ -13,6 +13,7 @@ SQLite + jmc.pid . 5 iso-8859-15