luci-app-mosdns: Clean cache.dump
file when "Save Cache" is disabled
This commit is contained in:
parent
e138175cb4
commit
c3b7847b59
@ -64,7 +64,8 @@ init_yaml() {
|
||||
s,maximum_ttl_custom,$maximum_ttl_custom,g; \
|
||||
s,adblock,$adlist,g;s,remote_dns_pipeline,$enable_pipeline,g" \
|
||||
/usr/share/mosdns/default.yaml > $CONF
|
||||
[ "$dump_file" -eq 1 ] && sed -i "/lazy_cache_ttl/a\ dump_file: /etc/mosdns/cache.dump\n dump_interval: $dump_interval" $CONF
|
||||
[ "$dump_file" -eq 1 ] && sed -i "/lazy_cache_ttl/a\ dump_file: /etc/mosdns/cache.dump\n dump_interval: $dump_interval" $CONF || \
|
||||
\cp -a /usr/share/mosdns/cache.dump /etc/mosdns/cache.dump
|
||||
echo "${local_dns}" > $tmpdir/local_dns.txt
|
||||
echo "${remote_dns}" > $tmpdir/remote_dns.txt
|
||||
sed -i -e '/- addr: local_dns/{r '$tmpdir/local_dns.txt -e';d};/- addr: remote_dns/{r '$tmpdir/remote_dns.txt -e';d}' \
|
||||
|
Loading…
Reference in New Issue
Block a user