2
0
mirror of https://github.com/dnscrypt/dnscrypt-server-docker synced 2024-10-30 21:20:12 +00:00
dnscrypt-server-docker/watchdog.sh
2018-01-22 15:52:52 +01:00

17 lines
383 B
Bash
Executable File

#! /usr/bin/env bash
sleep 300
for service in unbound dnscrypt-wrapper; do
sv check "$service" || sv force-restart "$service"
done
KEYS_DIR="/opt/dnscrypt-wrapper/etc/keys"
GRACE_PERIOD=60
provider_key=$(cat "${KEYS_DIR}/public.key.txt")
provider_name=$(cat "${KEYS_DIR}/provider_name")
drill -p 443 -Q TXT "$provider_name" @127.0.0.1 || \
sv force-restart dnscrypt-wrapper