Files
linux-cloud-router/debian-package/src/usr/lib/vpn-router/configure
T

26 lines
657 B
Python
Executable File

#!/usr/bin/python3
"""Render configuration files and provision PKI from vpn-router.json.
Run directly to regenerate them without starting, stopping or reloading
anything. This still writes to /etc/swanctl, /etc/systemd/resolved.conf.d and
/etc/wireguard, and may create the certificate authority and add it to the host
trust store; what it leaves alone is routes, firewall rules and services.
'setup' calls the same code before applying those.
"""
import os
import sys
sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)))
import vpnrouter
def main():
vpnrouter.configure()
return 0
if __name__ == '__main__':
sys.exit(main())