sysklogd/test/remote.sh
Joachim Nilsson 8f459d349a test: Check sending log messages to remote server works
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-10-30 17:14:29 +01:00

23 lines
333 B
Bash
Executable File

#!/bin/sh
set -x
. ./test.rc
MSG="kilroy"
tshark -Qni lo -w ${CAP} port ${PORT} 2>/dev/null &
#tcpdump -qlni lo -w ${CAP} port ${PORT} 2>/dev/null &
PID="$!"
sleep 1
echo "Hej"
../src/logger -u ${SOCK} ${MSG}
echo "Nej"
sleep 1
kill -TERM ${PID}
wait ${PID}
tshark -d udp.port==${PORT},syslog -r ${CAP} | grep ${MSG}
rm ${CAP}