#!/bin/bash
PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin
PIDFILE="/var/run/infnoise.pid"
DAEMON="/usr/sbin/infnoise"

if [ -e $PIDFILE ]; then
          echo "infnoise appears to already be running."
          echo "If this is not the case, then remove "
	  echo "$PIDFILE and try again..."
	  exit 1
else
          if [ -x $DAEMON ]; then
	  echo "Starting infnoise HWRNG daemon"
#          $DAEMON -R -d -p $PIDFILE 2>/dev/null 1>&2
	  $DAEMON -R -d -p $PIDFILE 2>/dev/null 1>&2
	  fi
fi
