Minimal Exec Example
Alan DeKok
aland at deployingradius.com
Mon Sep 25 13:28:09 CEST 2017
On Sep 25, 2017, at 7:23 AM, Sky <skydiablo at gmx.net> wrote:
>
> hmmm... i know, all of you are very family with syntax and handling but i don't
The documentation describes how the modules work. The documentation describes the syntax of the configuration files.
> my current module is .../freeradius/modules/sws.exec
>
> //================== START =================
> exec swscheck {
> wait = yes
> input_pairs = request
> output_pairs = reply
> program = /usr/bin/php -f /foo/bar/baz.php
> shell_escape = yes
> }
> //================== END =================
That's fine. And no, you don't need to put ====HUGE BARS=== around the quoted text. We *can* figure it out.
> but the given site config throw en error:
>
> //================== START =================
> authorize {
> update control {
> swscheck //ERROR: No value given for attribute swscheck
> }
> }
> //================== END =================
>
> some tips ?
Read the documentation and examples to see what the *correct* syntax is? See "man unlang", and look for the documentation on modules.
i.e. you can't just invent things and expect them to work.
It also helps to *understand* how the configuration files work. The documentation does a pretty good job of explaining this.
As a hint: "swscheck" isn't an attribute, and therefore doesn't belong in an "update" section.
Again, read the "man unlang" documentation to see what the "update" section does. Or, read the dozens of examples in the configuration files, which show the same thing.
Alan DeKok.
More information about the Freeradius-Users
mailing list