diff --git a/src/netcup_dns/main.py b/src/netcup_dns/main.py index 693b255..96429dd 100644 --- a/src/netcup_dns/main.py +++ b/src/netcup_dns/main.py @@ -2,6 +2,7 @@ # -*- coding: utf-8 -*- import configparser import ipaddress +import sys from functools import lru_cache from pathlib import Path @@ -13,7 +14,11 @@ def main(): """ The main effort is done by https://github.com/nbuchwitz/nc_dnsapi """ - cfg_dir = Path('cfg') + if len(sys.argv) > 1: + cfg_dir = Path(sys.argv[1]) + else: + cfg_dir = Path('/etc/netcup-dns') + if not cfg_dir.exists(): raise Exception(f'The config directory is missing: {cfg_dir}')