#!/bin/bash
MINBASE=/usr/local/minerva
VARLOG=/var/log/minerva

date +"%F %H:%M CMD $0 $*" >>$VARLOG/bearskin/`basename $0`


VOICE=default
if [ -f $MINBASE/etc/defaults/samplevox ]; then
   VOICE=`cat $MINBASE/etc/defaults/samplevox`
fi

VOXDIR=$MINBASE/media/voices/$VOICE
VOXMESSAGE=$VOXDIR/messages/goodnight.wav

if [ -f $VOXMESSAGE ]; then
  $MINBASE/bin/wavplayer default play $VOXMESSAGE
else
  $MINBASE/bin/say default Good night
fi

$MINBASE/bin/x10control default off bedroom
$MINBASE/bin/x10control default off studio
$MINBASE/bin/x10control default off lounge


