Open zhangguanzhang opened 2 years ago
开调试是执行 /etc/init.d/AdGuardHome reload
报的错
hack下后,编译出来的ipk文件就能解决
if [ -d feeds/others/luci-app-adguardhome ];then
sed -i '/configpath/s#/etc/AdGuardHome.yaml#/etc/config/AdGuardHome.yaml#' feeds/others/luci-app-adguardhome/root/etc/config/AdGuardHome
fi
# https://github.com/rufengsuixing/luci-app-adguardhome/issues/130
SED_NUM=$(awk '/^start_service/,/configpath/{a=NR}END{print a}' feeds/others/luci-app-adguardhome/root/etc/init.d/AdGuardHome)
sed -i "$SED_NUM"'a [ ! -f "${configpath}" ] && cp /usr/share/AdGuardHome/AdGuardHome_template.yaml ${configpath}' feeds/others/luci-app-adguardhome/root/etc/init.d/AdGuardHome
卸载也会报错 Command failed: Not found
root@OpenWrt:~# opkg remove luci-app-adguardhome
Removing package luci-app-adguardhome from root...
AdGuardHome service disabled
AdGuardHome service disabled
Not deleting modified conffile /etc/config/AdGuardHome.
do you find solution? I also have the same problem
sed -i '/configpath/s#/etc/AdGuardHome.yaml#/etc/config/AdGuardHome.yaml#' feeds/others/luci-app-adguardhome/root/etc/config/AdGuardHome
try this command
SED_NUM=$(awk '/^start_service/,/configpath/{a=NR}END{print a}' /etc/init.d/AdGuardHome)
sed -i "$SED_NUM"'a [ ! -f "${configpath}" ] && cp /usr/share/AdGuardHome/AdGuardHome_template.yaml ${configpath}' /etc/init.d/AdGuardHome