#!/bin/bash

RESULTFILE=/tmp/autostart_force_result
FOLDER=/linuxcash/cash/bin
ACTION=""

clear
cd $FOLDER
echo "Запуск Artix Virtual Pos"
./artix-vpos
CODEOFRET=`cat /tmp/cashstatuscode`
case "$CODEOFRET" in
  "0")
    ;;
  "1") #shutdwon
    ACTION="menu/20_halt"
    ;;
  "2") #reboot
    ACTION="menu/40_reboot"
    ;;
  *) #restart POS
    ACTION="menu/60_restart"
    ;;
esac
cat > $RESULTFILE <<EOF
$ACTION
EOF
