[Oisf-devel] Expand environment variables in suricata.yaml..

Victor Julien victor at inliniac.net
Wed Sep 26 07:45:57 UTC 2012

On 09/25/2012 07:26 PM, Jason Ish wrote:
> On Tue, Sep 25, 2012 at 7:02 AM, Victor Julien <victor at inliniac.net> wrote:
>> On 09/24/2012 05:18 PM, Jason Ish wrote:
>>> Here is a patch to expand environment variables in suricata.yaml.  I
>>> find it useful, but my use case is not that of an end user.  Anyways,
>>> here's the patch.  The tests should make it clear how to use.
>> Actually, so me the patch is not very clear on what it's use case would
>> be. Can you explain some?
> So I might do something like this in suricata.yaml:
> default-rule-path: ${RULE_PATH:-/usr/local/etc/suricata/rules}
> If the environment variable RULE_PATH is set, the value of
> default-rule-path will be the expansion of ${RULE_PATH}, otherwise it
> will default to /usr/local/etc/suricata/rules.  It can save
> post-processing of the configuration in managed setups.

Cool, I can see how this is useful.

Wrt the implementation, wouldn't it make sense to have this in the
generic conf api instead of the yaml part?

Victor Julien
PGP: http://www.inliniac.net/victorjulien.asc

More information about the Oisf-devel mailing list