瀏覽代碼

begin pdns

tags/v1.0.0
Robin Thoni 8 年之前
父節點
當前提交
b5a764f018
共有 8 個文件被更改,包括 636 次插入106 次删除
  1. 0
    95
      01_init.sql
  2. 11
    11
      docker-compose.yml
  3. 32
    0
      pdns/Dockerfile
  4. 518
    0
      pdns/config/pdns.conf
  5. 12
    0
      pdns/config/pdns.d/pdns.local.gpgsql.conf
  6. 28
    0
      pdns/preseed.txt
  7. 34
    0
      pdns/run.sh
  8. 1
    0
      pdns/vars-files

+ 0
- 95
01_init.sql 查看文件

@@ -1,95 +0,0 @@
1
-CREATE TABLE domains (
2
-  id                    SERIAL PRIMARY KEY,
3
-  name                  VARCHAR(255) NOT NULL,
4
-  master                VARCHAR(128) DEFAULT NULL,
5
-  last_check            INT DEFAULT NULL,
6
-  type                  VARCHAR(6) NOT NULL,
7
-  notified_serial       INT DEFAULT NULL,
8
-  account               VARCHAR(40) DEFAULT NULL,
9
-  CONSTRAINT c_lowercase_name CHECK (((name)::TEXT = LOWER((name)::TEXT)))
10
-);
11
-
12
-CREATE UNIQUE INDEX name_index ON domains(name);
13
-
14
-
15
-CREATE TABLE records (
16
-  id                    SERIAL PRIMARY KEY,
17
-  domain_id             INT DEFAULT NULL,
18
-  name                  VARCHAR(255) DEFAULT NULL,
19
-  type                  VARCHAR(10) DEFAULT NULL,
20
-  content               VARCHAR(65535) DEFAULT NULL,
21
-  ttl                   INT DEFAULT NULL,
22
-  prio                  INT DEFAULT NULL,
23
-  change_date           INT DEFAULT NULL,
24
-  disabled              BOOL DEFAULT 'f',
25
-  ordername             VARCHAR(255),
26
-  auth                  BOOL DEFAULT 't',
27
-  CONSTRAINT domain_exists
28
-  FOREIGN KEY(domain_id) REFERENCES domains(id)
29
-  ON DELETE CASCADE,
30
-  CONSTRAINT c_lowercase_name CHECK (((name)::TEXT = LOWER((name)::TEXT)))
31
-);
32
-
33
-CREATE INDEX rec_name_index ON records(name);
34
-CREATE INDEX nametype_index ON records(name,type);
35
-CREATE INDEX domain_id ON records(domain_id);
36
-CREATE INDEX recordorder ON records (domain_id, ordername text_pattern_ops);
37
-
38
-
39
-CREATE TABLE supermasters (
40
-  ip                    INET NOT NULL,
41
-  nameserver            VARCHAR(255) NOT NULL,
42
-  account               VARCHAR(40) NOT NULL,
43
-  PRIMARY KEY(ip, nameserver)
44
-);
45
-
46
-
47
-CREATE TABLE comments (
48
-  id                    SERIAL PRIMARY KEY,
49
-  domain_id             INT NOT NULL,
50
-  name                  VARCHAR(255) NOT NULL,
51
-  type                  VARCHAR(10) NOT NULL,
52
-  modified_at           INT NOT NULL,
53
-  account               VARCHAR(40) DEFAULT NULL,
54
-  comment               VARCHAR(65535) NOT NULL,
55
-  CONSTRAINT domain_exists
56
-  FOREIGN KEY(domain_id) REFERENCES domains(id)
57
-  ON DELETE CASCADE,
58
-  CONSTRAINT c_lowercase_name CHECK (((name)::TEXT = LOWER((name)::TEXT)))
59
-);
60
-
61
-CREATE INDEX comments_domain_id_idx ON comments (domain_id);
62
-CREATE INDEX comments_name_type_idx ON comments (name, type);
63
-CREATE INDEX comments_order_idx ON comments (domain_id, modified_at);
64
-
65
-
66
-CREATE TABLE domainmetadata (
67
-  id                    SERIAL PRIMARY KEY,
68
-  domain_id             INT REFERENCES domains(id) ON DELETE CASCADE,
69
-  kind                  VARCHAR(32),
70
-  content               TEXT
71
-);
72
-
73
-CREATE INDEX domainidmetaindex ON domainmetadata(domain_id);
74
-
75
-
76
-CREATE TABLE cryptokeys (
77
-  id                    SERIAL PRIMARY KEY,
78
-  domain_id             INT REFERENCES domains(id) ON DELETE CASCADE,
79
-  flags                 INT NOT NULL,
80
-  active                BOOL,
81
-  content               TEXT
82
-);
83
-
84
-CREATE INDEX domainidindex ON cryptokeys(domain_id);
85
-
86
-
87
-CREATE TABLE tsigkeys (
88
-  id                    SERIAL PRIMARY KEY,
89
-  name                  VARCHAR(255),
90
-  algorithm             VARCHAR(50),
91
-  secret                VARCHAR(255),
92
-  CONSTRAINT c_lowercase_name CHECK (((name)::TEXT = LOWER((name)::TEXT)))
93
-);
94
-
95
-CREATE UNIQUE INDEX namealgoindex ON tsigkeys(name, algorithm);

