#!/bin/sh

CAMNAME="Scam 3.59"

remove_tmp () {
  rm -rf /tmp/*.info* /tmp/*.tmp*
}

case "$1" in
  start)
  echo "[SCRIPT] $1: $CAMNAME"
  remove_tmp
  /usr/bin/scam_3.59 &
  ;;
  stop)
  echo "[SCRIPT] $1: $CAMNAME"
  killall -9 $ scam_3.59 2>/dev/null
  remove_tmp
  ;;
  *)
  $0 stop
  exit 0
  ;;
esac

exit 0
