Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 24 additions & 0 deletions checkifalive.sh
Original file line number Diff line number Diff line change
@@ -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
16 changes: 5 additions & 11 deletions vnc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 *
Expand Down Expand Up @@ -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