From cf23603e9341e513357abbba3643c4d0c0b897a0 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Wed, 11 Apr 2012 17:08:42 +0200 Subject: Add config option PidFile. Note that `-i' on the command line overrides this config option. This closes RADSECPROXY-32. --- radsecproxy.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'radsecproxy.c') 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)); -- cgit v1.1