File: run

package info (click to toggle)
knot-resolver 6.0.17-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 16,376 kB
  • sloc: javascript: 42,732; ansic: 40,311; python: 12,580; cpp: 2,121; sh: 1,988; xml: 193; makefile: 181
file content (35 lines) | stat: -rwxr-xr-x 982 bytes parent folder | download
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
29
30
31
32
33
34
35
#!/usr/bin/env bash

# ensure consistent behaviour
src_dir="$(dirname "$(realpath "$0")")"
source $src_dir/utils/_env.sh

echo
ninja_dev_install
echo

echo ------------------------------------
echo Creating missing runtime directories
echo ------------------------------------
mkdir -vp $KRES_DEV_INSTALL_DIR/run/knot-resolver $KRES_DEV_INSTALL_DIR/var/cache/knot-resolver
echo
echo ---------------------------------------
echo Building Python komponents using Poetry
echo ---------------------------------------
poetry build
# copy native modules from build directory to source directory
shopt -s globstar
shopt -s nullglob
for d in build/lib*; do
    for f in "python/$d/"**/*.so; do
        cp -v "$f" ${f#"python/$d/"}
    done
done
shopt -u globstar
shopt -u nullglob

echo
echo --------------------------------------
echo Starting Knot Resolver wit the Manager
echo --------------------------------------
python3 -m knot_resolver.manager --config "$KRES_DEV_CONFIG_FILE" "$@"