sudo do what I mean

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson 2019-10-31 10:35:19 +01:00
parent ef00787c5c
commit cd7d2ca0be

View File

@ -6,8 +6,8 @@ MSG="kilroy"
/sbin/ifconfig -a /sbin/ifconfig -a
tshark -Qni lo -w ${CAP} port ${PORT} & sudo tshark -Qni lo -w ${CAP} port ${PORT} &
#tcpdump -qlni lo -w ${CAP} port ${PORT} & #sudo tcpdump -qlni lo -w ${CAP} port ${PORT} &
PID="$!" PID="$!"
sleep 5 sleep 5
ps fax |grep -A3 tshark ps fax |grep -A3 tshark
@ -15,7 +15,7 @@ ps fax |grep -A3 tshark
../src/logger -u ${SOCK} ${MSG} ../src/logger -u ${SOCK} ${MSG}
sleep 5 sleep 5
kill -TERM ${PID} sudo kill -TERM ${PID}
wait ${PID} wait ${PID}
tshark -d udp.port==${PORT},syslog -r ${CAP} | grep ${MSG} tshark -d udp.port==${PORT},syslog -r ${CAP} | grep ${MSG}