mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
非windows系统才需要chmod
This commit is contained in:
parent
e094c22952
commit
4fccc81697
@ -55,11 +55,12 @@ public abstract class AbstractScriptProcessor extends CommonBasicProcessor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 授权
|
// 授权
|
||||||
ProcessBuilder chmodPb = new ProcessBuilder("/bin/chmod", "755", scriptPath);
|
if ( !SystemUtils.IS_OS_WINDOWS) {
|
||||||
// 等待返回,这里不可能导致死锁(shell产生大量数据可能导致死锁)
|
ProcessBuilder chmodPb = new ProcessBuilder("/bin/chmod", "755", scriptPath);
|
||||||
chmodPb.start().waitFor();
|
// 等待返回,这里不可能导致死锁(shell产生大量数据可能导致死锁)
|
||||||
omsLogger.info("[SYSTEM] chmod 755 authorization complete, ready to start execution~");
|
chmodPb.start().waitFor();
|
||||||
|
omsLogger.info("[SYSTEM] chmod 755 authorization complete, ready to start execution~");
|
||||||
|
}
|
||||||
// 2. 执行目标脚本
|
// 2. 执行目标脚本
|
||||||
ProcessBuilder pb = new ProcessBuilder(getRunCommand(), scriptPath);
|
ProcessBuilder pb = new ProcessBuilder(getRunCommand(), scriptPath);
|
||||||
Process process = pb.start();
|
Process process = pb.start();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user