Note that `-i' on the command line overrides this config option.
This closes RADSECPROXY-32.
documentation at
http://software.uninett.no/radsecproxy/?page=documentation
-There are five options that may be specified on the command line:
+The following options may be specified on the command line:
"-c configfile" to specify a non-default config file path.
"-d loglevel" to set a loglevel of 1, 2, 3, 4 and 5 where 5 is the
most detailed.
"-f" to run the proxy in the foreground with logging to stderr.
Without "-f" the default is to detach as a daemon and log to
syslog.
+"-i pidfile" to name a file to which the PID is written.
"-v" just prints version information and exits.
"-p" (pretend) makes the proxy go through the configuration files as
normal, but stops before creating any sockets or doing any
"ListenDTLS", CONF_MSTR, &listenargs[RAD_DTLS],
"SourceDTLS", CONF_STR, &sourcearg[RAD_DTLS],
#endif
+ "PidFile", CONF_STR, &options.pidfile,
"TTLAttribute", CONF_STR, &options.ttlattr,
"addTTL", CONF_LINT, &addttl,
"LogLevel", CONF_LINT, &loglevel,
debug_timestamp_on();
debug(DBG_INFO, "radsecproxy revision %s starting", PACKAGE_VERSION);
+ if (!pidfile)
+ pidfile = options.pidfile;
if (pidfile && !createpidfile(pidfile))
debugx(1, DBG_ERR, "failed to create pidfile %s: %s", pidfile, strerror(errno));
</para>
<variablelist>
<varlistentry>
+ <term><literal>PidFile</literal></term>
+ <listitem>
+ <para>
+ The PidFile option specifies the name of a file to which
+ the process id (PID) will be written. This is overridden
+ by the <option>-i</option> command line option. There is
+ no default value for the PidFile option.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
<term><literal>LogLevel</literal></term>
<listitem>
<para>
};
struct options {
+ char *pidfile;
char *logdestination;
char *ftickssyslogfacility;
char *ttlattr;