Multiple instances of the exec module
K. Hoercher
wbhoer at gmail.com
Fri Oct 13 14:43:44 CEST 2006
On 10/13/06, Les Brinkworth <lbrinkworth at qkon.com> wrote:
> How does one define two instances of exec with different names that can
> be called from other sections?
Aaah, now it gets a bit more clear to me. You should take into account
the comments at the beginning of the modules{} section. That would
lead to something like:
> Code snippet from Modules section of radiusd.conf...
>
exec doacctfoo {
> wait = yes
> program = "handlebillingrequests.exe ACCR:%Z"
> input_pairs = request
> output_pairs = reply
> packet_type = Accounting-Request
> }
>
> ...This executes for an accounting request
>
> If I then add the same code to the authorize section...
ah no, that won't work. you just put it into the modules{} too with
analogous change:
>
exec dorequestfoo {
> wait = yes
> program = "handlebillingrequests.exe AUTR:%Z"
> input_pairs = request
> output_pairs = reply
> packet_type = Access-Request
> }
>
> ...it results in the following when I run debug
> radiusd.conf[1527] Unknown module rcode 'wait'.
> radiusd.conf[1513] Failed to parse authorize section.
Ok, that confuses freeradius way to much, as that is not the place to
define module instances (see above), especially when another one (the
unnamed one) already is present.
But you can now put the named defined ones in the appropriate section e.g.
authorize {
...
dorequestfoo
...
}
accounting {
...
doacctfoo
...
}
There might be other ways of doing it, (using the same module, but
changing the called program, so it can cope with both tasks
accordingly) but keeping it simple at first and following the
recommendations in the comments looks preferable, at least until you
get some working config.
regards
K. Hoercher
More information about the Freeradius-Users
mailing list