summaryrefslogtreecommitdiffstats
path: root/python/knot_resolver/constants.py
blob: e562d62539ce0cc6654d849e393ea9b6f66bf53e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import importlib.util
from pathlib import Path

VERSION = "6.0.10"
USER = "knot-resolver"
GROUP = "knot-resolver"

# dirs paths
RUN_DIR = Path("/run/knot-resolver")
ETC_DIR = Path("/etc/knot-resolver")
SBIN_DIR = Path("/usr/sbin")
CACHE_DIR = Path("/var/cache/knot-resolver")

# files paths
CONFIG_FILE = ETC_DIR / "config.yaml"
API_SOCK_FILE = RUN_DIR / "kres-api.sock"

# executables paths
KRESD_EXECUTABLE = SBIN_DIR / "kresd"
KRES_CACHE_GC_EXECUTABLE = SBIN_DIR / "kres-cache-gc"

WATCHDOG_LIB = False
if importlib.util.find_spec("watchdog"):
    WATCHDOG_LIB = True

PROMETHEUS_LIB = False
if importlib.util.find_spec("prometheus_client"):
    PROMETHEUS_LIB = True