#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions
[ -f /etc/conf.d/mouse-emul ] && . /etc/conf.d/mouse-emul

function call_mouseemul() {
echo "foo"
}

case "$1" in
  start)
    stat_busy "Starting mouse-emul"
      /usr/bin/mouse-emul $MOUSE_DAEMON_ARGS&
      add_daemon mouse-emul
      stat_done
    ;;

  stop)
    stat_busy "Stopping mouse-emul"
      killall mouse-emul
      rm_daemon mouse-emul
      stat_done
    ;;
  restart)
    $0 stop
    sleep 1
    $0 start
    ;;
  *)
    echo "usage: $0 {start|stop|restart}"
esac
exit 0