#!/bin/bash # # JI1BQW regular id script # # Plays custom/my_id at 00, 20, 40 minutes of every hour # # Please use this with your own risk. # # 01/07/2006 # [ -z "$SCRIPT" ] && SCRIPT=/home/irlp/scripts source $SCRIPT/common-functions.sh # 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 function play_id () { if [ -f "$LOCAL"/enable -a ! -f "$LOCAL"/active ] ; then killall ispeaker >&/dev/null 2>&1 killall ispeaker_PCI >&/dev/null 2>&1 killall sfswrapper >&/dev/null 2>&1 date $SCRIPT/wavplay custom/my_id fi } MIN=00 while [ 1 ] ; do if [ "$MIN" -eq "00" -o "$MIN" -eq "20" -o "$MIN" -eq "40" ]; then play_id fi sleep 60 MIN=`date +%M` done exit 0