Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- function automated_task(){
- socksProxyTimeout=120
- ssh -A -D 9999 some_server "sleep $socksProxyTimeout; " &
- sockProxyPid=$!
- sleep 3
- function cleanUp(){
- echo shutting down background processes...
- kill -9 $sockProxyPid || true
- cd ../../
- }
- trap 'cleanUp' EXIT
- run_selenium_with_proxy
- }
- automated_task
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement