2017-04-27 09:03:55 +02:00
|
|
|
#! /usr/bin/env bash
|
2015-07-06 01:39:54 +02:00
|
|
|
|
2015-08-09 00:15:48 +02:00
|
|
|
sleep 300
|
2015-07-06 01:39:54 +02:00
|
|
|
|
2019-09-22 15:38:22 +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
|
|
|
|
|
2019-09-22 15:38:22 +02:00
|
|
|
KEYS_DIR="/opt/encrypted-dns/etc/keys"
|
2015-08-09 00:15:48 +02:00
|
|
|
GRACE_PERIOD=60
|
2015-07-06 01:39:54 +02:00
|
|
|
|
|
|
|
provider_name=$(cat "${KEYS_DIR}/provider_name")
|
|
|
|
|
2019-08-05 16:13:56 +02:00
|
|
|
drill -p 443 -Q TXT "$provider_name" @127.0.0.1 ||
|
2019-09-22 15:38:22 +02:00
|
|
|
sv force-restart encrypted-dns
|