mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-19 02:10:42 +01:00
25 lines
721 B
Bash
Executable File
25 lines
721 B
Bash
Executable File
#!/bin/bash
|
|
# add 2017-02-09 by Jan Gerhards, released under ASL 2.0
|
|
. $srcdir/diag.sh init
|
|
. $srcdir/diag.sh generate-conf
|
|
. $srcdir/diag.sh add-conf '
|
|
module(load="../plugins/imtcp/.libs/imtcp")
|
|
input(type="imtcp" port="13514")
|
|
|
|
set $!ip!v1 = 1+"";
|
|
|
|
template(name="outfmt" type="string" string="%!ip%\n")
|
|
local4.* action(type="omfile" file="rsyslog.out.log" template="outfmt")
|
|
'
|
|
. $srcdir/diag.sh startup
|
|
. $srcdir/diag.sh tcpflood -m1 -y
|
|
. $srcdir/diag.sh shutdown-when-empty
|
|
. $srcdir/diag.sh wait-shutdown
|
|
echo '{ "v1": 1 }' | cmp rsyslog.out.log
|
|
if [ ! $? -eq 0 ]; then
|
|
echo "invalid function output detected, rsyslog.out.log is:"
|
|
cat rsyslog.out.log
|
|
. $srcdir/diag.sh error-exit 1
|
|
fi;
|
|
. $srcdir/diag.sh exit
|