#!/bin/bash # # KK7AV CWID # Alternate callsign script # http://irlp.kk7av.com/scripts/alt_callsign # ################################################## ##### USER CONFIGURABLE SETTINGS ##### # # Sets the amplitude of the CW (ranges from a minimum of '.01', to a maximum of '.99') # A value of approx. '.50' is probably pretty close for most users since you will # typically want the CW identifier to be, 'subdued' when compared to voice audio level. volume=".50" # # Sets the location of the wav file to be used for your ID location="/path/to/wavfile.wav" # ### END USER CONFIG SETTINGS ### ############################ # NO MODS BELOW THIS LINE # ############################ # exit if there is an active instance already executing if [ -f $LOCAL/cw ] ; then exit 1 fi # ensure script is run as repeater user if [ `/usr/bin/whoami` != "repeater" ] ; then exit 1 fi # ensure the environment file has been sourced if [ "$RUN_ENV" != "TRUE" ] ; then . /home/irlp/custom/environment fi # make sure the play binary is installed if [ ! `which play` ]; then exit 1 fi touch $LOCAL/cw play -v $volume $location >&/dev/null 2>&1 rm -f $LOCAL/cw exit 0