#!/bin/sh
if /usr/bin/is_fatal_recovery.sh ; then
	echo ' -- Fatal recovery: do not start S30' > /dev/kmsg
	exit 255
fi
case "$1" in
  start)
    echo -- Start STB -- | tee /dev/kmsg
    export PYTHONIOENCODING='utf-8'
    screen -S stb01 -d -m -c /home/s30/stb01.rc
  ;;
  stop)
    echo -- Stop STB -- | tee /dev/kmsg
    killall screen
  ;;
  *)
    echo "Do or do not. There is no try"
    exit 1
  ;;
esac
