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