no message

main
이범준 3 months ago
parent 90c9f12c9c
commit 9244243b23

@ -0,0 +1,53 @@
import org.apache.log4j.Logger;
public class SshCurl {
public static final Logger logger = Logger.getLogger(SshSh.class);
private static String targetSys = "";
public static void main(String[] args) {
if(args.length != 1) {
System.err.println("총 1개의 args를 입력하지 않았습니다.");
System.exit(0);
return;
}
targetSys = args[0];
SshCurl self = new SshCurl();
try {
self.run();
} catch (Exception e) {
e.printStackTrace();
}
}
private void run() throws Exception {
FTPUtil ssh = new FTPUtil();
ssh.initExec("175.193.201.56", "tmax","tmax1234", 10040);
try {
String cmd = "";
String cmdPrefix = "curl -X GET http://175.193.201.146:92/relay/touch?sys=";
if(targetSys.equals("monitoring")) {
cmd = cmdPrefix+"monitoring";
} else {
}
if(!cmd.equals("")) {
ssh.setCommand(cmd);
}
ssh.disconnectExec();
} catch (Exception e) {
}
return;
}
}

@ -0,0 +1,11 @@
#!/bin/bash
#!/usr/bin/expect -f
if [ $# -lt 1]
then
echo "I Hope your input. [TARGET_SYS]"
exit
fi
TARGET_SYS=$1
java -jar /gpta/source-app/cfs/relay_jar/ssh-curl.jar $TARGET_SYS &
Loading…
Cancel
Save