Delete update

This commit is contained in:
peterpt 2017-07-12 06:21:03 -04:00 committed by GitHub
parent 34b70f74f1
commit 53c1cfdd00
1 changed files with 0 additions and 79 deletions

79
update
View File

@ -1,79 +0,0 @@
#!/bin/bash
clear
cyan='\e[0;36m'
green='\e[0;32m'
lightgreen='\e[1;32m'
white='\e[1;37m'
red='\e[1;31m'
yellow='\e[1;33m'
blue='\e[1;34m'
purple='\e[1;35m'
function chknet() {
echo -e $red "[X] Your Internet is not working correctly!"
sleep 1
echo -e $cyan "[*] Checking ...."
ping -c 1 8.8.4.4 > /dev/null 2>&1
png="$?"
if [ $png == "0" ]
then
echo -e $red "[X] Your linux OS is not able to resolve"
echo -e $red "hostnames over terminal using ping !!"
echo ""
echo -e $yellow "Search on the web : (unable to resolve hostnames ping) to find a solution"
echo ""
echo -e $green "Update will continue , but is not garantee that cloud work properly."
echo ""
echo -e $cyan "Update will continue because :"
echo -e $green "Ping google.com =$red Failed"
echo -e $green "Ping google DNS = Success"
echo ""
echo -e $green "Press [ENTER] key to continue"
read continue
sleep 1
elif [ $png == "1" ]
then
echo -e $yellow "You are connected to your local network but not to the web ."
echo -e $yellow "Check if your router/modem gateway is connected to the web ."
echo ""
echo -e $green "Update will not continue , you are only connected to your local lan."
echo ""
echo -e $cyan "Update will stop because :"
echo -e $green "Ping google.com =$red Failed"
echo -e $green "Ping google DNS =$red Failed"
echo ""
echo -e $green "Press [ENTER] key to continue"
read continue
exit 1
sleep 1
elif [ $png == "2" ]
then
echo -e $red "You are not connected to any network ."
echo ""
echo -e $cyan "Update will stop because :"
echo -e $green "Ping google.com =$red Failed"
echo -e $green "Ping google DNS =$red Failed"
echo ""
echo -e $green "Press [ENTER] key to continue"
read continue
exit 1
sleep 1
fi
}
ping -c 1 google.com > /dev/null 2>&1
png="$?"
if [ $png != 0 ]
then
chknet
fi
sleep 1
echo -e $cyan "************************************"
echo -e $cyan "** $green Updating Fatrat from Github $cyan **"
echo -e $cyan "************************************"
sleep 3
git checkout master
git pull origin master
echo -e $cyan "*************************"
echo -e $cyan "** $green Update Completed $cyan **"
echo -e $cyan "*************************"