You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.1 KiB

#!/bin/bash
#
# clearWxAlert
#
# $Id: clearWxAlerts 61 2011-01-30 16:08:13Z $
# Clears and removes playWxAlertBg lockfiles. This script should be used
# when debugging or during a force clear of alerts. The main function
# is to remove all of the playWxAlertBg programs, remove all lock files.
#
# 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
# Variables
WXALERTDIR=${WXALERT_SPOOLDIR}
# Check if any playWxAlertBg files are running, if so, killem
echo -n "Stopping Weather Alert Messages..."
killall playWxAlertBg &> /dev/null 2>&1
echo " Done."
# cleanup the lock files
echo -n "Removing lock files from /tmp..."
rm -f /tmp/playWxAlertBg-lock &> /dev/null 2>&1
echo " Done."
# clean up the Alert directories
echo -n "Cleaning up the alert weather directories..."
rm -f $WXALERTDIR/*/* &> /dev/null 2>&1
echo " Done."
# clean up the tmp Wx Directories
echo -n "Removing temporary files in /tmp/wx.."
rm -f /tmp/wx/*/* &> /dev/null 2>&1
echo " Done."

Powered by TurnKey Linux.