.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "GDNSD 8" .TH GDNSD 8 "2021-02-11" "gdnsd 2.4.3" "gdnsd" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" gdnsd \- An authoritative DNS daemon .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 10 \& Usage: gdnsd [\-fsSD] [\-c /etc/gdnsd] \& \-D \- Enable verbose debug output \& \-f \- Foreground mode for [re]start actions \& \-s \- Force \*(Aqzones_strict_startup = true\*(Aq for this invocation \& \-S \- Force \*(Aqzones_strict_data = true\*(Aq for this invocation \& \-c \- Configuration directory \& \-x \- No syslog output (must use \-f with this if [re]start) \& Actions: \& checkconf \- Checks validity of config and zone files \& start \- Start as a regular daemon \& stop \- Stops a running daemon previously started by \*(Aqstart\*(Aq \& reload\-zones \- Send SIGUSR1 to running daemon for zone data reload \& restart \- Equivalent to checkconf && stop && start, but faster \& condrestart \- Does \*(Aqrestart\*(Aq action only if already running \& try\-restart \- Aliases \*(Aqcondrestart\*(Aq \& status \- Checks the status of the running daemon .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBgdnsd\fR is very fast, light, and pluggable authoritative \s-1DNS\s0 daemon. .SH "BASIC SECURITY" .IX Header "BASIC SECURITY" When started as the \f(CW\*(C`root\*(C'\fR user, gdnsd will always attempt to drop privileges to another user, and will fail fatally if that does not succeed. The default username for this is \f(CW\*(C`gdnsd\*(C'\fR, but this can be overridden in the main config file. .SH "BASIC CONFIGURATION" .IX Header "BASIC CONFIGURATION" The primary configuration file is the file named \fIconfig\fR in the configuration directory. .PP Note that the configuration file does not have to exist for successful startup. Without a configuration file, gdnsd will load all of the zones in the zones directory and listen on port 53 of \f(CW0.0.0.0\fR and \f(CW\*(C`::\*(C'\fR using default settings. It will also, by default, automatically process changes (add/delete/update) to the set of zonefiles present in the zones directory, which defaults to the \fIzones/\fR subdirectory of the configuration directory (\f(CW\*(C`/etc/gdnsd/zones/\*(C'\fR). .SH "COMMANDLINE OPTION FLAGS" .IX Header "COMMANDLINE OPTION FLAGS" .IP "\fB\-c\fR" 4 .IX Item "-c" Set the configuration directory, defaults to \fI/etc/gdnsd\fR. .IP "\fB\-f\fR" 4 .IX Item "-f" Sets foreground mode for the start, restart, condrestart, or try-restart actions. All other actions are implicitly foreground operations and ignore this flag. When [re]starting with \f(CW\*(C`\-f\*(C'\fR, the new daemon will not use \f(CW\*(C`fork(); setsid(); fork();\*(C'\fR to detach from the terminal, and will not close default stdio descriptors or stop mirroring its log output to the stdio descriptors at runtime. Otherwise it behaves the same as an invocation without this flag. See also \f(CW\*(C`\-x\*(C'\fR regarding syslog output. .IP "\fB\-s\fR" 4 .IX Item "-s" Forces the \f(CW\*(C`zones_strict_startup\*(C'\fR configuration option to true for this invocation, regardless of the setting in the config file. This is mostly useful for validation during the \f(CW\*(C`checkconf\*(C'\fR option. .IP "\fB\-S\fR" 4 .IX Item "-S" Forces the \f(CW\*(C`zones_strict_data\*(C'\fR configuration option to true for this invocation, regardless of the setting in the config file. This is mostly useful for validation during the \f(CW\*(C`checkconf\*(C'\fR option. .IP "\fB\-D\fR" 4 .IX Item "-D" Enables additional debugging output to syslog and/or the terminal, as appropriate. .IP "\fB\-x\fR" 4 .IX Item "-x" Disables syslog output completely. By default, almost all possible output from all gdnsd invocations is sent to syslog, even if it is also mirrored to the terminal. The only exception to this rule (well, apart from certain early fatal log outputs which are only triggered in the case of internal code bugs) is the commandline usage output on invalid commandline arguments. .Sp This flag is only legal for the start, restart, condrestart, and try-restart options if used in combination with the \f(CW\*(C`\-f\*(C'\fR flag (as otherwise the resulting daemon could end up with no error output channel at all). It is legal for all other commands (which are all implicitly foreground actions, and all also output to syslog by default). .Sp Primarily intended for e.g. linting invocations of checkconf, the daemon's testsuite, etc, to avoid spamming syslog with things unrelated to a real runtime daemon. .Sp Do not use this flag for a start invocation within a systemd unit file. .SH "ACTIONS" .IX Header "ACTIONS" \&\fBgdnsd\fR acts as its own initscript, internalizing daemon management functions. All valid invocations of the gdnsd command include an \&\fBaction\fR, most of which model normal initscript actions. You may still want a light initscript wrapper to comply with distribution standards for e.g. terminal output on success/failure, setting up resource and security limits, etc, but it's not necessary for basic functionality. .IP "\fBcheckconf\fR" 4 .IX Item "checkconf" Checks the validity of the configuration file and zonefiles, setting the exit status appropriately (0 for success). .Sp The \f(CW\*(C`start\*(C'\fR, and all \f(CW\*(C`restart\*(C'\fR\-like actions implicitly do the same checks as \f(CW\*(C`checkconf\*(C'\fR as they load the configuration for runtime use. .IP "\fBstart\fR" 4 .IX Item "start" Starts gdnsd as a runtime \s-1DNS\s0 daemon. .IP "\fBstop\fR" 4 .IX Item "stop" Stops a gdnsd daemon previously started by start. .IP "\fBrestart\fR" 4 .IX Item "restart" This is equivalent to the sequence \f(CW\*(C`checkconf && stop && start\*(C'\fR. What actually happens behind the scenes is a bit more complicated, with the goal of making restarts as seamless and downtime-free as possible. .Sp \&\f(CW\*(C`restart\*(C'\fR is a special case of \f(CW\*(C`start\*(C'\fR which first completely starts itself (including the acquisition of listening sockets, if possible, see below) and is ready to answer requests *before* it stops the previous instance of the daemon. This eliminates any stop \-> start delays from expensive startup steps like parsing large numbers of zonefiles and/or polling for initial monitoring results on a large number of resources. .Sp On platforms where \f(CW\*(C`SO_REUSEPORT\*(C'\fR works correctly, the new daemon uses this option (as did the old) to start its listening sockets in parallel with those of the previous daemon just before sending the termination signal to it, to eliminate any window of true unavailability. However, keep in mind that a handful of requests will still be lost: those which were already in the local socket buffers for the old instance when it exited. .Sp If \f(CW\*(C`SO_REUSEPORT\*(C'\fR isn't supported or doesn't work properly, the daemon will re-attempt its socket acquisition after the short delay of waiting for the previous daemon's pid to exit. The delay should normally be fairly constant (does not scale up with zones/configuration) and minimal in these cases, on the order of <1s. .Sp \&\f(CW\*(C`SO_REUSEPORT\*(C'\fR became available in Linux starting with kernel version 3.9. BSDs have had it for much longer. .Sp Note: \f(CW\*(C`restart\*(C'\fR will \fBnot\fR work correctly for a daemon that's running under systemd, no matter how it's executed. Executing it from the commandline will sort-of work in that it will replace the daemon that's running as a systemd service with one that isn't a systemd service, but that probably isn't what you want to do. Those running under systemd will need to use e.g. \f(CW\*(C`systemctl restart gdnsd\*(C'\fR, which will do a full serial stop \-> start cycle, in order for configuration changes to take effect. .IP "\fBreload-zones\fR" 4 .IX Item "reload-zones" Sends \f(CW\*(C`SIGUSR1\*(C'\fR to the running daemon, forcing a manual re-check of the zones directory for updated files. Generally this should only be necessary if the configuration option \f(CW\*(C`zones_rfc1035_auto\*(C'\fR has been explicitly set to \f(CW\*(C`false\*(C'\fR, disabling the default mode where gdnsd continuously monitors for and loads zonefile data changes. .Sp It is not advised to set up an initscript \f(CW\*(C`reload\*(C'\fR action which invokes \f(CW\*(C`reload\-zones\*(C'\fR, as a future version of gdnsd will very likely include a true reload action for full re-configuration without restart. It's better to leave the canonical reload action undefined for now to reduce incompatibilities and/or surprises when that update occurs. .IP "\fBcondrestart\fR" 4 .IX Item "condrestart" This is basically \*(L"restart only if already running\*(R". .Sp Performs the same actions as \f(CW\*(C`restart\*(C'\fR, but aborts early (with a successful exit value) if the daemon was not already running. .IP "\fBtry-restart\fR" 4 .IX Item "try-restart" Alias for \f(CW\*(C`condrestart\*(C'\fR. .IP "\fBstatus\fR" 4 .IX Item "status" Checks the status of the running daemon, returning 0 if it is running or non-zero if it isn't. .PP Any other commandline option will be treated as invalid, which will result in displaying a short help text to \fI\s-1STDERR\s0\fR and exiting with a non-zero exit status. This includes things like the ubiquitous \fB\-\-help\fR and \fB\-\-version\fR. .SH "ZONE FILES \- RFC1035" .IX Header "ZONE FILES - RFC1035" The directory for standard \s-1RFC1035\s0 zone files (the default zone data backend) is the subdirectory named \f(CW\*(C`zones\*(C'\fR in the configuration directory, so the default would be \&\fI/etc/gdnsd/zones/\fR. .PP \&\s-1RFC1035\s0 zone files are the traditional zone file format that one typically uses with e.g. \s-1BIND.\s0 For more information on the internal format and processing of these files, see \&\fBgdnsd.zonefile\fR\|(5). This section is about how the directory itself is managed. .PP All files in the zones directory are considered zone files. In general there should be exactly one file per zone, and the filename should match the zone name. Filenames beginning with \&\f(CW\*(C`.\*(C'\fR are ignored. All zone file must be regular files (as opposed to directories, symlinks, sockets, etc). .PP By default, the zones directory is handled dynamically: as files are added, modified, and deleted in this directory, zone data will automatically update at runtime. This feature can be disabled (such that an explicit \s-1SIGUSR1\s0 or \f(CW\*(C`gdnsd reload\-zones\*(C'\fR is required to re-scan for changes) in the config file via the directive \&\f(CW\*(C`zones_rfc1035_auto\*(C'\fR (see \fBgdnsd.config\fR\|(5)). It is legal for the directory to be empty at startup, which results in all queries returning \f(CW\*(C`REFUSED\*(C'\fR. .PP In order to better support the special case of \s-1RFC 2137\s0 \-style classless in\-addr.arpa delegation zones (which contain forward slashes), any \f(CW\*(C`@\*(C'\fR symbol in the filename will be translated to a forward slash (\f(CW\*(C`/\*(C'\fR) when transforming a filename into its corresponding zone name. .PP For similar reasons, if your server is intended to serve the root of the \s-1DNS,\s0 the filename for the root zone should be the special filename \fI\s-1ROOT_ZONE\s0\fR, rather than the impossible literal filename \fI.\fR. Because authoritative servers cannot serve two domains which have a parent<\->child relationship correctly, a root server cannot serve any other zone, so this would be the sole zonefile. .PP The standard \s-1DNS\s0 zone file escape sequences are recognized within the filenames (e.g. \f(CW\*(C`\e.\*(C'\fR for a dot within a label, or \f(CW\*(C`\eNNN\*(C'\fR where \s-1NNN\s0 is a decimal integer in the range 0 \- 255), if for some reason you need a strange character in your zone name. .PP Trailing dots on zonefile names are ignored; e.g. \fIexample.com\fR and \fIexample.com.\fR are functionally equivalent. .PP Duplicate zones (e.g. having both of the above representations of \&\f(CW\*(C`example.com\*(C'\fR present in the zones directory, and/or adding a different case-mapping such as \fIEXample.Com\fR) are handled by loading both and giving runtime lookup priority to one of the copies based on a couple of simple rules: the highest \f(CW\*(C`serial\*(C'\fR wins, and if more than one file has the highest serial, the highest filesystem \f(CW\*(C`mtime\*(C'\fR value wins. If the primary copy is later removed, any remaining copy of the zone will be promoted for runtime lookups according to that same ordering. .PP Subzones (e.g. having zonefiles for both \f(CW\*(C`example.com\*(C'\fR and \&\f(CW\*(C`subz.example.com\*(C'\fR) are only marginally supported. The child zone will be loaded into memory, but its data won't be available for lookup, as it is suppressed by the existence of the parent zone. If the parent zone is later removed, the subzone data will become available. Logically, it is not possible for a single server to be authoritative for both a subzone and its parent zone at the same time, as each \*(L"role\*(R" (parent and child) requires different responses to requests for data within the child zone. gdnsd choses to default to the \*(L"parent\*(R" role in these conflict cases. .PP Tools which are used to update zonefiles while gdnsd is running should always use atomic operations (\f(CW\*(C`rename()\*(C'\fR, \f(CW\*(C`unlink()\*(C'\fR, \f(CW\*(C`link()\*(C'\fR) to alter the zone files. See the documentation for \f(CW\*(C`zones_rfc1035_quiesce\*(C'\fR in \&\fBgdnsd.config\fR\|(5) for more details about this. .SH "ZONE FILES \- DJBDNS" .IX Header "ZONE FILES - DJBDNS" There is now experimental support for djbdns-format zonefiles in the \fIdjbdns\fR subdirectory of the config directory (default \fI/etc/gdnsd/djbdns/\fR. For more information see \fBgdnsd.djbdns\fR\|(5). .PP If the same zone is specified via more than one zone data backend (e.g. rfc1035 + djbdns), the same rules shown in the above section apply: both will be loaded and managed, but only one will be used for queries at any given time (based on mtime/serial). .SH "DIRECTORIES" .IX Header "DIRECTORIES" Important directory paths for the core daemon code: .IP "\fI/etc/gdnsd\fR" 4 .IX Item "/etc/gdnsd" Default configuration directory, unless overridden via \f(CW\*(C`\-c\*(C'\fR. The primary configuration file is always the file \fIconfig\fR in the configuration directory. .IP "\fI/var/run/gdnsd\fR" 4 .IX Item "/var/run/gdnsd" Default run_dir. The daemon will store a pidfile here (which is not intended for reliable text-based consumption by third parties). See the entry for \f(CW\*(C`run_dir\*(C'\fR in the \fBgdnsd.config\fR\|(5) manpage for more information about this directory. .IP "\fI/var/lib/gdnsd\fR" 4 .IX Item "/var/lib/gdnsd" Default state_dir. The \fIadmin_state\fR file is read from this directory for administrative state-overrides on monitored resources, see below in the \s-1FILES\s0 section. See the entry for \f(CW\*(C`state_dir\*(C'\fR in the \&\fBgdnsd.config\fR\|(5) manpage for more information about this directory. .IP "\fI/usr/lib/x86_64\-linux\-gnu/gdnsd\fR" 4 .IX Item "/usr/lib/x86_64-linux-gnu/gdnsd" This is the default path that plugin shared libraries are loaded from. Other directories can be prepended to the search path via the configuration option \f(CW\*(C`plugin_search_path\*(C'\fR, documented in \fBgdnsd.config\fR\|(5). .IP "\fI/usr/lib/x86_64\-linux\-gnu/gdnsd\fR" 4 .IX Item "/usr/lib/x86_64-linux-gnu/gdnsd" This is the default path for daemon-private executables that users should not run. The only current case is \fIgdnsd_extmon_helper\fR for the extmon plugin and the path for this can be overridden in that plugin's configuration, documented in \fBgdnsd\-plugin\-extmon\fR\|(8). .SH "ADMIN STATE FILE \- \fI/var/lib/gdnsd/admin_state\fP" .IX Header "ADMIN STATE FILE - /var/lib/gdnsd/admin_state" This file is the input for administrative state overrides affecting plugin resolution decisions. The intent of this file is to allow explicit, human administrative decisions to temporarily override the states affecting plugin decision-making on issues of failover and/or geographic distribution. A non-existent file is treated the same as an empty file. The file is watched at runtime for changes, and any overridden state found is applied quickly. The file is expected to persist reboots and daemon restarts in order to preserve the administrator's intent through these events. .PP A basic understanding of how both monitoring and resolution plugins in gdnsd work is assumed (see \fBgdnsd.config\fR\|(5)). This file is parsed as a vscf hash data structure (again, see \fBgdnsd.config\fR\|(5) for deeper details of that format). The keys are the names of monitored or virtual resources, and the values are forced state values (optionally with monitored-TTL values as well). Keys can also be wildcards using the shell glob syntax which affect multiple resources. .PP For normal monitored resources, the typical form of a key would be \&\f(CW\*(C`THING/service_type\*(C'\fR, where \f(CW\*(C`THING\*(C'\fR is the monitored address or \s-1CNAME\s0 value and \f(CW\*(C`service_type\*(C'\fR is the service_type configured to monitor that address or \s-1CNAME\s0 value by one or more resolver plugins. The value portion takes the form of \f(CW\*(C`STATE[/TTL]\*(C'\fR, where \f(CW\*(C`STATE\*(C'\fR is \f(CW\*(C`UP\*(C'\fR or \f(CW\*(C`DOWN\*(C'\fR and the \s-1TTL\s0 portion is an optional override of the monitored \s-1TTL.\s0 .PP The order of the lines in the file is important; they are processed and applied in-order such that later lines can override the actions of earlier lines. This is especially handy for making exceptions to glob-matches. .PP Example: .PP .Vb 6 \& /var/lib/gdnsd/admin_state: \& 2001:db8::2:123/my_http_check => DOWN # down a specific res+stype \& foo.example.com./extmon_ping => UP # up a specific res+stype \& 192.0.2.1/* => DOWN # down all service_types for this address \& */xmpp => UP/30 # up all resources monitored by xmpp w/ TTL 30 ... \& 192.0.2.2/xmpp => DOWN # ... except this one .Ve .PP Some resolution plugins can also register virtual resources (which are not monitored by any \f(CW\*(C`service_type\*(C'\fR) solely for the purpose of administrative override of decision-making. Currently the geoip and metafo plugins do this for their \f(CW\*(C`datacenters\*(C'\fR, and the keys they create take the form of \&\f(CW\*(C`plugin_name/resname/dcname\*(C'\fR to force a datacenter's state at the per-resource level. The geoip plugin also supports keys of the form \&\f(CW\*(C`plugin_name/mapname/dcname\*(C'\fR to force a datacenter's state at the per-map level. These forcings override the aggregate state passed up to geoip/metafo from per-datacenter plugins (e.g. multifo or weighted monitoring several addresses in a datacenter), and in the geoip case the more-specific per-resource forced state will override any per-map forced state. .PP Example: .PP .Vb 4 \& /var/lib/gdnsd/admin_state: \& geoip/map3/dc\-us => DOWN # down dc\-us in geoip map3 \& */dc\-jp => DOWN # down all datacenters named dc\-jp for geoip and metafo \& metafo/res_www/dc\-jp => UP # exception to above .Ve .PP All of the available monitored and virtual keys that can be matched in this file are listed in the daemon's \s-1HTML, CSV,\s0 and \s-1JSON\s0 \-format outputs from the built-in status http server (default port 3506), as are their current monitors and admin_state\-forced states. .SH "SYSTEMD COMPATIBILITY" .IX Header "SYSTEMD COMPATIBILITY" This daemon is implicitly compatible with running as a systemd service on Linux, and should have come with a ready-made unit file during installation that works correctly. .PP When the daemon detects that it's running underneath systemd as a unit (by detecting that systemd is the running init system and that gdnsd's initial parent pid is \f(CW1\fR), it makes some changes to its default behaviors to be more systemd-friendly. This includes shutting off stdio output very early (as soon as syslog is open) because the stdio and syslog output channels are redundant under systemd and lead to duplicate messages in the journal. It also makes use of systemd's notification socket to coordinate operations with the init system. .PP Because of these things, it is critical that the gdnsd unit file uses the \f(CW\*(C`NotifyAccess=all\*(C'\fR setting, and that the \f(CW\*(C`ExecStart=\*(C'\fR command for gdnsd uses a commandline that resembles \f(CW\*(C`gdnsd \-f start\*(C'\fR and does not use \f(CW\*(C`\-x\*(C'\fR (other extra options are ok). .PP Example unit file contents for the Service section: .PP .Vb 5 \& [Service] \& Type=notify \& NotifyAccess=all \& ExecStart=/usr/sbin/gdnsd \-f start \& ExecStop=/usr/sbin/gdnsd stop .Ve .PP It is not advised to set up \f(CW\*(C`ExecReload=/usr/sbin/gdnsd reload\-zones\*(C'\fR to re-purpose the systemctl reload action for zone reloads, as a future version of gdnsd will very likely include a real option for full configuration reload under systemd, which would change this behavior. It's better to leave the canonical reload action undefined for now to reduce incompatibilities and/or surprises when that update occurs. It is even less advised to try to configure \f(CW\*(C`ExecReload=/usr/sbin/gdnsd restart\*(C'\fR, as this will \fBnot\fR work! .PP In general, if you're running gdnsd as a systemd service, you should use the supplied style of unit file and use \f(CW\*(C`systemctl\*(C'\fR for daemon control (e.g. start, stop, restart, status), and use \f(CW\*(C`/usr/sbin/gdnsd reload\-zones\*(C'\fR for zone reloads. .SH "SIGNALS" .IX Header "SIGNALS" Any signal not explicitly mentioned is not explicitly handled. That is to say, they will have their default actions, which often include aborting execution. .IP "\fB\s-1SIGTERM\s0\fR, \fB\s-1SIGINT\s0\fR" 4 .IX Item "SIGTERM, SIGINT" Causes the daemon to exit gracefully with accompanying log output. .IP "\fB\s-1SIGUSR1\s0\fR" 4 .IX Item "SIGUSR1" Causes the daemon to attempt to load any new changes to the zone data. .IP "\fB\s-1SIGHUP\s0\fR" 4 .IX Item "SIGHUP" Ignored during daemon runtime. .IP "\fB\s-1SIGPIPE\s0\fR" 4 .IX Item "SIGPIPE" Ignored always. .SH "EXIT STATUS" .IX Header "EXIT STATUS" An exit status of zero indicates success, anything else indicates failure. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBgdnsd.config\fR\|(5), \fBgdnsd.zonefile\fR\|(5), \fBgdnsd.djbdns\fR\|(5) .PP The gdnsd manual. .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" Copyright (c) 2012 Brandon L Black .PP This file is part of gdnsd. .PP gdnsd is free software: you can redistribute it and/or modify it under the terms of the \s-1GNU\s0 General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. .PP gdnsd is distributed in the hope that it will be useful, but \s-1WITHOUT ANY WARRANTY\s0; without even the implied warranty of \&\s-1MERCHANTABILITY\s0 or \s-1FITNESS FOR A PARTICULAR PURPOSE.\s0 See the \&\s-1GNU\s0 General Public License for more details. .PP You should have received a copy of the \s-1GNU\s0 General Public License along with gdnsd. If not, see .