Skip to content

Commit 89fdd6a

Browse files
committed
fixup! manager: files: watchdog: added RPZ files
1 parent 3db9d05 commit 89fdd6a

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

tests/packaging/interactive/rpz_watchdog.sh

+18-7
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,22 @@ set -e
44

55
gitroot=$(git rev-parse --show-toplevel)
66
rpz_file=$gitroot/example.rpz
7-
rpz_conf="[{ 'file': '$rpz_file' }]"
87

9-
rpz_conf=$(cat <<EOF
10-
{ "rpz": [
11-
{ "file": "$rpz_file" }
12-
]}
8+
conf=$(cat <<EOF
9+
rundir: /run/knot-resolver
10+
workers: 2
11+
cache:
12+
storage: /var/cache/knot-resolver
13+
logging:
14+
level: info
15+
network:
16+
listen:
17+
- interface: 127.0.0.1@53
18+
management:
19+
unix-socket: /run/knot-resolver/kres-api.sock
20+
local-data:
21+
rpz:
22+
- file: $rpz_file
1323
EOF
1424
)
1525

@@ -23,7 +33,8 @@ EOF
2333
echo "$rpz_example" >> $rpz_file
2434

2535
# configure RPZ file
26-
kresctl config set -p /local-data "$rpz_conf"
36+
echo "$conf" > /etc/knot-resolver/config.yaml
37+
kresctl reload
2738
if [ "$?" -ne "0" ]; then
2839
echo "Could not set RPZ."
2940
exit 1
@@ -37,7 +48,7 @@ function count_reloads(){
3748
echo "$(journalctl -u knot-resolver.service | grep -c "Policy rules reloaded")"
3849
}
3950

40-
# test that files watchdog is turned off
51+
# test that RPZ watchdog is turned off
4152
# {{
4253

4354
err_count=$(count_errors)

0 commit comments

Comments
 (0)