Automatically restart dnscrypt-proxy2 after pppoe reconnect

Hi all! Could you help me with a problem? I noticed that after my router reconnects through pppoe (ISP triggers this once a week), dnscrypt stops to work - cannot connect to any webpages. However, if I restart dnscrypt, connectivity is ok again.

Is there a simple script I can use that triggers a restart of dnscrypt after pppoe reconnect?

(I don't want to wipe and re-setup my router, would a pain in the behind... I know this restart script is a band-aid, but it would suit my needs). Thanks!

1 Like

Something like this:

cat << "EOF" > /etc/hotplug.d/iface/10-fix-dnscrypt
. /lib/functions/
network_find_wan NET_IF
if [ "${ACTION}" = "ifup" -o "${ACTION}" = "ifupdate" ] \
&& [ "${INTERFACE}" = "${NET_IF}" ]
then /etc/init.d/dnscrypt-proxy restart

See also:

1 Like

Thanks so much :slight_smile:

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.