Circlean/fs_filecheck/opt/groomer/music.sh

22 lines
248 B
Bash
Executable File

#!/bin/bash
set -e
#set -x
source ./config.sh
killed(){
echo 'Music stopped.'
}
trap killed EXIT TERM INT
# Force output on analog
amixer cset numid=3 1
files=(${MUSIC}*)
while true; do
$TIMIDITY ${files[RANDOM % ${#files[@]}]}
done