Record process pid in a file
darcs-hash:20060206194233-86b55-2575e8b5a9bca31f46e81f19a648846eddabb210.gz
This commit is contained in:
3
jmc.py
3
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"), \
|
||||
|
||||
1
jmc.xml
1
jmc.xml
@@ -14,6 +14,7 @@
|
||||
</jabber>
|
||||
<storage>DBM</storage>
|
||||
<spooldir>/var/spool/jabber</spooldir>
|
||||
<pidfile>/var/run/jabber/jmc.pid</pidfile>
|
||||
<!-- default check interval in minutes -->
|
||||
<check_interval>5</check_interval>
|
||||
<mail_default_encoding>iso-8859-1</mail_default_encoding>
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
</vCard>
|
||||
</jabber>
|
||||
<storage>SQLite</storage>
|
||||
<pidfile>jmc.pid</pidfile>
|
||||
<spooldir>.</spooldir>
|
||||
<check_interval>5</check_interval> <!-- in minutes -->
|
||||
<mail_default_encoding>iso-8859-15</mail_default_encoding>
|
||||
|
||||
Reference in New Issue
Block a user