/*
* シェルスクリプトを運行
*/
public String exec(String command) {
StringBuffer output = new StringBuffer();
Log.d("exec", command);
try {
Process process = Runtime.getRuntime().exec(command);
DataInputStream stdout = new DataInputStream(
process.getInputStream());
String line;
while ((line = stdout.readLine()) != null) {
output.append(line).append('\n');
}
process.waitFor();
} catch (Exception e) {
PACERUtil.setLog("JAVA-ERROR", versionOld, "SHELL ERROR", storeCD, IP, macAddress);
finish();
}
return output.toString();
}