-
Notifications
You must be signed in to change notification settings - Fork 18
/
terrareg.py
26 lines (17 loc) · 723 Bytes
/
terrareg.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from argparse import ArgumentParser
from terrareg.server import Server
import terrareg.config
parser = ArgumentParser('terrareg')
config = terrareg.config.Config()
parser.add_argument('--ssl-cert-private-key', dest='ssl_priv_key',
default=config.SSL_CERT_PRIVATE_KEY,
help='Path to SSL private key')
parser.add_argument('--ssl-cert-public-key', dest='ssl_pub_key',
default=config.SSL_CERT_PUBLIC_KEY,
help='Path to SSL public key')
args = parser.parse_args()
s = Server(ssl_public_key=args.ssl_pub_key, ssl_private_key=args.ssl_priv_key)
if config.SERVER == terrareg.config.ServerType.WAITRESS:
s.run_waitress()
else:
s.run()