Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- pidfile=/var/tmp/tv.pid
- function killssh(){
- if [[ -f ${1} ]]; then
- local _pid=$(cat $1)
- if ps -o pid,cmd -p $_pid > /dev/null 2>&1 ; then
- kill -9 $_pid
- fi
- rm -f $1
- fi
- }
- killssh $pidfile
- nohup ssh -D *:8080 -N user@ip &
- pid=$!
- echo $pid > $pidfile
- /opt/google/chrome/google-chrome --user-data-dir=$HOME/.config/google-chrome-tv --profile-directory=tv --args --proxy-server=socks5://127.0.0.1:8080
- killssh $pidfile
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement