#!/bin/sh

AdGuardHome_enable=$(uci get AdGuardHome.AdGuardHome.enabled)
redirect=$(uci get AdGuardHome.AdGuardHome.redirect)

if [ $AdGuardHome_enable -eq 1 -a "$redirect" == "redirect" ]; then
	/etc/init.d/AdGuardHome do_redirect 1
fi
