diff options
-rw-r--r-- | README | 3 | ||||
-rw-r--r-- | radsecproxy.c | 3 | ||||
-rw-r--r-- | radsecproxy.conf.5.xml | 11 | ||||
-rw-r--r-- | radsecproxy.h | 1 |
4 files changed, 17 insertions, 1 deletions
@@ -24,13 +24,14 @@ instructions, please see the enclosed example file and the 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 diff --git a/radsecproxy.c b/radsecproxy.c index 845c208..9a4d2bc 100644 --- a/radsecproxy.c +++ b/radsecproxy.c @@ -3082,6 +3082,7 @@ void getmainconfig(const char *configfile) { "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, @@ -3280,6 +3281,8 @@ int radsecproxy_main(int argc, char **argv) { 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)); diff --git a/radsecproxy.conf.5.xml b/radsecproxy.conf.5.xml index 35182f0..d5e4c10 100644 --- a/radsecproxy.conf.5.xml +++ b/radsecproxy.conf.5.xml @@ -126,6 +126,17 @@ blocktype name { </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> diff --git a/radsecproxy.h b/radsecproxy.h index c1e7744..a8d5b49 100644 --- a/radsecproxy.h +++ b/radsecproxy.h @@ -54,6 +54,7 @@ enum rsp_fticks_mac_type { }; struct options { + char *pidfile; char *logdestination; char *ftickssyslogfacility; char *ttlattr; |