source: mailjam/bin/mailjam-server@ 26:0dcb95910259

Last change on this file since 26:0dcb95910259 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
RevLine 
[6]1#!/usr/bin/env python
2#
[21]3# Run the Mailjam XML-RPC server
4#
5
6import argparse
7
8from mailjam.daemon import MailjamDaemon
[6]9
[21]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')
[6]16
17if __name__ == '__main__':
[21]18 results = parser.parse_args()
19 if results.config:
20 daemon = MailjamDaemon(configfile=results.config)
21 else:
22 daemon = MailjamDaemon()
[6]23 daemon.run()
Note: See TracBrowser for help on using the repository browser.