#!/bin/sh
ADMIN=sqlrelay

DIRTY=`ipcs | grep $ADMIN | wc -l`
if test $DIRTY -ne 0 ; then
   ipcrm sem `ipcs -s | grep $ADMIN | cut -f2 -d ' '`
   ipcrm shm `ipcs -m | grep $ADMIN | cut -f2 -d ' '`
   echo "Interprocess buffers cleaned";
fi;
exit 0
