#!/bin/sh
# The script to play beep sound and say current hour. Usually it is called through cron daemon.
# Michael Pozhidaev <msp@altlinux.org>
# Date: 2011-11-27

SOUND='/usr/share/sounds/voiceman/clock.wav'

[ "$(who | wc -l)" == 0 ] && exit 0
/usr/bin/voiceman --stop
/usr/bin/aplay "$SOUND" &> /dev/null
/usr/bin/voiceman --say "now $(date +%H) oh clock"
