Page 1 of 1

Can't get audio files to play as script

Posted: Thu Mar 31, 2011 9:20 pm
by tamray
I have been trying to get an audio alert to play when a filter is triggered . Syslog shows the script is firing off, and I have verified it works manually, but when zonminder launches the script I get the following, and no audio:

Mar 31 16:05:12 linuxmint pulseaudio[6466]: core-util.c: Home directory /var/www not ours.
Mar 31 16:05:12 linuxmint pulseaudio[6466]: lock-autospawn.c: Cannot access autospawn lock.
Mar 31 16:05:12 linuxmint pulseaudio[6466]: main.c: Failed to acquire autospawn

The script is very simple:

#!/bin/bash
play sound.wav

Re: Can't get audio files to play as script

Posted: Fri Apr 01, 2011 4:50 am
by robert999
Probably permissions. It should be executable by the same user running ZM and Apache, and you'll want full pathnames for the .wav file and probably the play command as well. That same user needs to access the audio device. You probably have an audio group. Add that user running ZM/Apache to the audio group, and give it a try.