2
0
mirror of https://github.com/narkoz/hacker-scripts synced 2025-08-22 18:37:10 +00:00

Added a groovy version of fucking_coffee

This commit is contained in:
gandrianakis 2015-12-07 13:11:33 +02:00
parent c300bc5996
commit 7669e87e0a

View File

@ -0,0 +1,26 @@
@Grab(group='org.hidetake', module='groovy-ssh', version='1.1.8')
@GrabExclude('org.codehaus.groovy:groovy-all')
import org.hidetake.groovy.ssh.Ssh
final def ssh = Ssh.newService()
final def HOST = '10.10.42.42'
final def USER = 'my_username'
final def PASSWORD = '1234'
final def DELAY = 24
ssh.remotes {
webServer {
host = HOST
user = USER
password = PASSWORD
}
}
ssh.run {
session(ssh.remotes.webServer) {
execute 'sys brew'
execute "sleep ${DELAY}s"
execute 'sys pour'
}
}