0
0
mirror of https://github.com/openwrt/packages.git synced 2025-01-31 03:41:44 +00:00
packages/net/safe-search/files/safe-search.defaults
Daniel Golle 0edb2cccb8 safe-search: fix use with dnsmasq in ujail
The safe-search package creates symlinks in a configured additional
hosts directory. The link targets are inside another directory which
has to be made available to dnsmasq as well.
Now that support for adding additional paths to dnsmasq was added by
commit openwrt/openwrt@aa12a0fdd1
implement adding this path using the existing uci-defaults script.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-01-14 01:47:32 +00:00

17 lines
558 B
Bash

#!/bin/sh
#
# Copyright (c) 2021 Gregory L. Dietsche <Gregory.Dietsche@cuw.edu>
# This is free software, licensed under the MIT License
#
uci del_list dhcp.@dnsmasq[0].addnhosts=/etc/safe-search/enabled
uci add_list dhcp.@dnsmasq[0].addnhosts=/etc/safe-search/enabled
uci del_list dhcp.@dnsmasq[0].addn_mount=/etc/safe-search/available
uci add_list dhcp.@dnsmasq[0].addn_mount=/etc/safe-search/available
uci commit dhcp
/usr/sbin/safe-search-maintenance
/usr/sbin/safe-search-update
#/etc/init.d/dnsmasq reload #safe-search-update does this for us.
exit 0