sysklogd/test/remote.sh
Joachim Nilsson cd7d2ca0be sudo do what I mean
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-10-31 10:35:19 +01:00

24 lines
347 B
Bash
Executable File

#!/bin/sh
set -ex
. ./test.rc
MSG="kilroy"
/sbin/ifconfig -a
sudo tshark -Qni lo -w ${CAP} port ${PORT} &
#sudo tcpdump -qlni lo -w ${CAP} port ${PORT} &
PID="$!"
sleep 5
ps fax |grep -A3 tshark
../src/logger -u ${SOCK} ${MSG}
sleep 5
sudo kill -TERM ${PID}
wait ${PID}
tshark -d udp.port==${PORT},syslog -r ${CAP} | grep ${MSG}
rm ${CAP}