22 lines
714 B
Bash
22 lines
714 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
d=":2"
|
||
|
|
||
|
# Clear chrome profile
|
||
|
rm -rf ./chrome-profile
|
||
|
DISPLAY=:2 kill -9 $(pidof /usr/bin/google-chrome-stable) > /dev/null 2> /dev/null
|
||
|
|
||
|
#Start chrome
|
||
|
if [ $1 == "False" ]; then
|
||
|
DISPLAY=$d /usr/bin/google-chrome-stable --user-data-dir='./chrome-profile' --no-first-run > /dev/null 2> /dev/null &
|
||
|
# echo "Starting chrome without proxy"
|
||
|
else
|
||
|
DISPLAY=$d /usr/bin/google-chrome-stable --user-data-dir='./chrome-profile' --no-first-run --proxy-server=socks5://$1 > /dev/null 2> /dev/null &
|
||
|
# echo "Starting chrome with proxy"
|
||
|
fi
|
||
|
|
||
|
#Wait enough to let chrome start up
|
||
|
sleep 5
|
||
|
|
||
|
#Now start the actual bot, we're in a safe environment
|
||
|
DISPLAY=:2 python src/qwiklabs/get_google_account.py $2
|