[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to use the camel-ssh feature to help me manage remote services such as the nginx reload command

The pollCommand can be used only on a consumerEndpoint.

So you should have from("ssh://root@192...?pollCommand=reboot%0A")

Also it's pollCommand and not poll-command

Andrea Cosentino 
Apache Camel PMC Chair
Apache Karaf Committer
Apache Servicemix PMC Member
Email: ancosen1985@xxxxxxxxx
Twitter: @oscerd2
Github: oscerd

On Monday, December 17, 2018, 3:09:08 PM GMT+1, 谭文亮 <winlia520@xxxxxxxxxxx> wrote: 

I have a need

First I sync the file to the web server via camel-sftp

After transferring the file, do the nginx -s reload command on each server.

My code is as follows

But why pollcomand doesn't work

from("file:I:/workProject/java/xxxx/luaFiles/").multicast().to("direct:a", "direct:b").end().to("direct:c");
        from("direct:c").to("ssh://root:root@;pollCommand=nginx -s reload %0A").log("done !!${body}");

how to 
please help