1
1
mirror of https://github.com/dnscrypt/dnscrypt-server-docker synced 2024-11-22 23:51:59 +01:00
dnscrypt-server-docker/watchdog.sh

16 lines
327 B
Bash
Raw Normal View History

#! /usr/bin/env bash
2015-07-06 01:39:54 +02:00
sleep 300
2015-07-06 01:39:54 +02:00
for service in unbound encrypted-dns; do
2015-07-06 01:39:54 +02:00
sv check "$service" || sv force-restart "$service"
done
KEYS_DIR="/opt/encrypted-dns/etc/keys"
GRACE_PERIOD=60
2015-07-06 01:39:54 +02:00
provider_name=$(cat "${KEYS_DIR}/provider_name")
drill -p 443 -Q TXT "$provider_name" @127.0.0.1 ||
sv force-restart encrypted-dns