#!/bin/bash

# Make sure we are user repeater!!!
if [ `/usr/bin/whoami` != "repeater" ] ; then
  echo This program must be run as user REPEATER!
  exit 1
fi

# Make sure we have sourced the environment file
if [ "$RUN_ENV" != "TRUE" ] ; then
  echo "You must source the environment file first. Do this by running:"
  echo ". /home/irlp/custom/environment"
  exit 1
fi

# if [ -f $LOCAL/active ] ; then exit 0 ; fi

touch $LOCAL/nodtmf
$BIN/cosstate
$BIN/key
usleep 900000
wavplay custom/dtmfdisable
cd /home/irlp/custom
$BIN/unkey
exit 0
