Skip to content

Commit

Permalink
move config file, add dist script
Browse files Browse the repository at this point in the history
  • Loading branch information
ahupowerdns committed Feb 26, 2015
1 parent 3279b13 commit 1d637f6
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pdns/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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 = \
Expand Down
2 changes: 1 addition & 1 deletion pdns/README-dnsdist.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
4 changes: 3 additions & 1 deletion pdns/dnsdist.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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")
Expand Down
10 changes: 10 additions & 0 deletions pdns/package-dnsdist
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 1d637f6

Please sign in to comment.