Skip to content

Instantly share code, notes, and snippets.

@pnasrat
Created June 6, 2016 19:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pnasrat/972a52e3373e308269997bd8614cca02 to your computer and use it in GitHub Desktop.
Save pnasrat/972a52e3373e308269997bd8614cca02 to your computer and use it in GitHub Desktop.
#!/usr/bin/env expect
spawn "./hyperkitrun.sh"
set pid [exp_pid]
expect "tc@box:~$"
send "sudo halt\r\n";
expect {
timeout {exec kill -9 $pid; exit 1}
"reboot: System halted"
}
close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment