Problem with X-PRE-PROCESS cmd="exec" and recursive wget
Greetings, I need to grab content of all .xml files in a dir recursively with wget. My test folder contains context1.xml and context2.xml. I do the following in freeswitch.xml: <X-PRE-PROCESS cmd="exec" data="wget -r -l 1 -np -nd -A xml -q -O - ftp://myhost/"/> Problem: it does not insert any lines after I "reloadxml" and check in freeswitch.xml.fsxml If I run the same from terminal wget returns lines that I expect: [victor@hostname]# wget -r -l 1 -np -nd -A xml -q -O - ftp://myhost/ <context name="context1"> </context> <context name="context2"> </context> [victor@hostname]# So, I'm puzzled why FS does not pick-up what "wget -r" writes into stdout? Or does it? :-) For comparison, X-PRE-PROCESS works with the same files requested non-recursively: <X-PRE-PROCESS cmd="exec" data="wget -q -O - ftp://myhost/context1.xml"/> <X-PRE-PROCESS cmd="exec" data="wget -q -O - ftp://myhost/context2.xml"/> Thank you, Victor
Ok, figured it out. What happens is that wget tries to create temporary .listing file and fails: Logging in as anonymous ... Logged in! ==> SYST ... done. ==> PWD ... done. ==> TYPE I ... done. ==> CWD (1) /myhost/ ... done. ==> PASV ... done. ==> LIST ... done. .listing: Permission denied When I run "reloadxml" wget is started as a non-root user and it tries to create .listing in the filesystem root. Fixed by changing directory before running wget: <X-PRE-PROCESS cmd="exec" data="cd /user/local/freeswitch && wget -r -l 1 -np -nd -A xml -q -O - ftp://myhost/"/> On 13-11-06 04:26 PM, Victor Chukalovskiy wrote:
Greetings,
I need to grab content of all .xml files in a dir recursively with wget. My test folder contains context1.xml and context2.xml. I do the following in freeswitch.xml:
<X-PRE-PROCESS cmd="exec" data="wget -r -l 1 -np -nd -A xml -q -O - ftp://myhost/"/> Problem: it does not insert any lines after I "reloadxml" and check in freeswitch.xml.fsxml
If I run the same from terminal wget returns lines that I expect: [victor@hostname]# wget -r -l 1 -np -nd -A xml -q -O - ftp://myhost/ <context name="context1"> </context> <context name="context2"> </context> [victor@hostname]#
So, I'm puzzled why FS does not pick-up what "wget -r" writes into stdout? Or does it? :-)
For comparison, X-PRE-PROCESS works with the same files requested non-recursively: <X-PRE-PROCESS cmd="exec" data="wget -q -O - ftp://myhost/context1.xml"/> <X-PRE-PROCESS cmd="exec" data="wget -q -O - ftp://myhost/context2.xml"/>
Thank you, Victor
participants (1)
-
Victor Chukalovskiy