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.

66 lines
2.3 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_TOTAL_CONF=$UB_VARDIR/unbound.conf
  22. UB_CORE_CONF=$UB_VARDIR/server.conf.tmp
  23. UB_HOST_CONF=$UB_VARDIR/host.conf.tmp
  24. UB_DHCP_CONF=$UB_VARDIR/dhcp.conf
  25. UB_ZONE_CONF=$UB_VARDIR/zone.conf.tmp
  26. UB_CTRL_CONF=$UB_VARDIR/ctrl.conf.tmp
  27. UB_SRVMASQ_CONF=$UB_VARDIR/dnsmasq_srv.conf.tmp
  28. UB_EXTMASQ_CONF=$UB_VARDIR/dnsmasq_ext.conf.tmp
  29. UB_SRV_CONF=$UB_VARDIR/unbound_srv.conf
  30. UB_EXT_CONF=$UB_VARDIR/unbound_ext.conf
  31. # TLS keys
  32. UB_TLS_KEY_FILE="TLS server UCI not implemented"
  33. UB_TLS_PEM_FILE="TLS server UCI not implemented"
  34. UB_TLS_FWD_FILE=$UB_VARDIR/ca-certificates.crt
  35. UB_TLS_ETC_FILE=/etc/ssl/certs/ca-certificates.crt
  36. # start files
  37. UB_RKEY_FILE=$UB_VARDIR/root.key
  38. UB_RHINT_FILE=$UB_VARDIR/root.hints
  39. UB_TIME_FILE=$UB_VARDIR/hotplug.time
  40. UB_SKIP_FILE=$UB_VARDIR/skip.time
  41. # control app keys
  42. UB_CTLKEY_FILE=$UB_VARDIR/unbound_control.key
  43. UB_CTLPEM_FILE=$UB_VARDIR/unbound_control.pem
  44. UB_SRVKEY_FILE=$UB_VARDIR/unbound_server.key
  45. UB_SRVPEM_FILE=$UB_VARDIR/unbound_server.pem
  46. # similar default SOA / NS RR as Unbound uses for private ARPA zones
  47. UB_XSER=$(( $( date +%s ) / 60 ))
  48. UB_XSOA="7200 IN SOA localhost. nobody.invalid. $UB_XSER 3600 1200 9600 300"
  49. UB_XNS="7200 IN NS localhost."
  50. UB_XTXT="7200 IN TXT \"comment=local intranet dns zone\""
  51. UB_MTXT="7200 IN TXT \"comment=masked internet dns zone\""
  52. UB_LTXT="7200 IN TXT \"comment=rfc6762 multicast dns zone\""
  53. # helper apps
  54. UB_ANCHOR=/usr/sbin/unbound-anchor
  55. UB_CONTROL=/usr/sbin/unbound-control
  56. UB_CONTROL_CFG="$UB_CONTROL -c $UB_TOTAL_CONF"
  57. ##############################################################################