#!/bin/sh

case "$1" in 
start)
  if [ -f /FisGo/update.sh ]
  then
      cd /FisGo/ && ./update.sh
      rm /FisGo/update.sh
      reboot
  else
      # start update scripts
      cd /userScripts
      ./updateFiscatScript.sh
      ./updateCorrScript.sh &

      # start Dreamkas software
      ifconfig lo up
      #start preset
      cd /FisGo/
      ./preset &
      sleep 1
      #start setburn (printer burn setting)
      if [ -f /FisGo/setburn ]
        then
        ./setburn /dev/ttyS10 0 850
        sleep 1
      fi
      #start punix
      ./punix &
      sleep 2
	  #start fiscat
      ./fiscat &
      cd /etc/init.d/
  fi
  ;;

*)
  ;;
esac
