Add --config-file argument to nntp-tiny-server
This commit is contained in:
parent
9add3495f7
commit
aa2c0b79dc
1 changed files with 3 additions and 2 deletions
|
@ -9,11 +9,12 @@ from nntp.tiny.server import Server
|
|||
from nntp.tiny.daemon import Daemon
|
||||
|
||||
parser = argparse.ArgumentParser(description='Tiny NNTP server')
|
||||
parser.add_argument('--daemon', '-d', action='store_true', help='Run NNTP server as daemon in background')
|
||||
parser.add_argument('--daemon', '-d', action='store_true', help='Run NNTP server as daemon in background')
|
||||
parser.add_argument('--config-file', '-f', type=str, help='Specify a configuration file location')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
config = Config.load()
|
||||
config = Config.load(args.config_file)
|
||||
server = Server(config)
|
||||
|
||||
if args.daemon:
|
||||
|
|
Loading…
Add table
Reference in a new issue