#!/bin/bash
#
# Disable weather alert messages
# by adding $LOCAL/no_wxalert_msg file
# $Id: disable_wx_alertmsg 51 2009-06-16 02:43:41Z  $


# Load config file

if [ -f ${CUSTOM}/wx_scripts.conf ] ; then
    source ${CUSTOM}/wx_scripts.conf
else
    echo "Missing ${CUSTOM}/wx_scripts.conf file, aborting..."
    exit 1
fi

if [ !  -f $LOCAL/no_wxalert_msg ] ; then
    touch $LOCAL/no_wxalert_msg
fi

if [ $TEXT2SPEECH = "cepstral" ] ; then
    $BIN/key
    $SWIFTBIN -p audio/encoding=ulaw,audio/sampling-rate=8000,audio/volume=$SWIFT_VOL ".. weather alert messages disabled.."
    $BIN/unkey
fi

exit 0
