Robert Michel
2006-Jul-01 12:45 UTC
[Asterisk-Users] can't run "cat $filename" inside scripts with system()
Asterisk 1.2.1 built by kk @ nyx on a x86_64 running Linux
on 2006-01-02 00:19:54 UTC
Salve!
I can't run "cat $filename" inside scripts with system()
Simple example for my problem:
#test.source:
yes
#test.bash
#!/bin/bash
u=test.source
cat $u >> test.out
touch test.out
chmod uoa+rwx test.*
When I run ./test.sh test.out got a new line with "yes".
But when I run it from asterisk:
exten => 228,1,Answer()
exten => 228,2,System(/etc/asterisk/scripts/test.sh)
exten => 228,3,Playback(vm-goodbye)
exten => 228,4,Hangup
I got *no* new line. ;(
What is the key?
What do I have to know?
Greetings,
rob
PS: I know that chmod uoa+rwx test.* is no good idea,
this is only for this test. ;)
Robert Michel
2006-Jul-01 17:00 UTC
[solved] sorry... ; ) Re: [Asterisk-Users] can't run "cat $filename" inside scripts with system()
Salve! Sorry for the traffic on this list, On Sat, 01 Jul 2006, Robert Michel wrote:> I can't run "cat $filename" inside scripts with system()I should have set chmod o+x for the directories as well... *shame on me* ;) BTW is there a verbose level for the CLI, that gives all system() errors? rob