]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
move config file, add dist script
authorbert hubert <bert.hubert@netherlabs.nl>
Thu, 26 Feb 2015 19:33:19 +0000 (20:33 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Thu, 26 Feb 2015 19:33:19 +0000 (20:33 +0100)
pdns/Makefile.am
pdns/README-dnsdist.md
pdns/dnsdist.cc
pdns/package-dnsdist [new file with mode: 0644]

index 4299d42164bf878d9fb54b164c2618de9379b918..fd9bebfefb4b4cd6e0a7e7de57eec592158428a4 100644 (file)
@@ -585,7 +585,7 @@ dnsdist_LDFLAGS = \
        $(BOOST_PROGRAM_OPTIONS_LDFLAGS)
 
 dnsdist_LDADD = \
-       $(POLARSSL_LIBS) -lreadline -lrt \
+       $(POLARSSL_LIBS) -lreadline -lrt -ltermcap \
        $(BOOST_PROGRAM_OPTIONS_LIBS) $(LUA_LIBS) ${libsodium_LIBS}
 
 nsec3dig_SOURCES = \
index 0cf31a25e607db66f30b9585a84466000946da35..ab5be849dd61813fb3206003ddfef93a781e1cf1 100644 (file)
@@ -18,7 +18,7 @@ interface.
 Here is a minimal configuration:
 
 ```
-$ cat dnsdistconf.lua
+$ cat /etc/dnsdist.conf
 newServer2 {address="2001:4860:4860::8888", qps=1}
 newServer2 {address="2001:4860:4860::8844", qps=1} 
 newServer2 {address="2620:0:ccc::2", qps=10}
index 18d13d333eaa2e9fb7bb60895f0fcac50dfac203..f0c2b668fd27c15fc098601a49240450b1bce2ce 100644 (file)
@@ -909,6 +909,8 @@ void setupLua(bool client)
   g_lua.registerMember("upstatus", &DownstreamState::upStatus);
 
   std::ifstream ifs(g_vm["config"].as<string>());
+  if(!ifs) 
+    warnlog("Unable to read configuration from %s", g_vm["config"].as<string>());
 
   g_lua.registerFunction("tostring", &ComboAddress::toString);
 
@@ -1115,7 +1117,7 @@ try
   po::options_description desc("Allowed options"), hidden, alloptions;
   desc.add_options()
     ("help,h", "produce help message")
-    ("config", po::value<string>()->default_value("dnsdistconf.lua"), "Filename with our configuration")
+    ("config", po::value<string>()->default_value("/etc/dnsdist.conf"), "Filename with our configuration")
     ("client", "be a client")
     ("daemon", po::value<bool>()->default_value(true), "run in background")
     ("local", po::value<vector<string> >(), "Listen on which addresses")
diff --git a/pdns/package-dnsdist b/pdns/package-dnsdist
new file mode 100644 (file)
index 0000000..2763976
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+make dnsdist
+rm -rf dist
+mkdir -p dist/usr/sbin/
+mkdir -p dist/etc/
+cp dnsdistconf.lua dist/etc/dnsdist.conf
+
+fpm -s dir -f -t rpm -n dnsdist -v 0.1 -C dist .
+fpm -s dir -f -t deb -n dnsdist -v 0.1 -C dist .    
+rm -rf dist