refactor: hardcode provider to Hetzner in script

Removed the --provider argument from the command-line parser and set the provider variable directly to "hetzner". Simplifies the script by removing an unnecessary user input field. Relevant for deployments exclusively using Hetzner.
This commit is contained in:
Kumi 2024-07-18 19:02:51 +02:00
parent aebc5adaf3
commit 776e3e00ea
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -38,7 +38,6 @@ def run_update_script(provider, location, server_type, interface, config_path):
def main(): def main():
parser = argparse.ArgumentParser(description="Manage Hetzner servers and update local Wireguard VPN.") parser = argparse.ArgumentParser(description="Manage Hetzner servers and update local Wireguard VPN.")
parser.add_argument("--provider", type=str, required=True, help="Cloud provider (e.g., hetzner)")
parser.add_argument("--location", type=str, required=True, help="Server location") 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("--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("--interface", type=str, required=True, help="Wireguard interface (e.g., wg0)")
@ -46,7 +45,7 @@ def main():
args = parser.parse_args() args = parser.parse_args()
provider = args.provider provider = "hetzner"
location = args.location location = args.location
server_type = args.server_type server_type = args.server_type
interface = args.interface interface = args.interface