Created
August 19, 2015 05:15
-
-
Save dalanlan/6dc55494380f3957a98d to your computer and use it in GitHub Desktop.
Revisions
-
dalanlan created this gist
Aug 19, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ #!/bin/bash ip="$1" /usr/bin/expect <<-EOF set timeout 3 spawn ssh vcap@$ip expect { "yes/no" {send "yes\r";exp_continue} "password" {send "password\r";exp_continue} "login" {send "sudo mkdir -p /varlog && sudo touch -f /var/log/es-kubelet.log.pos && sudo touch -f /var/log/es-containers.log.pos\r";exp_continue} eof exit } EOF