#! /bin/sh

start() {
      killall mbushub.elf
      echo -n "Starting mbushub.elf... "
      echo "1111" > /tmp/mbushub.pid
      /binary/mbushub.elf &
      #/binary/mbus_udp.py 1>/dev/null &
      echo "done"
}


stop() {
      echo -n "Stopping mbushub.elf..."
      killall mbushub.elf
      #killall mbus_udp.py
      #rm -f /tmp/mbushub.log
      #rm -f /tmp/mbushub.log.0
      rm -f /tmp/mbushub.pid
      echo "done"
}

restart() {
      stop
      start
}

# See how we were called.
case "$1" in
  start)
      start
      ;;
  stop)
      stop
      ;;
  restart|reload)
      restart
      ;;
  *)
      echo "Usage: $0 {start|stop|reload|restart}"
      exit 1
esac

exit $?
