Browse Source

Potentially fix time check code.

master
Dan Helfman 2 months ago
parent
commit
e8fa42f860
  1. 6
      play-by-number

6
play-by-number

@ -8,10 +8,10 @@ function kill_music_processes() {
apply_quiet_hours () {
hour=$(TZ="America/Los_Angeles" date +"%H")
if [[ $hour -ge 21 ]] || [[ $hour -le 7 ]] ; then
if [ $hour -ge 21 ] || [ $hour -le 7 ] ; then
kill_music_processes
fi
if [[ $hour -ge 20 ]] || [[ $hour -le 8 ]] ; then
if [ $hour -ge 20 ] || [ $hour -le 8 ] ; then
amixer sset 'Master' 50%
else
amixer sset 'Master' 85%
@ -39,7 +39,7 @@ while [ true ] ; do
read -s song_number
hour=$(TZ="America/Los_Angeles" date +"%H")
if [[ $hour -ge 21 ]] || [[ $hour -le 7 ]] ; then
if [ $hour -ge 21 ] || [ $hour -le 7 ] ; then
play_local media/beep.mp3 # error beep
continue
fi

Loading…
Cancel
Save