#!/bin/sh

### BEGIN INIT INFO
# Provides:          yarobot
# Required-Start:    $local_fs $remote_fs $network
# Required-Stop:     $local_fs $remote_fs $network
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Creates /var/run/yarobot/yarobot.run file
# Description:       Creates /var/run/yarobot/yarobot.run file, to allow YARobot to start
### END INIT INFO

case "$1" in
  start|restart)
	mkdir -p /var/run/yarobot/ 2>/dev/null
	touch /var/run/yarobot/yarobot.run
  ;;
  stop)
	rm /var/run/yarobot/yarobot.run
  ;;

  *)
  echo "Use $0 start or $0 stop "
  ;;

esac

exit 0

