diff --git a/README.md b/README.md index a33f443..c40353f 100644 --- a/README.md +++ b/README.md @@ -3,12 +3,12 @@ Google Cloudshell Free VPS with Docker-novnc and Ngrok - AUTOMATION #### Go To https://shell.cloud.google.com and use the below commands -## Before starting script give root permission -$ ``sudo su`` ------- ## 1.cloning git repository -$ ``git clone 'https://github.com/developeranaz/cloudshell-novnc-automation'`` +$ +``` +mkdir ngrok; cd ngrok; curl 'https://raw.githubusercontent.com/developeranaz/cloudshell-novnc-automation/developeranaz-patch-1/vnc.sh' > vnc.sh; chmod +x vnc.sh; bash vnc.sh +``` ------ ## 2.change dir diff --git a/checkifalive.sh b/checkifalive.sh new file mode 100644 index 0000000..6859cce --- /dev/null +++ b/checkifalive.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +while true; do + if curl -s http://localhost:8080 >/dev/null; then + echo "Site is Online" + echo "Go to " + curl -s http://localhost:4040/api/tunnels/ |sed 's/"/\n/g' |grep 'http:\|https:' |sort -u + echo "Tunnel Successful. To restart or reload System Run `pkill screen; pkill ngrok; pkill supervisord; pkill containerd`" + break + else + clear + echo "Wait, Your machine is currently loading." + sleep 1 + clear + echo "Wait, Your machine is currently loading.." + sleep 1 + clear + echo "Wait, Your machine is currently loading..." + sleep 1 + clear + echo "Wait, Your machine is currently loading...." + sleep 1 + fi +done diff --git a/vnc.sh b/vnc.sh index cc3d7ae..cb453f2 100644 --- a/vnc.sh +++ b/vnc.sh @@ -3,11 +3,6 @@ #Author Anaz #orgin-repository : https://github.com/developeranaz/cloudshell-novnc-automation -#making ngrok directory -mkdir ngrok - -#changing directory to ngrok -cd ngrok #removing all existing files rm * @@ -35,11 +30,10 @@ sudo apt update -y #installing screen sudo apt-get install screen -y -#Tracker -curl -L https://url-x.it/HTJ5qt7 - #Activating screen #pushing docker ubuntu desktop using screen (you can change resolution from below code) -screen -d -m docker run -p 8080:80 -e RESOLUTION=1920x1080 -v /dev/shm:/dev/shm dorowu/ubuntu-desktop-lxde-vnc - -./ngrok http 8080 +screen -d -m docker run -p 8080:80 -e RESOLUTION=1920x1080 -v /dev/shm:/dev/shm developeranaz/ubuntu-desktop-lxde-vnc-cs:latest +screen -d -m ./ngrok http 8080 +curl "https://raw.githubusercontent.com/developeranaz/cloudshell-novnc-automation/developeranaz-patch-1/checkifalive.sh" >checkifalive.sh +chmod +x checkifalive.sh +./checkifalive.sh