Groovy Documentation

org.hidetake.gradle.ssh.extension
[Groovy] Class SudoExecution

java.lang.Object
  org.hidetake.gradle.ssh.extension.SudoExecution

@Category(SessionHandler)
@Slf4j
class SudoExecution

An extension class of sudo command execution.

Authors:
hidetake.org


Method Summary
java.lang.String executeSudo(java.lang.String command)

Performs a sudo operation, explicitly providing password for the sudo user.

java.lang.String executeSudo(java.util.HashMap settings, java.lang.String command)

Performs a sudo operation, explicitly providing password for the sudo user.

void executeSudo(java.lang.String command, groovy.lang.Closure callback)

Performs a sudo operation, explicitly providing password for the sudo user.

void executeSudo(java.util.HashMap settings, java.lang.String command, groovy.lang.Closure callback)

Performs a sudo operation, explicitly providing password for the sudo user.

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Method Detail

executeSudo

java.lang.String executeSudo(java.lang.String command)
Performs a sudo operation, explicitly providing password for the sudo user. This method blocks until channel is closed.
Returns:
output value of the command
Parameters:
command


executeSudo

java.lang.String executeSudo(java.util.HashMap settings, java.lang.String command)
Performs a sudo operation, explicitly providing password for the sudo user. This method blocks until channel is closed.
Returns:
output value of the command
Parameters:
settings - execution settings
command


executeSudo

void executeSudo(java.lang.String command, groovy.lang.Closure callback)
Performs a sudo operation, explicitly providing password for the sudo user. This method blocks until channel is closed.
Parameters:
command
callback - closure called with an output value of the command


executeSudo

void executeSudo(java.util.HashMap settings, java.lang.String command, groovy.lang.Closure callback)
Performs a sudo operation, explicitly providing password for the sudo user. This method blocks until channel is closed.
Parameters:
settings - execution settings
command
callback - closure called with an output value of the command


 

Groovy Documentation