#!/bin/sh

if ps aux | grep -v grep | grep lantronix > /dev/null
then
    # it's running; uncomment to test:
    # echo 'Just a test' | mail -s "LANTRONIX SOCKET IS OK" ra.jones@hmds.org.uk
	echo 'OK' > /dev/null # just needs an action line, or script hangs
else
    echo 'Restart action required' | mail -s "LANTRONIX SOCKET IS DOWN" ra.jones@hmds.org.uk
fi
