hi,

but when you run the script by typing 
/Users/path/to/the/script/sms.sh x y z
n your console you get any output to 
the sms_messages.txt file?

Another thing you can try is typing in your terminal:

which bash

possibly you have to correct the path to your bash in the first row.

if you get a output into the file, then it should be a problem with
kannel.

i think you have make much changes in the sms.sh already. how it looks
currently? 

br,
thomas


On Mon, Jun 07, 2010 at 02:01:27PM +0200, Martin J. wrote:
| Wow, this was really timeconsuming challenge for me...
| 
| Had to spend plenty of hours on googling for the exec line to see how other 
people did it and nothing worked, including write permissions etc. etc....
| 
| I even began to dig into the source code to try to see if there was/is a bug 
somewhere. I think the exec-code gets executed in ./gw/urltrans.c?
| 
| I was thinking about recompiling everything with debug flags (-o0 -g, AFAIR) 
and then set a breakpoint just before running the exec-code (btw: what should I 
remember if I recompile with full debug flags, if anything?)...
| 
| I finally succeeded by finding a piece of a configuration file that I stole 
from. Here's my new config-part regarding sms-service (and this solved my 
problem):
| 
| ------------------------------------------
| group = sms-service
| keyword = default
| exec = ./sms.sh a=%a t=%t q=%q Q=%Q I=%I d=%d A=%A F=%F n=%n c=%c m=%m M=%M 
C=%C u=%u B=%B o=%o O=%O f=%f
| # if max-messages = 0, then error "No reply sent, denied"
| max-messages = 0
| #text = "Thank you! I appreciate your sms..."
| concatenation = true
| catch-all = yes
| #white-list = "http://localhost/whitelist";
| ------------------------------------------
| 
| After I have looked a bit in urltrans.c, I believe my problem was that I 
DIDN'T comment out the "text"-field and I guess that EITHER you have a 
text-reply ("Thank you!. ...") OR you have an exec-statement... Am I right?
| 
| At least it works now using above config-file... I'm only a bit annoyed by 
the fact that in  my incoming sms text file, all blank spaces are made into 
plus / "+"'es and I think a plus / "+" is made into "%2B" - this looks stupid 
in plain text when I "cat" the file.... 
| 
| Well, these are just minor things which I guess I can live with (search and 
replace plus'es with blank spaces or something)...
| 
| 
| Any comments?
| 
| And thanks again! Now somebody else perhaps can use my experience, if they 
get the same problem as me with the malfunctioning exec-statement :-)
| 
| 
| 
| Regards,
| Martin
| 
| 
| On Jun 7, 2010, at 4:35 AM, Thomas Sieh wrote:
| 
| > this should not be your problem. if you execute the script by hand and
| > you don't get the corresponding output in the result file, there is a
| > problem with the script. I think with the permission from the
| > resultfile, if you have execute permissions to the script file.
| > 
| > br,
| > thomas

Attachment: signature.asc
Description: Digital signature

Reply via email to