diff --git a/update_local_config.py b/update_local_config.py index a5ca399..4807c43 100644 --- a/update_local_config.py +++ b/update_local_config.py @@ -41,6 +41,7 @@ def main(): parser.add_argument("--location", type=str, required=True, help="Server location") parser.add_argument("--server_type", type=str, required=True, help="Server type") parser.add_argument("--interface", type=str, required=True, help="Wireguard interface (e.g., wg0)") + parser.add_argument("--config_path", type=str, help="Path to the Wireguard configuration file") args = parser.parse_args() @@ -48,7 +49,7 @@ def main(): location = args.location server_type = args.server_type interface = args.interface - config_path = f"/etc/wireguard/{interface}.conf" + config_path = args.config_path or f"/etc/wireguard/{interface}.conf" # Step 1: Execute the existing script to set up the remote VPN server new_peer_section = execute_script(provider, location, server_type)