#!/bin/bash
#
# Disable weather alert messages
# by adding $LOCAL/no_wxalert_msg file
# $Id: enable_wx_alertmsg 70 2011-02-27 22:30:57Z  $

# 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
    rm $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 enabled.."
    $BIN/unkey
fi

exit 0
