#!/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 S30 -- | tee /dev/kmsg
    export PYTHONIOENCODING='utf-8'
    screen -S s30 -d -m -c /home/s30/s30.rc
  ;;
  stop)
    echo -- Stop S30 -- | tee /dev/kmsg
    killall screen
  ;;
  *)
    echo "Do or do not. There is no try"
    exit 1
  ;;
esac
