Commit bcbe624e authored by Miek Gieben's avatar Miek Gieben Committed by GitHub

Add -p for port flag (#4653)

-p is the default flag in DNS software for setting the port, we use
'dns.port' because of preventing clashes with other caddy software
users. This is no longer an issue, so we can do what we want here.

Add -p to works like -dns.port.

(this PR includes generated manpage, but that shouldn't matter too much)
Signed-off-by: default avatarMiek Gieben <miek@miek.nl>
parent 053c4d5c
...@@ -21,6 +21,7 @@ const serverType = "dns" ...@@ -21,6 +21,7 @@ const serverType = "dns"
// wise they potentially clash with other server types. // wise they potentially clash with other server types.
func init() { func init() {
flag.StringVar(&Port, serverType+".port", DefaultPort, "Default port") flag.StringVar(&Port, serverType+".port", DefaultPort, "Default port")
flag.StringVar(&Port, "p", DefaultPort, "Default port")
caddy.RegisterServerType(serverType, caddy.ServerType{ caddy.RegisterServerType(serverType, caddy.ServerType{
Directives: func() []string { return Directives }, Directives: func() []string { return Directives },
......
...@@ -24,7 +24,7 @@ Available options: ...@@ -24,7 +24,7 @@ Available options:
: specify Corefile to load, if not given CoreDNS will look for a `Corefile` in the current : specify Corefile to load, if not given CoreDNS will look for a `Corefile` in the current
directory. directory.
**-dns.port** **PORT** **-dns.port** **PORT** or **-p** **PORT**
: override default port (53) to listen on. : override default port (53) to listen on.
**-pidfile** **FILE** **-pidfile** **FILE**
......
.\" Generated by Mmark Markdown Processer - mmark.miek.nl .\" Generated by Mmark Markdown Processer - mmark.miek.nl
.TH "COREDNS" 1 "March 2021" "CoreDNS" "CoreDNS" .TH "COREDNS" 1 "May 2021" "CoreDNS" "CoreDNS"
.SH "COREDNS" .SH "COREDNS"
.PP .PP
...@@ -32,7 +32,7 @@ Available options: ...@@ -32,7 +32,7 @@ Available options:
specify Corefile to load, if not given CoreDNS will look for a \fB\fCCorefile\fR in the current specify Corefile to load, if not given CoreDNS will look for a \fB\fCCorefile\fR in the current
directory. directory.
.TP .TP
\fB-dns.port\fP \fBPORT\fP \fB-dns.port\fP \fBPORT\fP or \fB-p\fP \fBPORT\fP
override default port (53) to listen on. override default port (53) to listen on.
.TP .TP
\fB-pidfile\fP \fBFILE\fP \fB-pidfile\fP \fBFILE\fP
...@@ -58,5 +58,5 @@ Apache License 2.0 ...@@ -58,5 +58,5 @@ Apache License 2.0
.SH "SEE ALSO" .SH "SEE ALSO"
.PP .PP
Corefile(5) coredns-k8s_external(7) coredns-any(7) coredns-hosts(7) coredns-reload(7) coredns-acl(7) coredns-dnssec(7) coredns-health(7) coredns-grpc(7) coredns-sign(7) coredns-log(7) coredns-tls(7) coredns-file(7) coredns-root(7) coredns-loop(7) coredns-chaos(7) coredns-dnstap(7) coredns-pprof(7) coredns-bufsize(7) coredns-clouddns(7) coredns-loadbalance(7) coredns-cache(7) coredns-whoami(7) coredns-minimal(7) coredns-bind(7) coredns-erratic(7) coredns-auto(7) coredns-import(7) coredns-debug(7) coredns-template(7) coredns-azure(7) coredns-autopath(7) coredns-kubernetes(7) coredns-forward(7) coredns-nsid(7) coredns-secondary(7) coredns-route53(7) coredns-local(7) coredns-errors(7) coredns-transfer(7) coredns-ready(7) coredns-metadata(7) coredns-rewrite(7) coredns-metrics(7) coredns-dns64(7) coredns-etcd(7) coredns-cancel(7) coredns-trace(7). Corefile(5) coredns-k8s_external(7) coredns-any(7) coredns-hosts(7) coredns-acl(7) coredns-dnssec(7) coredns-health(7) coredns-grpc(7) coredns-sign(7) coredns-log(7) coredns-tls(7) coredns-file(7) coredns-root(7) coredns-loop(7) coredns-chaos(7) coredns-dnstap(7) coredns-pprof(7) coredns-bufsize(7) coredns-clouddns(7) coredns-loadbalance(7) coredns-cache(7) coredns-whoami(7) coredns-minimal(7) coredns-dns64(7) coredns-erratic(7) coredns-auto(7) coredns-import(7) coredns-debug(7) coredns-template(7) coredns-azure(7) coredns-autopath(7) coredns-kubernetes(7) coredns-forward(7) coredns-nsid(7) coredns-secondary(7) coredns-route53(7) coredns-local(7) coredns-bind(7) coredns-errors(7) coredns-transfer(7) coredns-ready(7) coredns-reload(7) coredns-rewrite(7) coredns-metrics(7) coredns-metadata(7) coredns-etcd(7) coredns-cancel(7) coredns-trace(7).
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