#Station Announcement script - by WA2DCI for AB1AI # !/bin/bash . /home/irlp/custom/environment # Make sure we are user repeater!!! if [ `/usr/bin/whoami` != "repeater" ] ; then echo This program must be run as user REPEATER! exit 1 fi # Only run if enabled and not active if [ ! -f "$LOCAL"/enable -o -f "$LOCAL"/active ] ; then exit 1 fi # Declare varibles declare -i TIMER=0 # Set amount of inactivity in seconds TIME=2 #echo "Checking for inactivity before announcement" while [ $TIMER -lt $TIME ] ; do while [ TRUE ] ; do if $BIN/cosstate ; then if $BIN/pttstate ; then break fi fi #echo -en "\rCOS or PTT is active" # In use cancel announcement exit 1 #usleep 5000 done TIMER=$TIMER+1 sleep 1 #edit your wav file here done sleep 1 forcekey play "$CUSTOM"/audio/onthehour.wav forceunkey EOF ---------------------------------------------------------- Then add this to /home/irlp/custom: # Entry to run an announcement every hour 00 * * * * (/home/irlp/custom/announce > /dev/null 2>&1)