#!/bin/sh export PATH=$PATH:/usr/local/bin pkill -f udplogger_receiver logger_dir=`mktemp -d /tmp/udplogger_test.XXXXXXXX` if [ ! -d "${logger_dir}" ]; then echo "Couldn't create logger dir ${logger_dir}" fi logger_key="${logger_dir}/key.pem" logger_crt="${logger_dir}/public.pem" openssl genrsa -out "${logger_key}" 2048 openssl rsa -in "${logger_key}" -outform PEM -pubout -out "${logger_crt}" ln -sf receiver udplogger_receiver ./udplogger_receiver -k "${logger_key}" "${logger_dir}" & sleep 2 ./sender -h 127.0.0.1 -p 58132 -c "${logger_crt}" "${logger_dir}" pkill -f udplogger_receiver grep -qri Juchu "${logger_dir}" retval=$? #if [ "${retval}" -eq 0 ]; then # echo "Found" #fi rm -r "${logger_dir}" exit $retval