WIP: cli/node.py
Showing
... | ... | @@ -130,6 +130,8 @@ def getConfig(): |
def main(): | ||
# Get arguments | ||
config = getConfig() | ||
# ca: certifcate authority certificate, key: node private key, cert: node public certificate | ||
# verifies cert has been signed by ca | ||
cert = x509.Cert(config.ca, config.key, config.cert) | ||
config.openvpn_args += cert.openvpn_args | ||
... | ... | @@ -146,7 +148,9 @@ def main(): |
if config.ovpnlog: | ||
plib.ovpn_log = config.log | ||
# If program receives SIGINT or SIGTERM, exit with status 0 | ||
|
||
exit.signal(0, signal.SIGINT, signal.SIGTERM) | ||
# If program receives SIGHUP or SIGUSR2, exit with status -1 | ||
exit.signal(-1, signal.SIGHUP, signal.SIGUSR2) | ||
cache = Cache(db_path, config.registry, cert) | ||
... | ... |