| Line 2053... |
Line 2053... |
| 2053 |
if (Arrays.asList("amit.gupta@smartdukaan.com", "shivam.gupta@smartdukaan.com", "vinay.p@smartdukaan.com").contains(loginDetails.getEmailId())) {
|
2053 |
if (Arrays.asList("amit.gupta@smartdukaan.com", "shivam.gupta@smartdukaan.com", "vinay.p@smartdukaan.com").contains(loginDetails.getEmailId())) {
|
| 2054 |
String ipAddress = "45.79.106.95";
|
2054 |
String ipAddress = "45.79.106.95";
|
| 2055 |
int port = 22;
|
2055 |
int port = 22;
|
| 2056 |
String username = "root";
|
2056 |
String username = "root";
|
| 2057 |
String password = "spic@2015shop2020";
|
2057 |
String password = "spic@2015shop2020";
|
| 2058 |
String remoteDirectoryPath = "/tmp/abc";
|
- |
|
| 2059 |
String command = "./restart-services.sh";
|
2058 |
String restartServices = "./restart-services.sh";
|
| 2060 |
sshService.RestartServer(ipAddress, port, username, password, remoteDirectoryPath, command, null);
|
2059 |
sshService.executeCommand(ipAddress, port, username, password, restartServices);
|
| 2061 |
model.addAttribute("response1", mvcResponseSender.createResponseString(true));
|
2060 |
model.addAttribute("response1", mvcResponseSender.createResponseString(true));
|
| 2062 |
} else {
|
2061 |
} else {
|
| 2063 |
model.addAttribute("response1", mvcResponseSender.createResponseString(false));
|
2062 |
model.addAttribute("response1", mvcResponseSender.createResponseString(false));
|
| 2064 |
}
|
2063 |
}
|
| 2065 |
return "response";
|
2064 |
return "response";
|
| Line 2071... |
Line 2070... |
| 2071 |
if (Arrays.asList("amit.gupta@smartdukaan.com", "shivam.gupta@smartdukaan.com", "vinay.p@smartdukaan.com").contains(loginDetails.getEmailId())) {
|
2070 |
if (Arrays.asList("amit.gupta@smartdukaan.com", "shivam.gupta@smartdukaan.com", "vinay.p@smartdukaan.com").contains(loginDetails.getEmailId())) {
|
| 2072 |
String ipAddress = "45.79.106.95";
|
2071 |
String ipAddress = "45.79.106.95";
|
| 2073 |
int port = 22;
|
2072 |
int port = 22;
|
| 2074 |
String username = "root";
|
2073 |
String username = "root";
|
| 2075 |
String password = "spic@2015shop2020";
|
2074 |
String password = "spic@2015shop2020";
|
| 2076 |
String remoteDirectoryPath = "/tmp/abc";
|
- |
|
| 2077 |
String rebootCommand = "reboot";
|
2075 |
String rebootCommand = "reboot";
|
| 2078 |
|
2076 |
|
| 2079 |
sshService.RestartServer(ipAddress, port, username, password, remoteDirectoryPath, null, rebootCommand);
|
2077 |
sshService.executeCommand(ipAddress, port, username, password, rebootCommand);
|
| 2080 |
model.addAttribute("response1", mvcResponseSender.createResponseString(true));
|
2078 |
model.addAttribute("response1", mvcResponseSender.createResponseString(true));
|
| 2081 |
} else {
|
2079 |
} else {
|
| 2082 |
model.addAttribute("response1", mvcResponseSender.createResponseString(false));
|
2080 |
model.addAttribute("response1", mvcResponseSender.createResponseString(false));
|
| 2083 |
}
|
2081 |
}
|
| 2084 |
return "response";
|
2082 |
return "response";
|