2017-04-27 07:03:55 +00:00
|
|
|
#! /usr/bin/env bash
|
2015-07-05 23:39:54 +00:00
|
|
|
|
2015-08-08 22:15:48 +00:00
|
|
|
sleep 300
|
2015-07-05 23:39:54 +00:00
|
|
|
|
|
|
|
for service in unbound dnscrypt-wrapper; do
|
|
|
|
sv check "$service" || sv force-restart "$service"
|
|
|
|
done
|
|
|
|
|
|
|
|
KEYS_DIR="/opt/dnscrypt-wrapper/etc/keys"
|
2015-08-08 22:15:48 +00:00
|
|
|
GRACE_PERIOD=60
|
2015-07-05 23:39:54 +00:00
|
|
|
|
|
|
|
provider_key=$(cat "${KEYS_DIR}/public.key.txt")
|
|
|
|
provider_name=$(cat "${KEYS_DIR}/provider_name")
|
|
|
|
|
2018-01-22 14:52:52 +00:00
|
|
|
drill -p 443 -Q TXT "$provider_name" @127.0.0.1 || \
|
2015-07-05 23:39:54 +00:00
|
|
|
sv force-restart dnscrypt-wrapper
|