Code: Select all
#!/bin/bash
tail -f /var/log/messages | grep --line-buffered 'frontdoor.*Gone into alarm state' | while read line; do aplay /dog1.wav; done
I set cron to start it and stop as I need. frontdoor is a camera name dog1.wav is the wave file saved in /