.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" 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 .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . 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 .\" ======================================================================== .\" .IX Title "INNCONFVAL 1" .TH INNCONFVAL 1 2024-04-01 "INN 2.7.2" "InterNetNews Documentation" .\" 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 innconfval \- Get configuration parameters from configuration files .SH SYNOPSIS .IX Header "SYNOPSIS" \&\fBinnconfval\fR [\fB\-pstv\fR] [\fB\-f\fR \fIfile\fR] [\fB\-F\fR \fIfiletype\fR] [\fB\-i\fR \&\fIinnconffile\fR] [\fIparameter\fR ...] .PP \&\fBinnconfval\fR \fB\-C\fR [\fB\-i\fR \fIinnconffile\fR] .SH DESCRIPTION .IX Header "DESCRIPTION" \&\fBinnconfval\fR normally prints the values of the parameters specified on the command line, from \fIinn.conf\fR. By default, it just prints the parameter values, but if \fB\-p\fR, \fB\-s\fR, or \fB\-t\fR are given, it instead prints the parameter and value in the form of a variable assignment in Perl, Bourne shell, or Tcl respectively. If no parameters are specifically requested, \&\fBinnconfval\fR prints out all parameter values (this isn't particularly useful unless one of \fB\-p\fR, \fB\-s\fR, or \fB\-t\fR were specified). .PP All parameters are taken from \fIinn.conf\fR except for \fIversion\fR, which is always the version string of INN. .PP Use the \fB\-f\fR and \fB\-F\fR options to specify another configuration file from which to print the values of the parameters. .PP If given the \fB\-C\fR option, \fBinnconfval\fR instead checks \fIinn.conf\fR, reporting any problems found to standard error. .SH OPTIONS .IX Header "OPTIONS" .IP \fB\-C\fR 4 .IX Item "-C" Check \fIinn.conf\fR rather than printing out the values of parameters, and exit with status \f(CW\*(C`0\*(C'\fR if no problems are found and with status \f(CW\*(C`1\*(C'\fR otherwise. .IP "\fB\-f\fR \fIfile\fR" 4 .IX Item "-f file" Use \fIfile\fR as the source configuration file for the type mentioned in the \&\fB\-F\fR option. If not set, the default configuration file is used (that is to say the file in \fIpathetc\fR named like the type provided with \fB\-F\fR). \fIfile\fR must be a valid configuration file of that type and will be parsed the same as that type would be. .IP "\fB\-F\fR \fIfiletype\fR" 4 .IX Item "-F filetype" \&\fIfiletype\fR must either be \f(CW\*(C`inn.conf\*(C'\fR (the default) or \f(CW\*(C`inn\-secrets.conf\*(C'\fR. It defines the type of configuration file to parse. .Sp For instance, run \f(CW\*(C`innconfval \-F inn\-secrets.conf canlockuser\*(C'\fR to retrieve the \fIcanlockuser\fR value from \fIinn\-secrets.conf\fR. .Sp The default path to the configuration file of the requested type will be used, unless \fB\-f\fR is given (or a specific source configuration file for \fIinn.conf\fR is set with \fB\-i\fR and defines another \fIpathetc\fR location). .IP "\fB\-i\fR \fIinnconffile\fR" 4 .IX Item "-i innconffile" Use \fIinnconffile\fR as the source configuration file for \fIinn.conf\fR rather than \fIinn.conf\fR in \fIpathetc\fR. \fIinnconffile\fR must be a valid \fIinn.conf\fR file and will be parsed the same as \fIinn.conf\fR would be. .IP \fB\-p\fR 4 .IX Item "-p" Print out parameters as Perl assignment statements. The variable name will be the same as the configuration parameter, and string values will be enclosed in single quotes with appropriate escaping. Boolean values will be mapped to the strings \f(CW\*(C`true\*(C'\fR or \f(CW\*(C`false\*(C'\fR. List values will be mapped to an array of strings. NULL values are printed out with the \f(CW\*(C`undef\*(C'\fR value. .Sp Here is an example: .Sp .Vb 5 \& $enableoverview = \*(Aqtrue\*(Aq; \& @extraoverviewadvertised = ( \*(AqNewsgroups\*(Aq, \*(AqInjection\-Info\*(Aq ); \& @extraoverviewhidden = undef; \& $organization = \*(AqLet\e\*(Aqs try nasty "quotes"\*(Aq; \& $maxforks = 10; .Ve .Sp If \fBinnconfval\fR is called via the Perl \f(CW\*(C`INN::Config\*(C'\fR module, all these variables are properly exported. .IP \fB\-s\fR 4 .IX Item "-s" Print out parameters as Bourne shell assignment statements. The variable name will be the configuration parameter name in all capitals, and all variables will be exported, if not NULL. String values will be enclosed in single quotes with appropriate escaping, and boolean values will be mapped to \f(CW\*(C`true\*(C'\fR or \f(CW\*(C`false\*(C'\fR. List values will be mapped to a space-separated string representing an array of strings (as Bourne shell does not recognize arrays, contrary to several other shells, an array cannot be returned for interoperability reasons). .Sp Here is an example: .Sp .Vb 5 \& ENABLEOVERVIEW=true; export ENABLEOVERVIEW; \& EXTRAOVERVIEWADVERTISED=\*(Aq"Newsgroups" "Injection\-Info"\*(Aq; \& export EXTRAOVERVIEWADVERTISED; \& ORGANIZATION=\*(AqLet\*(Aq\e\*(Aq\*(Aqs try nasty "quotes"\*(Aq; export ORGANIZATION; \& MAXFORKS=10; export MAXFORKS; .Ve .IP \fB\-t\fR 4 .IX Item "-t" Print out parameters as Tcl assignment statements. The variable name will be the same as the configuration parameter name but with \f(CW\*(C`inn_\*(C'\fR prepended, and string variables will be escaped appropriately. Boolean values will be mapped to the strings \f(CW\*(C`true\*(C'\fR or \f(CW\*(C`false\*(C'\fR. List values will be mapped to an array of strings. NULL values are not printed out. .Sp Here is an example: .Sp .Vb 4 \& set inn_enableoverview "true" \& set inn_extraoverviewadvertised { "Newsgroups" "Injection\-Info" } \& set inn_organization "Let\*(Aqs try nasty \e"quotes\e"" \& set inn_maxforks 10 .Ve .IP \fB\-v\fR 4 .IX Item "-v" Print INN's version and exit. This is equivalent to \f(CW\*(C`innconfval version\*(C'\fR. .SH HISTORY .IX Header "HISTORY" Written by Rich $alz for InterNetNews. .SH "SEE ALSO" .IX Header "SEE ALSO" inn.conf(5), inn\-secrets.conf(5), INN::Config(3pm).