Advertisement
jackyaz

Untitled

Aug 20th, 2019
469
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.84 KB | None | 0 0
  1. #!/bin/sh
  2. CONFIG=$1
  3. source /usr/sbin/helper.sh
  4.  
  5. . /opt/share/diversion/file/post-conf.div # Added by Diversion
  6. echo $(ps | grep alternate-bf.conf | grep -v grep | cut -f1 -d" ") | while read line ; do kill $line ; done
  7.  
  8. {
  9. echo "addn-hosts=/jffs/configs/apps.hosts"
  10. echo "no-poll"
  11. echo "no-negcache"
  12. echo "cache-size=1500"
  13. echo "min-port=4096"
  14. echo "expand-hosts"
  15. echo "bogus-priv"
  16. echo "local=/mydomain/"
  17. echo "domain=mydomain"
  18. echo "addn-hosts=/etc/hosts.dnsmasq"
  19. echo "stop-dns-rebind"
  20. echo "no-dhcp-interface=br0"
  21. echo "dhcp-leasefile=/var/lib/misc/dnsmasq-bf.leases"
  22. } >> "/opt/share/diversion/.conf/alternate-bf.conf"
  23.  
  24. sed -i '/localise-queries/d' "/opt/share/diversion/.conf/alternate-bf.conf"
  25. sed -i '/dhcp-authoritative/d' "/opt/share/diversion/.conf/alternate-bf.conf"
  26.  
  27. dnsmasq -C "/opt/share/diversion/.conf/alternate-bf.conf"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement