#!/bin/sh

OSIRISMD=@INSTALLDIR@/osirismd

case "$1" in
	start)
		if [ -f ${SUDO} ]; then
	    	    if [ -x ${OSIRISMD} ]; then
			${OSIRISMD} && echo -n ' osirismd'
		    fi
                else
		    echo ""
		    echo "No sudo found, needed to start osirismd."
		    echo ""
                fi
		;;
	stop)
		/usr/bin/killall osirismd > /dev/null 2>&1 && echo -n ' osirismd'
		;;
	*)
		echo ""
		echo "Usage: `basename $0` { start | stop }"
		echo ""
		exit 64
		;;
esac
