As of Karaf 2.2.5 you are able to specify the pid in all config commands as an 
option, which makes it easier to use from ssh.
For example you can directly use something like this in a single command:

config:propset --pid MyPID MyProperty MyValue


On 10 Ιαν 2012, at 1:26 μ.μ., kmoens wrote:

> Tx for your reply.
> 
> Found out that a simple line separator iso a space seperates different
> commands...
> 
> In my case I create a StringBuilder with the different commands with the
> separator:
> 
> sb.append("config:edit MyPID");
> sb.append(System.getProperty("line.separator"));
> sb.append("config:propset MyProperty MyValue");
> sb.append(System.getProperty("line.separator"));
> sb.append("config:update");
> 
> and use this to create the ssh channel:
> 
> channel = session.createChannel("exec", sb.toString());
> 
> 
> 
> 
> --
> View this message in context: 
> http://karaf.922171.n3.nabble.com/multiple-ssh-commands-programatically-tp3644509p3647352.html
> Sent from the Karaf - User mailing list archive at Nabble.com.

Ioannis Canellos
FuseSource

Blog: http://iocanel.blogspot.com
Apache Karaf Committer & PMC
Apache Camel Committer
Apache ServiceMix  Committer
Apache Gora Committer
Apache DirectMemory Committer

Reply via email to