Author: Nicholas Bamber Subject: Duende man page We have made various changes to the duende executable and these need to be reflected in the Debian man page. Forwarded: yes Last-Update: 2011-07-18 --- a/doc/en/man/duende.8 +++ b/doc/en/man/duende.8 @@ -29,11 +29,12 @@ makes a given child process a daemon. The standard output and standard error of the child process is logged via syslog() with a priority of -LOG_INFO. +LOG_ALERT. .SH "USAGE" .PP .B "duende" -child_process [ all subsequent arguments passed on to child ] +.RB [ options ] +child_process [ arguments passed onto child ] .SH "DETAILS" .PP When @@ -76,48 +77,52 @@ duende uses a setuid() call to change the user ID of the logging process to the user with ID 66. +.SH "OPTIONS" +.PP +Most of the above behaviour can be configured by command line arguments. +.TP 4 +.BI -c | --chroot " directory" +The log helper process will change its directory and root to this location. +This defaults to +.B /etc/maradns/logger "." +.TP 4 +.BI -i | --ident " string" +The log helper process will use this string to identify the process when +sending messages to syslog. +This defaults to +.B log-help "." +.TP 4 +.BI -p | --pid " filename" +If this argument is present, the duende parent process will store its pid in +this file. +.TP 4 +.BI -u | --uid " integer" +The log helper process will drop its user id to this. This value defaults to +66. +.TP 4 +.BI -g | --gid " integer" +The log helper process will drop its group id to this. This value defaults to +66. +.TP 4 +.BI -r | --restart_on " integer" +The log helper process will restart the child process if it exists with this +status code. This defaults to 8. .SH "LOGGING" .PP .B "duende" uses the syslog() facility to log the standard output of the program that it invokes. The name of the program (in other words, the -"ident" given to openlog()) is the full path of the first argument -given -to -.BR "duende" "." +"ident" given to openlog()) defaults to +.BR "log-helper" +but can be overridden with the +.RB "--ident" +argument. All messages created by the child process are sent -to syslog() with a priority of LOG_INFO and a "facility" -of LOG_DAEMON (daemon.info in /etc/syslog.conf); since daemon.info -messages are not logged by default in FreeBSD, on FreeBSD systems -messages generated by the child process are logged with a priority of -LOG_ALERT and a "facility" of LOG_DAEMON (daemon.alert in -/etc/syslog.conf). +to syslog() with a priority of LOG_ALERT and a "facility" +of LOG_DAEMON (daemon.info in /etc/syslog.conf). Should duende itself encounter an error, it will send messages to syslog() with a priority of LOG_ALERT. .PP -For example, suppose one invokes duende thusly: - -.nf - duende /usr/local/sbin/maradns -.fi - -If invoked thusly, duende will log all messages with the "ident" -(program -name) of "/usr/local/sbin/maradns". If this is not desired, invoke -duende -with something like: - -.nf - export PATH=$PATH:/usr/local/sbin - duende maradns -.fi - -This will log messages with a (more sensible) "ident" of maradns. -.PP -Note: If a non-POSIX Bourne shell (such as csh, es, rc, or fish) is -used to -invoke MaraDNS, the above syntax needs to be changed. -.PP Also, the directory /etc/maradns/logger, while used by duende, is not used to store any log messages. That is unless, for some reason, one