+ 11
- 11
docker-compose.yml 查看文件

@@ -27,17 +27,17 @@ services:
27 27
         env_file:
28 28
             - env
29 29
 
30
-#    pdns:
31
-#        build: ./pdns
32
-#        container_name: pdns-pdns
33
-#        networks:
34
-#            pdns.internal.docker:
35
-#                aliases:
36
-#                    - pdns.pdns.internal.docker
37
-#        ports:
38
-#            - "0.0.0.0:53:53/udp"
39
-#        env_file:
40
-#            - env
30
+    pdns:
31
+        build: ./pdns
32
+        container_name: pdns-pdns
33
+        networks:
34
+            pdns.internal.docker:
35
+                aliases:
36
+                    - pdns.pdns.internal.docker
37
+        ports:
38
+            - "0.0.0.0:53:53/udp"
39
+        env_file:
40
+            - env
41 41
 #
42 42
 #    pdns-recursor:
43 43
 #      build: ./pdns-recursor

+ 32
- 0
pdns/Dockerfile 查看文件

@@ -0,0 +1,32 @@
1
+FROM debian:jessie
2
+
3
+MAINTAINER Robin Thoni <robin@rthoni.com>
4
+
5
+COPY ./preseed.txt /tmp/preseed.txt
6
+
7
+RUN debconf-set-selections /tmp/preseed.txt
8
+
9
+RUN DEBIAN_FRONTEND=noninteractive apt-get update &&\
10
+    apt-get install -y pdns-server pdns-backend-pgsql rsyslog &&\
11
+    apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
12
+
13
+RUN rm -rf /etc/powerdns/*
14
+
15
+RUN rm -rf /var/log/* &&\
16
+    mkfifo /var/log/mail.info &&\
17
+    ln -s /dev/null /var/log/mail.log &&\
18
+    ln -s /dev/stderr /var/log/mail.err &&\
19
+    ln -s /dev/null /var/log/syslog &&\
20
+    ln -s /dev/null /var/log/messages
21
+
22
+COPY ./config/ /etc/powerdns/
23
+
24
+COPY ./vars-vars /etc/vars-vars
25
+
26
+COPY ./vars-files /etc/vars-files
27
+
28
+COPY ./run.sh /run.sh
29
+
30
+EXPOSE 53/udp
31
+
32
+CMD ["/run.sh"]

+ 518
- 0
pdns/config/pdns.conf 查看文件

@@ -0,0 +1,518 @@
1
+#################################
2
+# allow-axfr-ips	Allow zonetransfers only to these subnets
3
+#
4
+allow-axfr-ips=10.15.42.0/24
5
+
6
+#################################
7
+# allow-dnsupdate-from	A global setting to allow DNS updates from these IP ranges.
8
+#
9
+# allow-dnsupdate-from=127.0.0.0/8,::1
10
+
11
+#################################
12
+# allow-recursion	List of subnets that are allowed to recurse
13
+#
14
+allow-recursion=178.170.0.0/16,127.0.0.1,213.246.52.61,52.28.227.93,52.58.80.7,10.15.42.0/24,10.8.0.0/24
15
+
16
+#################################
17
+# also-notify	When notifying a domain, also notify these nameservers
18
+#
19
+also-notify=10.15.42.6,10.15.42.15,10.15.42.16,10.15.42.17,10.15.42.18
20
+
21
+#################################
22
+# any-to-tcp	Answer ANY queries with tc=1, shunting to TCP
23
+#
24
+# any-to-tcp=no
25
+
26
+#################################
27
+# cache-ttl	Seconds to store packets in the PacketCache
28
+#
29
+# cache-ttl=20
30
+
31
+#################################
32
+# carbon-interval	Number of seconds between carbon (graphite) updates
33
+#
34
+# carbon-interval=30
35
+
36
+#################################
37
+# carbon-ourname	If set, overrides our reported hostname for carbon stats
38
+#
39
+# carbon-ourname=
40
+
41
+#################################
42
+# carbon-server	If set, send metrics in carbon (graphite) format to this server
43
+#
44
+# carbon-server=
45
+
46
+#################################
47
+# chroot	If set, chroot to this directory for more security
48
+#
49
+# chroot=
50
+
51
+#################################
52
+# config-dir	Location of configuration directory (pdns.conf)
53
+#
54
+config-dir=/etc/powerdns
55
+
56
+#################################
57
+# config-name	Name of this virtual configuration - will rename the binary image
58
+#
59
+# config-name=
60
+
61
+#################################
62
+# control-console	Debugging switch - don't use
63
+#
64
+# control-console=no
65
+
66
+#################################
67
+# daemon	Operate as a daemon
68
+#
69
+daemon=yes
70
+
71
+#################################
72
+# default-ksk-algorithms	Default KSK algorithms
73
+#
74
+# default-ksk-algorithms=rsasha256
75
+
76
+#################################
77
+# default-ksk-size	Default KSK size (0 means default)
78
+#
79
+# default-ksk-size=0
80
+
81
+#################################
82
+# default-soa-mail	mail address to insert in the SOA record if none set in the backend
83
+#
84
+# default-soa-mail=
85
+
86
+#################################
87
+# default-soa-name	name to insert in the SOA record if none set in the backend
88
+#
89
+# default-soa-name=a.misconfigured.powerdns.server
90
+
91
+#################################
92
+# default-ttl	Seconds a result is valid if not set otherwise
93
+#
94
+# default-ttl=3600
95
+
96
+#################################
97
+# default-zsk-algorithms	Default ZSK algorithms
98
+#
99
+# default-zsk-algorithms=rsasha256
100
+
101
+#################################
102
+# default-zsk-size	Default ZSK size (0 means default)
103
+#
104
+# default-zsk-size=0
105
+
106
+#################################
107
+# direct-dnskey	Fetch DNSKEY RRs from backend during DNSKEY synthesis
108
+#
109
+# direct-dnskey=no
110
+
111
+#################################
112
+# disable-axfr	Disable zonetransfers but do allow TCP queries
113
+#
114
+disable-axfr=no
115
+
116
+#################################
117
+# disable-axfr-rectify	Disable the rectify step during an outgoing AXFR. Only required for regression testing.
118
+#
119
+# disable-axfr-rectify=no
120
+
121
+#################################
122
+# disable-tcp	Do not listen to TCP queries
123
+#
124
+# disable-tcp=no
125
+
126
+#################################
127
+# distributor-threads	Default number of Distributor (backend) threads to start
128
+#
129
+# distributor-threads=3
130
+
131
+#################################
132
+# do-ipv6-additional-processing	Do AAAA additional processing
133
+#
134
+# do-ipv6-additional-processing=yes
135
+
136
+#################################
137
+# edns-subnet-processing	If we should act on EDNS Subnet options
138
+#
139
+# edns-subnet-processing=no
140
+
141
+#################################
142
+# entropy-source	If set, read entropy from this file
143
+#
144
+# entropy-source=/dev/urandom
145
+
146
+#################################
147
+# experimental-api-key	REST API Static authentication key (required for API use)
148
+#
149
+# experimental-api-key=
150
+
151
+#################################
152
+# experimental-api-readonly	If the JSON API should disallow data modification
153
+#
154
+# experimental-api-readonly=no
155
+
156
+#################################
157
+# experimental-dname-processing	If we should support DNAME records
158
+#
159
+# experimental-dname-processing=no
160
+
161
+#################################
162
+# experimental-dnsupdate	Enable/Disable DNS update (RFC2136) support. Default is no.
163
+#
164
+# experimental-dnsupdate=no
165
+
166
+#################################
167
+# experimental-json-interface	If the webserver should serve JSON data
168
+#
169
+# experimental-json-interface=no
170
+
171
+#################################
172
+# experimental-logfile	Filename of the log file for JSON parser
173
+#
174
+# experimental-logfile=/var/log/pdns.log
175
+
176
+#################################
177
+# forward-dnsupdate	A global setting to allow DNS update packages that are for a Slave domain, to be forwarded to the master.
178
+#
179
+# forward-dnsupdate=yes
180
+
181
+#################################
182
+# guardian	Run within a guardian process
183
+#
184
+guardian=yes
185
+
186
+#################################
187
+# include-dir	Include *.conf files from this directory
188
+#
189
+# include-dir=
190
+include-dir=/etc/powerdns/pdns.d
191
+
192
+#################################
193
+# launch	Which backends to launch and order to query them in
194
+#
195
+# launch=
196
+launch=gpgsql
197
+
198
+#################################
199
+# load-modules	Load this module - supply absolute or relative path
200
+#
201
+# load-modules=
202
+
203
+#################################
204
+# local-address	Local IP addresses to which we bind
205
+#
206
+local-address=0.0.0.0
207
+
208
+#################################
209
+# local-address-nonexist-fail	Fail to start if one or more of the local-address's do not exist on this server
210
+#
211
+# local-address-nonexist-fail=yes
212
+
213
+#################################
214
+# local-ipv6	Local IP address to which we bind
215
+#
216
+# local-ipv6=
217
+
218
+#################################
219
+# local-ipv6-nonexist-fail	Fail to start if one or more of the local-ipv6 addresses do not exist on this server
220
+#
221
+# local-ipv6-nonexist-fail=yes
222
+
223
+#################################
224
+# local-port	The port on which we listen
225
+#
226
+# local-port=53
227
+
228
+#################################
229
+# log-dns-details	If PDNS should log DNS non-erroneous details
230
+#
231
+# log-dns-details=no
232
+
233
+#################################
234
+# log-dns-queries	If PDNS should log all incoming DNS queries
235
+#
236
+# log-dns-queries=no
237
+
238
+#################################
239
+# logging-facility	Log under a specific facility
240
+#
241
+# logging-facility=
242
+
243
+#################################
244
+# loglevel	Amount of logging. Higher is more. Do not set below 3
245
+#
246
+# loglevel=4
247
+
248
+#################################
249
+# lua-prequery-script	Lua script with prequery handler
250
+#
251
+# lua-prequery-script=
252
+
253
+#################################
254
+# master	Act as a master
255
+#
256
+master=yes
257
+
258
+#################################
259
+# max-cache-entries	Maximum number of cache entries
260
+#
261
+# max-cache-entries=1000000
262
+
263
+#################################
264
+# max-ent-entries	Maximum number of empty non-terminals in a zone
265
+#
266
+# max-ent-entries=100000
267
+
268
+#################################
269
+# max-nsec3-iterations	Limit the number of NSEC3 hash iterations
270
+#
271
+# max-nsec3-iterations=500
272
+
273
+#################################
274
+# max-queue-length	Maximum queuelength before considering situation lost
275
+#
276
+# max-queue-length=5000
277
+
278
+#################################
279
+# max-signature-cache-entries	Maximum number of signatures cache entries
280
+#
281
+# max-signature-cache-entries=
282
+
283
+#################################
284
+# max-tcp-connections	Maximum number of TCP connections
285
+#
286
+# max-tcp-connections=10
287
+
288
+#################################
289
+# module-dir	Default directory for modules
290
+#
291
+# module-dir=/usr/lib/TRIPLET/pdns
292
+
293
+#################################
294
+# negquery-cache-ttl	Seconds to store negative query results in the QueryCache
295
+#
296
+# negquery-cache-ttl=60
297
+
298
+#################################
299
+# no-shuffle	Set this to prevent random shuffling of answers - for regression testing
300
+#
301
+# no-shuffle=off
302
+
303
+#################################
304
+# only-notify	Only send AXFR NOTIFY to these IP addresses or netmasks
305
+#
306
+# only-notify=0.0.0.0/0,::/0
307
+
308
+#################################
309
+# out-of-zone-additional-processing	Do out of zone additional processing
310
+#
311
+# out-of-zone-additional-processing=yes
312
+
313
+#################################
314
+# overload-queue-length	Maximum queuelength moving to packetcache only
315
+#
316
+# overload-queue-length=0
317
+
318
+#################################
319
+# pipebackend-abi-version	Version of the pipe backend ABI
320
+#
321
+# pipebackend-abi-version=1
322
+
323
+#################################
324
+# prevent-self-notification	Don't send notifications to what we think is ourself
325
+#
326
+# prevent-self-notification=yes
327
+
328
+#################################
329
+# query-cache-ttl	Seconds to store query results in the QueryCache
330
+#
331
+# query-cache-ttl=20
332
+
333
+#################################
334
+# query-local-address	Source IP address for sending queries
335
+#
336
+# query-local-address=0.0.0.0
337
+
338
+#################################
339
+# query-local-address6	Source IPv6 address for sending queries
340
+#
341
+# query-local-address6=::
342
+
343
+#################################
344
+# query-logging	Hint backends that queries should be logged
345
+#
346
+# query-logging=no
347
+
348
+#################################
349
+# queue-limit	Maximum number of milliseconds to queue a query
350
+#
351
+# queue-limit=1500
352
+
353
+#################################
354
+# receiver-threads	Default number of receiver threads to start
355
+#
356
+# receiver-threads=1
357
+
358
+#################################
359
+# recursive-cache-ttl	Seconds to store packets for recursive queries in the PacketCache
360
+#
361
+# recursive-cache-ttl=10
362
+
363
+#################################
364
+# recursor	If recursion is desired, IP address of a recursing nameserver
365
+#
366
+recursor=127.0.0.1:54
367
+
368
+#################################
369
+# retrieval-threads	Number of AXFR-retrieval threads for slave operation
370
+#
371
+# retrieval-threads=2
372
+
373
+#################################
374
+# reuseport	Enable higher performance on compliant kernels by using SO_REUSEPORT allowing each receiver thread to open its own socket
375
+#
376
+# reuseport=no
377
+
378
+#################################
379
+# security-poll-suffix	Domain name from which to query security update notifications
380
+#
381
+# security-poll-suffix=secpoll.powerdns.com.
382
+
383
+#################################
384
+# send-root-referral	Send out old-fashioned root-referral instead of ServFail in case of no authority
385
+#
386
+# send-root-referral=no
387
+
388
+#################################
389
+# server-id	Returned when queried for 'server.id' TXT or NSID, defaults to hostname - disabled or custom
390
+#
391
+# server-id=
392
+
393
+#################################
394
+# setgid	If set, change group id to this gid for more security
395
+#
396
+setgid=pdns
397
+
398
+#################################
399
+# setuid	If set, change user id to this uid for more security
400
+#
401
+setuid=pdns
402
+
403
+#################################
404
+# signing-threads	Default number of signer threads to start
405
+#
406
+# signing-threads=3
407
+
408
+#################################
409
+# slave	Act as a slave
410
+#
411
+# slave=no
412
+
413
+#################################
414
+# slave-cycle-interval	Reschedule failed SOA serial checks once every .. seconds
415
+#
416
+# slave-cycle-interval=60
417
+
418
+#################################
419
+# slave-renotify	If we should send out notifications for slaved updates
420
+#
421
+# slave-renotify=no
422
+
423
+#################################
424
+# soa-expire-default	Default SOA expire
425
+#
426
+# soa-expire-default=604800
427
+
428
+#################################
429
+# soa-minimum-ttl	Default SOA minimum ttl
430
+#
431
+# soa-minimum-ttl=3600
432
+
433
+#################################
434
+# soa-refresh-default	Default SOA refresh
435
+#
436
+# soa-refresh-default=10800
437
+
438
+#################################
439
+# soa-retry-default	Default SOA retry
440
+#
441
+# soa-retry-default=3600
442
+
443
+#################################
444
+# socket-dir	Where the controlsocket will live
445
+#
446
+# socket-dir=/var/run
447
+
448
+#################################
449
+# tcp-control-address	If set, PowerDNS can be controlled over TCP on this address
450
+#
451
+# tcp-control-address=
452
+
453
+#################################
454
+# tcp-control-port	If set, PowerDNS can be controlled over TCP on this address
455
+#
456
+# tcp-control-port=53000
457
+
458
+#################################
459
+# tcp-control-range	If set, remote control of PowerDNS is possible over these networks only
460
+#
461
+# tcp-control-range=127.0.0.0/8, 10.0.0.0/8, 192.168.0.0/16, 172.16.0.0/12, ::1/128, fe80::/10
462
+
463
+#################################
464
+# tcp-control-secret	If set, PowerDNS can be controlled over TCP after passing this secret
465
+#
466
+# tcp-control-secret=
467
+
468
+#################################
469
+# traceback-handler	Enable the traceback handler (Linux only)
470
+#
471
+# traceback-handler=yes
472
+
473
+#################################
474
+# trusted-notification-proxy	IP address of incoming notification proxy
475
+#
476
+# trusted-notification-proxy=
477
+
478
+#################################
479
+# udp-truncation-threshold	Maximum UDP response size before we truncate
480
+#
481
+# udp-truncation-threshold=1680
482
+
483
+#################################
484
+# version-string	PowerDNS version in packets - full, anonymous, powerdns or custom
485
+#
486
+# version-string=full
487
+
488
+#################################
489
+# webserver	Start a webserver for monitoring
490
+#
491
+# webserver=no
492
+
493
+#################################
494
+# webserver-address	IP Address of webserver to listen on
495
+#
496
+# webserver-address=127.0.0.1
497
+
498
+#################################
499
+# webserver-allow-from	Webserver access is only allowed from these subnets
500
+#
501
+# webserver-allow-from=0.0.0.0/0,::/0
502
+
503
+#################################
504
+# webserver-password	Password required for accessing the webserver
505
+#
506
+# webserver-password=
507
+
508
+#################################
509
+# webserver-port	Port of webserver to listen on
510
+#
511
+# webserver-port=8081
512
+
513
+#################################
514
+# webserver-print-arguments	If the webserver should print arguments
515
+#
516
+# webserver-print-arguments=no
517
+
518
+

+ 12
- 0
pdns/config/pdns.d/pdns.local.gpgsql.conf 查看文件

@@ -0,0 +1,12 @@
1
+# PostgreSQL Configuration
2
+#
3
+# Launch gpgsql backend
4
+launch+=gpgsql
5
+
6
+# gpgsql parameters
7
+gpgsql-host=POSTGRES_HOST
8
+gpgsql-port=
9
+gpgsql-dbname=POSTGRES_DB
10
+gpgsql-user=POSTGRES_USER
11
+gpgsql-password=POSTGRES_PASSWORD
12
+gpgsql-dnssec=yes

+ 28
- 0
pdns/preseed.txt 查看文件

@@ -0,0 +1,28 @@
1
+pdns-backend-pgsql  pdns-backend-pgsql/app-password-confirm password  
2
+pdns-backend-pgsql  pdns-backend-pgsql/password-confirm password  
3
+pdns-backend-pgsql  pdns-backend-pgsql/pgsql/admin-pass password  
4
+pdns-backend-pgsql  pdns-backend-pgsql/pgsql/app-pass password  
5
+pdns-backend-pgsql  pdns-backend-pgsql/dbconfig-upgrade boolean true
6
+pdns-backend-pgsql  pdns-backend-pgsql/remote/port  string  
7
+pdns-backend-pgsql  pdns-backend-pgsql/dbconfig-reinstall boolean false
8
+pdns-backend-pgsql  pdns-backend-pgsql/pgsql/authmethod-user  select  
9
+pdns-backend-pgsql  pdns-backend-pgsql/purge  boolean false
10
+pdns-backend-pgsql  pdns-backend-pgsql/upgrade-error  select  abort
11
+pdns-backend-pgsql  pdns-backend-pgsql/dbconfig-install boolean false
12
+pdns-backend-pgsql  pdns-backend-pgsql/db/app-user  string  pdns
13
+pdns-backend-pgsql  pdns-backend-pgsql/remote/newhost string  
14
+pdns-backend-pgsql  pdns-backend-pgsql/pgsql/manualconf note  
15
+pdns-backend-pgsql  pdns-backend-pgsql/remote/host  select  
16
+pdns-backend-pgsql  pdns-backend-pgsql/pgsql/admin-user string  postgres
17
+pdns-backend-pgsql  pdns-backend-pgsql/database-type  select  pgsql
18
+pdns-backend-pgsql  pdns-backend-pgsql/upgrade-backup boolean true
19
+pdns-backend-pgsql  pdns-backend-pgsql/internal/skip-preseed  boolean true
20
+pdns-backend-pgsql  pdns-backend-pgsql/remove-error select  abort
21
+pdns-backend-pgsql  pdns-backend-pgsql/missing-db-package-error select  abort
22
+pdns-backend-pgsql  pdns-backend-pgsql/pgsql/changeconf boolean false
23
+pdns-backend-pgsql  pdns-backend-pgsql/dbconfig-remove  boolean 
24
+pdns-backend-pgsql  pdns-backend-pgsql/pgsql/method select  unix socket
25
+pdns-backend-pgsql  pdns-backend-pgsql/pgsql/authmethod-admin select  ident
26
+pdns-backend-pgsql  pdns-backend-pgsql/install-error  select  abort
27
+pdns-backend-pgsql  pdns-backend-pgsql/internal/reconfiguring boolean false
28
+pdns-backend-pgsql  pdns-backend-pgsql/db/dbname  string  pdns

+ 34
- 0
pdns/run.sh 查看文件

@@ -0,0 +1,34 @@
1
+#! /usr/bin/env bash
2
+
3
+replace_var()
4
+{
5
+  file="${1}"
6
+  var="${2}"
7
+  sed -e "s?${var}?${!var}?g" -i "${file}"
8
+}
9
+
10
+replace_vars()
11
+{
12
+  file="${1}"
13
+  for var in $(cat /etc/vars-vars)
14
+  do
15
+    replace_var "${file}" "${var}"
16
+  done
17
+}
18
+
19
+replace_files()
20
+{
21
+  for file in $(cat /etc/vars-files)
22
+  do
23
+    replace_vars "${file}"
24
+  done
25
+}
26
+
27
+replace_files
28
+
29
+
30
+rm -f /var/run/rsyslogd.pid
31
+service rsyslog start &&
32
+service pdns start &&
33
+
34
+sleep 3600

+ 1
- 0
pdns/vars-files 查看文件

@@ -0,0 +1 @@
1
+/etc/powerdns/pdns.d/pdns.local.gpgsql.conf

Loading…
取消
儲存