/usr/lib/kannel/checks/check_fakesmsc.sh is in kannel-extras 1.4.4-4.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | #!/bin/sh
#
# Use `test/fakesmsc' to test the bearerbox and the smsbox.
set -e
#set -x
times=10
interval=0
loglevel=0
host=127.0.0.1
gw/bearerbox -v $loglevel gw/smskannel.conf > check_fakesmsc_bb.log 2>&1 &
bbpid=$!
sleep 2
test/fakesmsc -H $host -r 20000 -i $interval -m $times '123 234 text nop' \
> check_fakesmsc.log 2>&1 &
sleep 1
gw/smsbox -v $loglevel gw/smskannel.conf > check_fakesmsc_sms.log 2>&1 &
running="yes"
while [ $running = "yes" ]
do
sleep 2
if grep "Got message $times" check_fakesmsc.log >/dev/null
then
running="no"
fi
done
kill -INT $bbpid
wait
if grep 'WARNING:|ERROR:|PANIC:' check_fakesmsc*.log >/dev/null
then
echo check_fakesmsc.sh failed 1>&2
echo See check_fakesmsc*.log for info 1>&2
exit 1
fi
rm -f check_fakesmsc*.log
exit 0
|