Advertisement
Guest User

Untitled

a guest
May 31st, 2016
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #!/usr/bin/env bash
  2. function automated_task(){
  3. socksProxyTimeout=120
  4. ssh -A -D 9999 some_server "sleep $socksProxyTimeout; " &
  5. sockProxyPid=$!
  6. sleep 3
  7.  
  8. function cleanUp(){
  9. echo shutting down background processes...
  10. kill -9 $sockProxyPid || true
  11. cd ../../
  12. }
  13.  
  14. trap 'cleanUp' EXIT
  15. run_selenium_with_proxy
  16. }
  17. automated_task
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement