source: mailjam/bin/mailjam-server@ 23:adc5b22efd7e

Last change on this file since 23:adc5b22efd7e was 21:41e7bbc16e32, checked in by Borja Lopez <borja@…>, 13 years ago

Improved the mailjam-mta and mailjam-server scripts, adding argparse
definitions for the proper parameters available for both scripts.

  • Property exe set to *
File size: 685 bytes
Line 
1#!/usr/bin/env python
2#
3# Run the Mailjam XML-RPC server
4#
5
6import argparse
7
8from mailjam.daemon import MailjamDaemon
9
10msg = 'mailjam-server: Mailing lists management server'
11parser = argparse.ArgumentParser(description=msg)
12parser.add_argument('-c', '--config', action='store', dest='config',
13 help='Set the path to a valid mailjam configuration file')
14parser.add_argument('-v', '--version', action='version',
15 version='mailjam server 0.1.0')
16
17if __name__ == '__main__':
18 results = parser.parse_args()
19 if results.config:
20 daemon = MailjamDaemon(configfile=results.config)
21 else:
22 daemon = MailjamDaemon()
23 daemon.run()
Note: See TracBrowser for help on using the repository browser.