1 6 7 package com.quikj.application.utilities.postinstall; 8 9 13 public class ScriptExecutor 14 { 15 16 17 public ScriptExecutor() 18 { 19 } 20 21 public static String executeUnixInitScript(String ace_folder, 22 ScreenPrinterInterface out) 23 { 24 try 25 { 26 String exec_path = "/bin/sh " 27 + ace_folder + "/bin/init"; 28 out.println("# " + exec_path + "..."); 29 Process p = Runtime.getRuntime().exec(exec_path); 30 p.waitFor(); 31 32 exec_path = "/bin/sh " 33 + ace_folder + "/bin/fix_perms.sh"; 34 out.println("# " + exec_path + "..."); 35 p = Runtime.getRuntime().exec(exec_path); 36 p.waitFor(); 37 } 38 catch (Exception ex) 39 { 40 return "Failed to run the shell scripts"; 41 } 42 43 return null; 44 } 45 } 46 | Popular Tags |