]>
git.argeo.org Git - gpl/argeo-slc.git/blob - demo/modules/org.argeo.slc.demo.basic/META-INF/spring/systemCall.xml
1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <beans xmlns=
"http://www.springframework.org/schema/beans"
3 xmlns:
xsi=
"http://www.w3.org/2001/XMLSchema-instance" xmlns:
p=
"http://www.springframework.org/schema/p"
4 xmlns:
aop=
"http://www.springframework.org/schema/aop" xmlns:
flow=
"http://www.argeo.org/schema/slc-flow"
6 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
7 http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
8 http://www.argeo.org/schema/slc-flow http://www.argeo.org/schema/slc-flow-0.12.xsd">
10 <!-- Basic echo, should work on all OSs -->
11 <flow:flow name=
"os/systemCall">
12 <bean p:
cmd=
"echo Hello World!" class=
"org.argeo.slc.core.execution.tasks.SystemCall" />
15 <!-- Must disable requiretty in sudoers file -->
16 <flow:flow name=
"os/sudo">
17 <bean p:
cmd=
"sudo id" class=
"org.argeo.slc.core.execution.tasks.SystemCall">
18 <property name=
"environmentVariables">
20 <entry key=
"SUDO_ASKPASS" value=
"/usr/libexec/openssh/gnome-ssh-askpass" />
27 <flow:flow name=
"os/ssh">
28 <bean p:
cmd=
"ls /etc" class=
"org.argeo.slc.core.execution.tasks.SystemCall">
29 <property name=
"executor" ref=
"sshExecutor" />
33 <bean name=
"sshExecutor" class=
"org.argeo.slc.jsch.JschExecutor">
34 <property name=
"sshTarget">
35 <bean p:
host=
"localhost" p:
port=
"22" p:
user=
"${user.name}"
36 p:
localPrivateKey=
"${user.home}/.ssh/id_rsa" class=
"org.argeo.slc.jsch.SshTarget">
37 <property name=
"userInfo">
38 <bean class=
"org.argeo.slc.jsch.SwingUserInfo" />