#!/bin/sh
username=`/usr/ucb/whoami`
pttpid=`/usr/5bin/ps -eo "user pid comm" \
| grep "$username " | grep PTT | grep -v grep | awk '{ print $2 }'`

if [ "$pttpid" ]
then
   while [ forever ]
   do
      # gently wake PTT from sleep using an ignored signal
      echo "Waking up PTT process $pttpid with signal SIGCHLD..."
      kill -18 $pttpid
      sleep 10
   done
fi

echo "ERROR: unable to determine PTT process ID"
exit 1
