You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
2.4 KiB

  1. #!/bin/sh
  2. ##############################################################################
  3. #
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License version 2 as
  6. # published by the Free Software Foundation.
  7. #
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. # GNU General Public License for more details.
  12. #
  13. # Copyright (C) 2016 Eric Luehrsen
  14. #
  15. ##############################################################################
  16. # where are we?
  17. UB_LIBDIR=/usr/lib/unbound
  18. UB_VARDIR=/var/lib/unbound
  19. UB_PIDFILE=/var/run/unbound.pid
  20. # conf deconstructed
  21. UB_CORE_CONF=$UB_VARDIR/server.conf.tmp
  22. UB_HOST_CONF=$UB_VARDIR/host.conf.tmp
  23. UB_ZONE_CONF=$UB_VARDIR/zone.conf.tmp
  24. UB_CTRL_CONF=$UB_VARDIR/ctrl.conf.tmp
  25. UB_SRVMASQ_CONF=$UB_VARDIR/dnsmasq_srv.conf.tmp
  26. UB_EXTMASQ_CONF=$UB_VARDIR/dnsmasq_ext.conf.tmp
  27. # conf as found
  28. UB_TOTAL_CONF=$UB_VARDIR/unbound.conf
  29. UB_DHCP_CONF=$UB_VARDIR/dhcp.conf
  30. UB_SRV_CONF=$UB_VARDIR/unbound_srv.conf
  31. UB_EXT_CONF=$UB_VARDIR/unbound_ext.conf
  32. # resolver file complex
  33. UB_RESOLV_CONF=/tmp/resolv.conf
  34. UB_RESOLV_AUTO=/tmp/resolv.conf.d/resolv.conf.auto
  35. # TLS keys
  36. UB_TLS_KEY_FILE="TLS server UCI not implemented"
  37. UB_TLS_PEM_FILE="TLS server UCI not implemented"
  38. UB_TLS_FWD_FILE=$UB_VARDIR/ca-certificates.crt
  39. UB_TLS_ETC_FILE=/etc/ssl/certs/ca-certificates.crt
  40. # start files
  41. UB_RKEY_FILE=$UB_VARDIR/root.key
  42. UB_RHINT_FILE=$UB_VARDIR/root.hints
  43. UB_TIME_FILE=$UB_VARDIR/hotplug.time
  44. UB_SKIP_FILE=$UB_VARDIR/skip.time
  45. # control app keys
  46. UB_CTLKEY_FILE=$UB_VARDIR/unbound_control.key
  47. UB_CTLPEM_FILE=$UB_VARDIR/unbound_control.pem
  48. UB_SRVKEY_FILE=$UB_VARDIR/unbound_server.key
  49. UB_SRVPEM_FILE=$UB_VARDIR/unbound_server.pem
  50. # similar default SOA / NS RR as Unbound uses for private ARPA zones
  51. UB_XSER=$(( $( date +%s ) / 60 ))
  52. UB_XSOA="7200 IN SOA localhost. nobody.invalid. $UB_XSER 3600 1200 9600 300"
  53. UB_XNS="7200 IN NS localhost."
  54. UB_XTXT="7200 IN TXT \"comment=local intranet dns zone\""
  55. UB_MTXT="7200 IN TXT \"comment=masked internet dns zone\""
  56. UB_LTXT="7200 IN TXT \"comment=rfc6762 multicast dns zone\""
  57. # helper apps
  58. UB_ANCHOR=/usr/sbin/unbound-anchor
  59. UB_CONTROL=/usr/sbin/unbound-control
  60. UB_CONTROL_CFG="$UB_CONTROL -c $UB_TOTAL_CONF"
  61. ##############################################################################