<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.10.3">
</HEAD>
<BODY>
I saw in the page.log this line:<BR>
<BR>
sox: Can't open output file '/dev/dsp': Permission denied<BR>
<BR>
I changed this and now is shouting all my alerts.<BR>
<BR>
<TT>root@larissa:~# ll /dev/dsp</TT><BR>
<TT>crw-rw---- 1 root audio 14, 3 2006-09-07 17:24 /dev/dsp</TT><BR>
<TT>root@larissa:~# chmod 666 /dev/dsp</TT><BR>
<TT>root@larissa:~# ll /dev/dsp</TT><BR>
<TT>crw-rw-rw- 1 root audio 14, 3 2006-09-07 17:24 /dev/dsp</TT><BR>
<BR>
<BR>
Muchas gracias.<BR>
Saludos desde Veracruz, México.<BR>
<BR>
On Wed, 2006-09-13 at 22:10 +0200, Henrik Stoerner wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">On Wed, Sep 13, 2006 at 11:58:25AM -0500, Francisco Carmona Leon wrote:</FONT>
<FONT COLOR="#000000">> I need help to make this work.</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> this is my configuration:</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> hobbit-alerts.cfg</FONT>
<FONT COLOR="#000000">> HOST=*</FONT>
<FONT COLOR="#000000">>         SCRIPT /usr/local/bin/smalert 1234123400 FORMAT=SMS</FONT>

<FONT COLOR="#000000">Looks ok.</FONT>

<FONT COLOR="#000000">> script</FONT>
<FONT COLOR="#000000">> #!/bin/sh</FONT>
<FONT COLOR="#000000">> /usr/local/bin/lee '"$BBHOSTNAME" alerta "$BBCOLORLEVEL" servicio</FONT>
<FONT COLOR="#000000">> "$BBSVCNAME" con la direccion "$MACHIP" fuera por "$DOWNSECS"'</FONT>

<FONT COLOR="#000000">There's a problem with the quoting of this. In most cases I've seen,</FONT>
<FONT COLOR="#000000">when you put something inside single quotes in a shell, then environment</FONT>
<FONT COLOR="#000000">variables are NOT expanded by the shell. E.g.:</FONT>

<FONT COLOR="#000000">   $ echo '"$BBHOSTNAME" alerta "$BBCOLORLEVEL"'</FONT>
<FONT COLOR="#000000">   "$BBHOSTNAME" alerta "$BBCOLORLEVEL"</FONT>

<FONT COLOR="#000000">> I'm using the script option in my hobbit-alerts.cfg file because I need</FONT>
<FONT COLOR="#000000">> to send a voice alert in my site but it doesn't work.</FONT>

<FONT COLOR="#000000">"doesn't work" is fairly broad. Does your script get called when you</FONT>
<FONT COLOR="#000000">expect it to ? You can put a statement into the script to log something</FONT>
<FONT COLOR="#000000">to a file, so you can see if the script runs at all. My guess is that</FONT>
<FONT COLOR="#000000">the script does run, but your script doesn't do as you expect it to.</FONT>
<FONT COLOR="#000000">In that case, try running your script by hand:</FONT>

<FONT COLOR="#000000">   BBHOSTNAME=myhost BBCOLORLEVEL=yellow \</FONT>
<FONT COLOR="#000000">   BBSVCNAME=conn MACHIP=10.0.0.1 \</FONT>
<FONT COLOR="#000000">   DOWNSECS=120 \</FONT>
<FONT COLOR="#000000">   /path/to/script 1234123400</FONT>

<FONT COLOR="#000000">You can also look at the "page.log" file in the hobbit logs directory;</FONT>
<FONT COLOR="#000000">this captures any error messages generated by your script.</FONT>


<FONT COLOR="#000000">Regards,</FONT>
<FONT COLOR="#000000">Henrik</FONT>


<FONT COLOR="#000000">To unsubscribe from the hobbit list, send an e-mail to</FONT>
<FONT COLOR="#000000"><A HREF="mailto:hobbit-unsubscribe@hswn.dk">hobbit-unsubscribe@hswn.dk</A></FONT>


</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>