#!/bin/sh

if ps aux | grep -v grep | grep sysmex > /dev/null
then
    # it's running; uncomment to test:
    # echo 'Just a test' | mail -s "SYSMEX 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 "SYSMEX SOCKET IS DOWN" ra.jones@hmds.org.uk
fi
