Subversion Repositories SmartDukaan

Rev

Rev 32336 | Rev 32407 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 32336 Rev 32337
Line 2048... Line 2048...
2048
        int port = 22;
2048
        int port = 22;
2049
        String username = "root";
2049
        String username = "root";
2050
        String password = "spic@2015shop2020";
2050
        String password = "spic@2015shop2020";
2051
        String remoteDirectoryPath = "/tmp/abc";
2051
        String remoteDirectoryPath = "/tmp/abc";
2052
        String command = "./restart-services.sh";
2052
        String command = "./restart-services.sh";
-
 
2053
        sshService.RestartServer(ipAddress, port, username, password, remoteDirectoryPath, command,null);
-
 
2054
        model.addAttribute("response1", mvcResponseSender.createResponseString(true));
-
 
2055
        return "response";
-
 
2056
    }
-
 
2057
 
-
 
2058
    @GetMapping("/rebootServer")
-
 
2059
    public String rebootServer(HttpServletRequest request,Model model) throws Exception {
-
 
2060
        String ipAddress = "45.79.106.95";
-
 
2061
        int port = 22;
-
 
2062
        String username = "root";
-
 
2063
        String password = "spic@2015shop2020";
-
 
2064
        String remoteDirectoryPath = "/tmp/abc";
-
 
2065
        String rebootCommand = "reboot";
2053
 
2066
 
2054
        sshService.RestartServer(ipAddress, port, username, password, remoteDirectoryPath, command);
2067
        sshService.RestartServer(ipAddress, port, username, password, remoteDirectoryPath,null, rebootCommand);
2055
        model.addAttribute("response1", mvcResponseSender.createResponseString(true));
2068
        model.addAttribute("response1", mvcResponseSender.createResponseString(true));
2056
        return "response";
2069
        return "response";
2057
    }
2070
    }
2058
    @GetMapping("/getRestartServer")
2071
    @GetMapping("/getRestartServer")
2059
    public String getRestartServer(HttpServletRequest request,Model model) {
2072
    public String getRestartServer(HttpServletRequest request,Model model) {