mirror of
https://codeberg.org/privacy1st/netcup-dns
synced 2024-12-22 23:36:04 +01:00
feat: config directory as argument
This commit is contained in:
parent
1d01344067
commit
4e8c976eef
@ -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}')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user