Can't get audio files to play as script

Forum for questions and support relating to the 1.24.x releases only.
Locked
tamray
Posts: 14
Joined: Tue Feb 22, 2011 4:32 pm

Can't get audio files to play as script

Post 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
robert999
Posts: 11
Joined: Tue Mar 15, 2011 1:22 am

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

Post 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.
Locked