Remove key file and set user to root

This commit is contained in:
LilyRose2798 2024-04-17 00:47:42 +10:00
parent 4a5a89e5d3
commit 7e3953ad46
1 changed files with 2 additions and 3 deletions

View File

@ -33,7 +33,6 @@ class WovenConfig:
nodes: dict[str, WovenNode] nodes: dict[str, WovenNode]
ptp_ipv4_subnet: int = 30 ptp_ipv4_subnet: int = 30
ptp_ipv6_subnet: int = 64 ptp_ipv6_subnet: int = 64
private_key: str | None = None
def generate_wg_configs(config: WovenConfig): def generate_wg_configs(config: WovenConfig):
try: try:
@ -121,10 +120,10 @@ def generate_wg_configs(config: WovenConfig):
} }
) )
c_a = Connection(node_a.listen_address) c_a = Connection(node_a.listen_address, user = "root")
c_a.put(StringIO(config_a.to_wgconfig(wgquick_format = True)), str(Path("/") / "etc" / "wireguard" / f"{id_a}-{id_b}-loop.conf")) c_a.put(StringIO(config_a.to_wgconfig(wgquick_format = True)), str(Path("/") / "etc" / "wireguard" / f"{id_a}-{id_b}-loop.conf"))
c_b = Connection(node_b.listen_address) c_b = Connection(node_b.listen_address, user = "root")
c_b.put(StringIO(config_b.to_wgconfig(wgquick_format = True)), str(Path("/") / "etc" / "wireguard" / f"{id_b}-{id_a}-loop.conf")) c_b.put(StringIO(config_b.to_wgconfig(wgquick_format = True)), str(Path("/") / "etc" / "wireguard" / f"{id_b}-{id_a}-loop.conf"))
def main(): def main():