Skip to content
Snippets Groups Projects
Commit f38991c8 authored by Ondřej Surý's avatar Ondřej Surý
Browse files

Autogenerate and install default configuration file

parent 2d14805c
No related branches found
No related tags found
No related merge requests found
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
AC_CONFIG_FILES([Makefile
libknot/Makefile
samples/Makefile
src/Makefile])
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; }
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment