mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-18 06:20:42 +01:00
This permits to include files (like legacy $IncludeConfig) via a
script object. Needless to say, the script object offers more
features:
- include files can now be
- required, with rsyslog aborting when not present
- required, with rsyslog emitting an error message but otherwise
continuing when not present
- optional, which means non-present include files will be
skipped without notice
This is controlled by the "mode" parameter.
- text can be included form e.g. an environment variable
--> ex: include(text=`echo $ENVVAR`)
This finally really obsoletes $IncludeConfig.
closes https://github.com/rsyslog/rsyslog/issues/2151
23 lines
677 B
Bash
Executable File
23 lines
677 B
Bash
Executable File
#!/bin/bash
|
|
# added 2018-01-22 by Rainer Gerhards; Released under ASL 2.0
|
|
. $srcdir/diag.sh init
|
|
. $srcdir/diag.sh generate-conf
|
|
. $srcdir/diag.sh add-conf '
|
|
template(name="outfmt" type="string" string="%msg:F,58:2%\n")
|
|
|
|
if not ($msg contains "msgnum:") then {
|
|
stop
|
|
}
|
|
|
|
# Note: the point of this test is to have this include outside of
|
|
# a control flow construct -- this the "strange" if above.
|
|
include(file="testsuites/include-std-omfile-actio*.conf")
|
|
'
|
|
. $srcdir/diag.sh startup-vg
|
|
. $srcdir/diag.sh injectmsg 0 10
|
|
. $srcdir/diag.sh shutdown-when-empty
|
|
. $srcdir/diag.sh wait-shutdown-vg
|
|
. $srcdir/diag.sh check-exit-vg
|
|
. $srcdir/diag.sh seq-check 0 9
|
|
. $srcdir/diag.sh exit
|