#! /bin/sh

start() {
      echo -n "Starting MBusAscii2Mqtt... "
      /binary/mbusascii2mqtt &
      echo "done"
}

stop() {
      echo -n "Stopping MBusAscii2Mqtt..."
      killall mbusascii2mqtt
      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 $?
