Commit f38991c8 authored by Ondřej Surý's avatar Ondřej Surý

Autogenerate and install default configuration file

parent 2d14805c
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
SUBDIRS = libknot src SUBDIRS = libknot src samples
...@@ -97,5 +97,6 @@ AC_CHECK_FUNCS([gethostbyname gettimeofday memmove memset munmap regcomp select ...@@ -97,5 +97,6 @@ AC_CHECK_FUNCS([gethostbyname gettimeofday memmove memset munmap regcomp select
AC_CONFIG_FILES([Makefile AC_CONFIG_FILES([Makefile
libknot/Makefile libknot/Makefile
samples/Makefile
src/Makefile]) src/Makefile])
AC_OUTPUT AC_OUTPUT
sysconf_DATA = knotd.conf example.com.zone
edit = sed \
-e 's|@version[@]|$(PACKAGE_VERSION)|g' \
-e 's|@package[@]|$(PACKAGE_NAME)|g' \
-e 's|@localstatedir[@]|$(localstatedir)|g' \
-e 's|@prefix[@]|$(prefix)|g' \
-e 's|@sysconfdir[@]|$(sysconfdir)|g'
knotd.conf: Makefile
rm -f $@ $@.tmp
srcdir=''; \
test -f ./$@.in || srcdir=$(srcdir)/; \
$(edit) $${srcdir}$@.in >$@.tmp
mv $@.tmp $@
knotd.conf: knotd.conf.in
clean-local:
rm -f knotd.conf
system {
identity "@package@ @version@";
storage "@localstatedir@/@package@";
}
interfaces {
ipv4 { address 127.0.0.1@53; }
}
zones {
example.com {
file "@sysconfdir@/example.com.zone";
}
}
log {
syslog { any warning, error, notice; }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment